Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Need data from Two Tables in the details section Post Reply Post New Topic
Author Message
TradeRK
Newbie
Newbie
Avatar

Joined: 08 Mar 2010
Online Status: Offline
Posts: 2
Quote TradeRK Replybullet Topic: Need data from Two Tables in the details section
     Posted: 08 Mar 2010 at 10:42am
Hi,
I need to generate report whre I take the data from Two tables but need to show in the details one by one. e.g. I have to pull the data from Purchase Order and Purchase Order History table. the data is sorted by date and It should look like -
 
Report Header
Page Header
Record 1 from Purchase Order
Record 2 From Purchase order History
Record 3 From Purchase order History
Record 4 From Purchase order
Page Footer
Report footer
 
The Records appearing in the Details section shown above are sorted by date and can be from any of the two tables based on date. I cannot join the two tables as that would not be helpful in above scenario. THe two tables have to be separate.
 I am using CR9
Thanks in advance!!


Edited by TradeRK - 08 Mar 2010 at 10:44am
TRK
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 08 Mar 2010 at 11:20am
The only way I can see to do it is use a subreport for the second table (performance could be greatly affected).
Anybody else have a better idea.
IP IP Logged
TradeRK
Newbie
Newbie
Avatar

Joined: 08 Mar 2010
Online Status: Offline
Posts: 2
Quote TradeRK Replybullet Posted: 08 Mar 2010 at 11:26am
Thanks for the reply... what you are suggesting that -
Detail section A - Put Purchase order
Details Section B - Put Subreport for Purchase Order History
 
But in this case isn't the report will print all the records in one section and then start printing the records from second section (i.e. from sub-report?)
Please corrct me if my consideration is wrong...
 
I need to print the mixed records from both the tables (with some own logic)....
TRK
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 08 Mar 2010 at 1:07pm
I think if you group by date (keep table A info in details), put the subreport in the group footer and link by date, then it should work.   Seems like I had to do something similiar to this.
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