Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sub Report Link Post Reply Post New Topic
Author Message
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Topic: Sub Report Link
     Posted: 25 Aug 2011 at 4:22am
I'm trying to link the main report to the sub report using a formula field in both reports. Is this possible?

The main report is not showing the data from the sub report and I don't know how to trouble shoot this issue as I have limited experience with subreports.

Any suggestions?

Great thanks!

Steve
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 25 Aug 2011 at 5:23am
You can right-click on the sub-report and change the links associated between the main and the sub-report.
|< /\ '][' ( )
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 25 Aug 2011 at 5:29am
Thanks - I tried that. I have one link to a unique formula that exists on each report but it is not displaying any results on the main report.

I guess I have the following questions.

1. How do I know that the sub report is running properly behind the scenes?
2. How do I test the links?

Steve
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Aug 2011 at 5:40am
open the sub report and look a the select expert. It will have the 'links' in there.
However your formula is only passing in ONE value per instance the subreport runs.
 
also look at


Edited by DBlank - 25 Aug 2011 at 5:41am
IP IP Logged
stevetothink
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 37
Quote stevetothink Replybullet Posted: 25 Aug 2011 at 6:57am
Originally posted by DBlank

open the sub report and look a the select expert. It will have the 'links' in there.
However your formula is only passing in ONE value per instance the subreport runs.
 
also look at


Thanks - what do you mean by "your formula is only passing in ONE value per instance"?

Should I link more than 1 field between the sub report and the main report?

Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Aug 2011 at 7:26am
Can't really say how you need to do your link as I don't know you what you are trying to accomplish or your data structures. Just trying to make sure you understand what is happening in the main and sub report linking process.
To clarify the one value thing here are examples...
say you are linking on customer id. you are only passing one customer id to the subreport each time the sub report runs inside the main report. So if you place the suberport in the main report's report header it only runs once and will only pass the first customer id it finds (the first row of data).
if on the other hand, in the main report you have a group using the cusomer id and you place the sub report in the group header or group footer it will run the sub report once per customer id (once per instance of your main report group) and 1 customer id each time it runs.
Hope that helps rather than making it more confusing.


Edited by DBlank - 25 Aug 2011 at 7:27am
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