Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Reports XI with Subreports Post Reply Post New Topic
Author Message
Gary J
Newbie
Newbie


Joined: 30 Mar 2009
Location: United States
Online Status: Offline
Posts: 7
Quote Gary J Replybullet Topic: Crystal Reports XI with Subreports
     Posted: 13 Apr 2009 at 11:08pm
I have main report with subreports. The subreports have common fields with the main report.  Links have been made on those common fields.  Share string variables have been created and information can be passed to the main report from the subreports.  However,  there is one field that is not common between the main report and subreport.  This field is common between the subreports. How can I accurately pass this field in a variable to the main report?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 Apr 2009 at 6:15am
shared variables, set it in the subreport and access it in the main
IP IP Logged
thakuramit1981
Newbie
Newbie


Joined: 13 Apr 2009
Online Status: Offline
Posts: 14
Quote thakuramit1981 Replybullet Posted: 14 Apr 2009 at 6:17am
you will have to create a shared variable in the subreport and then pass it to the main report and from the main report then pass it to the second subreport.just make sure that the subreport where you will create the variable should be in a different section then the subreport you need to pass the data too.I have actuatlly done this is my reports and it works fine!.This is how we link two subreports and create nesting
IP IP Logged
Gary J
Newbie
Newbie


Joined: 30 Mar 2009
Location: United States
Online Status: Offline
Posts: 7
Quote Gary J Replybullet Posted: 14 Apr 2009 at 6:29am
I have created a shared string variable in the subreport.  I have this subreport above the main report and above the other subreport.  I have the shared variable in the second subreport and no data is returned.  There are 20,000 of data (text).  Suggestions.
IP IP Logged
thakuramit1981
Newbie
Newbie


Joined: 13 Apr 2009
Online Status: Offline
Posts: 14
Quote thakuramit1981 Replybullet Posted: 14 Apr 2009 at 6:40am
You need to link the main report with the second subreport with that shared variable.
 
1) variable  (xyz)
2) Shared variable (xyz) in the main report.
3) link the main report and second subreport with this variable
IP IP Logged
Gary J
Newbie
Newbie


Joined: 30 Mar 2009
Location: United States
Online Status: Offline
Posts: 7
Quote Gary J Replybullet Posted: 14 Apr 2009 at 7:25am
When linking the shared variable from the second subreport to the main report, I am receiving an error: The formula cannot be used because it must be evaluated later.  Suggestions..
IP IP Logged
thakuramit1981
Newbie
Newbie


Joined: 13 Apr 2009
Online Status: Offline
Posts: 14
Quote thakuramit1981 Replybullet Posted: 14 Apr 2009 at 7:31am
how are you linking the subreport to you main reports are you passing the variable in the query as a parameter.also  please place the initiating variable in some section of the first subreport .u can suprees it.
IP IP Logged
Gary J
Newbie
Newbie


Joined: 30 Mar 2009
Location: United States
Online Status: Offline
Posts: 7
Quote Gary J Replybullet Posted: 14 Apr 2009 at 10:35am
I was able to pass the variable, but now the variable return the last row of the 20,000 records.
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