Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Command with a link to a SQL table...

Status
Not open for further replies.

mlager

Programmer
Sep 1, 2006
74
US
Hello!

I'm using MSSQL 2000 and Crystal Reports XI.

I've got a report where I have a SQL command that pulls data from a SQL table. What I've done is link in an existing MSSQL table, then linked the primary key from the SQL command in Crystal Reports to the primary key in the existing MSSQL table.

When this report runs, it crawls, literlly one record at a time. I can't see why it's doing this, it almost appears as if it is running the SQL command for every record.

All I really want the report to do is run the SQL command once at the time of data refresh, and then have Crystal reports link it to other tables in the database expert as if it were a pre-existing table.

Does anyone have any recommendations on how I can make it work this way? Any advice would be great!
 
Either place everything in the SQL Command, or create a View on the database in lieu of the SQL Command and join the View to the table.

What you're instructing Crystal to do is go get the data from the table in it's entirety, and then go get the data from the SQL Command in it's entirety, and then use Crystal as the database engine to join the tables.

Crystal is a report writer, not a database engine, keep the processing on the database side.

-k
 
How do I limit number of detail lines on a crystal report (Seagate Crystal Report 7.0.1.100)

Am using SQL views and stored procedures to generated data for the report which is a picking document. I know I need to pick 10 Type A widgets and 5 Type B widgets. Each widget type is a unique entity. Instead of showing all 200 Type A widgets in inventory, I only want to list 10 Type A widgets on the picking document as well as 5 Type B widgets. I have a view of the order data that tells me how many widgets I need for the order. I also have a view of avaiable widgets. I do not know how to get to a view of the needed widgets (a variable by widget type) for the order.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top