Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: pull 2 tables from 1 SP into report Post Reply Post New Topic
Author Message
mdkryptoking
Newbie
Newbie


Joined: 30 Apr 2010
Online Status: Offline
Posts: 2
Quote mdkryptoking Replybullet Topic: pull 2 tables from 1 SP into report
     Posted: 30 Apr 2010 at 7:20am
Ill try to explain this as best i can. I have linked in my stored procedure and within the SP are two temp tables that i would like to output. One table is detail and one is a summary. My problem is that Crystal is only seeing the first table and i cannot figure out how to get it to see the second one as well so that i can pull those fields into the report. I have been trying different tactics all morning but i am having no luck. I am relatively new to Crystal so maybe i am attempting the impossible but i hope not. Any help would be appreciated.

Thank you.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Apr 2010 at 7:28am
I have never tried to retrieve 2 tables from a stored proc that is bound to the report.  I do return multiple tables from a stored proc and then set the datasource of the report  (pulling the data vs pushing data). 
 
I am assuming that you are selecting the data from both tables in the stored proc, but CR is only picking up the first one.
 
If the above is true, what I would try is to concatenate the 2 tables together and return just one.  After all, one is the summary of the other, so you wouldn't be returning any more rows, actually fewer overall, but the table would be wider.  You would use the summary information in your headers/footers and the detail in the detail...
 
HTH
IP IP Logged
mdkryptoking
Newbie
Newbie


Joined: 30 Apr 2010
Online Status: Offline
Posts: 2
Quote mdkryptoking Replybullet Posted: 30 Apr 2010 at 7:43am
I will try to concatenate the two tables. But i am also interested in how you did the pulling of the data that you mentioned. If possible, would you be able to explain how you do that?

Thanks for the quick reply!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Apr 2010 at 7:47am

The standard way that reports are created, pull the data...CR gets the data from some source (tables or stored proc).

Our reports are 'run' from an application, the application displays the parameters, calls the stored proc which returns a dataset (any number of tables).  The application creates the report and sets the datasource of the report to the dataset.  The data is 'pushed' to the report.
 
It's a brief overview, but hopefully you get the idea.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum