Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: how to share fields(data) of main with subreport Post Reply Post New Topic
Author Message
mrcool18t
Newbie
Newbie


Joined: 23 Mar 2010
Location: India
Online Status: Offline
Posts: 14
Quote mrcool18t Replybullet Topic: how to share fields(data) of main with subreport
     Posted: 20 Apr 2010 at 10:08pm
Hi,
       I m new to crystal reports... I am creating report using crystal reports,  main report contains  Data fields taxPer, amt and so on.......i am using table "bill" as a datasource for it..for main report its working correctly....now i have to add a subreport to it...

       here i need to use(share) these fields(taxPer and amt) in subreport.......i m doing this by using subreport links option by right click on subreport........but i am not getting field values in subreports after execution.........pls any one help me, how to do this one.......

Thanks in Advance
  praveen
   


IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 21 Apr 2010 at 5:54am
If you just want the data from the links and you're not using the field as select criteria for the subreport, did you manually remove them from the selection criteria of the subreport after creating the links?
 
The fields from the main report will be available as parameters in the subreport, so you'll need to use those parameters instead of looking for the fields.  Also, the subreport will only have access to values from a single record from the main report.  If you need multiple values, you'll have to include the bill table as one of the datasources in the subreport.
 
-Dell
IP IP Logged
mrcool18t
Newbie
Newbie


Joined: 23 Mar 2010
Location: India
Online Status: Offline
Posts: 14
Quote mrcool18t Replybullet Posted: 22 Apr 2010 at 12:16am
Hi Dell,

    Thanks for your ans........i made a mistake that, instead of parameter fields i m used fields(Data)....... Now using ur help i m getting values for single record.......pls help me to access values for multiple records.....

Thanking You..........
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 22 Apr 2010 at 3:27am
For multiple records you can't use the data from the main report.  You have to include your bill table in the subeport and pull the data directly from there.  If, for example, you need to show all bills for a single customer, you'll link to the subreport on the customer id, include the bill table in the subreport and filter it by the customer id that's passed in from the main report (this is set up automatically when you set up the link.)
 
-Dell
IP IP Logged
mrcool18t
Newbie
Newbie


Joined: 23 Mar 2010
Location: India
Online Status: Offline
Posts: 14
Quote mrcool18t Replybullet Posted: 23 Apr 2010 at 2:31am
Hi Dell,

    Ur suggestions helped me to get done the those tasks what i have asked.......Thanks a ton for ur reply's...........


-Praveen

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