Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Crystal Reports and Queries

Crystal Reports and Queries

Scheduled Pinned Locked Moved Visual Basic
databasequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dreamer2007
    wrote on last edited by
    #1

    I have a report in Crystal that gets data from SQL queries and it's slow. How do I use a stored procedure to make the report access data faster?

    T 1 Reply Last reply
    0
    • D Dreamer2007

      I have a report in Crystal that gets data from SQL queries and it's slow. How do I use a stored procedure to make the report access data faster?

      T Offline
      T Offline
      TomGarth
      wrote on last edited by
      #2

      Create the stored procedure to return the data from the query that you are using. CREATE PROCEDURE [dbo].[MySelectProcedure] @Parm1 int AS SELECT * FROM MainTable MT LEFT JOIN MyOtherTable OT ON MT.KeyField1 = OT.KeyField1 WHERE MT.MyParmField = @Parm1 Add parameters if you need them. When you are defining a new report in Crystal, you can select a stored procedure exactly like selecting a table. Add your stored procedure as the datasource. If you used parameters in it, they will show up in your parameters list in the report. Well written stored procedures are absolutely the BEST datasource that you can use for a Crystal Report.

      Tom Garth Developer R. L. Nelson and Associates, Inc., Virginia

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups