Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Subreport links Post Reply Post New Topic
Author Message
Needhelp
Newbie
Newbie
Avatar

Joined: 30 Nov 2012
Online Status: Offline
Posts: 13
Quote Needhelp Replybullet Topic: Subreport links
     Posted: 10 Dec 2012 at 7:38am
I have a report wil a number of sub reports. These are linked to the main report by a numeric field which works well. I also wish to link them from a single start date;end date parameter.

I have set up all the necessary parameters in each subreport, selected via record delection - and in the main report set up onthe parameter prompt. There is not a table in the main report to select a date range from.

For the subreports inserted in the group headers the paramter works wwell but for two subreports in the froup footer the dates are prompted for each subreport meaning that I am prompted 6 times. Start date, end date for each report.

The reports in the group header allow the start date and end date to be selected for in the subreport links but in the subreports in the group footer although I can select the links it will not save the links. When you go back in they link has disappeared. WHy would this be and what am I doing incorrect.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Dec 2012 at 7:57am
remove the params from sub reports.
create the date params in the main report. You don't have to filter anything in the main report on them, just create them.
Then they can be used as another link from main to sub report where they can be used in the select statement of each sub report as you want.
IP IP Logged
Needhelp
Newbie
Newbie
Avatar

Joined: 30 Nov 2012
Online Status: Offline
Posts: 13
Quote Needhelp Replybullet Posted: 10 Dec 2012 at 8:14am
I will give that a try. Why does my method work for some subreports in the group header and not the others inserted into the group footers?
IP IP Logged
Needhelp
Newbie
Newbie
Avatar

Joined: 30 Nov 2012
Online Status: Offline
Posts: 13
Quote Needhelp Replybullet Posted: 10 Dec 2012 at 8:15am
Sorry to do as two seperate posts but in the sub reports the record selection surely won't allow me select for something not in the report?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Dec 2012 at 8:26am
the subreport can be anything you want it to be. However if you want dynamic content as a link, then you need the content (linked field) to be in the main report.
I did not understand your first question re: header and footer...?
If you are linking the main report to the subreport, the value that is passed in the link is dependent on where you place the sub report. In the report header it will pass the value from the first row in the main report, in the report footer it will pass the last value in the main report.
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