Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: subreport parameters Post Reply Post New Topic
Author Message
sjr40
Newbie
Newbie


Joined: 09 Jun 2008
Online Status: Offline
Posts: 7
Quote sjr40 Replybullet Topic: subreport parameters
     Posted: 02 Jul 2008 at 8:20am
I have a main report and 2 subreports on it.
I have 2 parameters to pass :- date range and location.
Upon refresh, I get prompted for the date range and the location, so that the dates I choose and the location are passed to the subreports.
Only the date range is being passed to all reports.
All the locations are being displayed for both subreports.
The date parameter has been created on all 3 reports to make it work. 
Anyone know what the problem is ?
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 02 Jul 2008 at 10:16am
How have you set up the parameters?
 
The best way to do this is to set up the parameters in the main report.  Then set up the links to the subreport by linking from the parameter in the main report to the appropriate fields in the subreport.
 
-Dell
IP IP Logged
sjr40
Newbie
Newbie


Joined: 09 Jun 2008
Online Status: Offline
Posts: 7
Quote sjr40 Replybullet Posted: 07 Jul 2008 at 1:12am
I have set up date range and location in the main report.
Date range is also in the subreports but works properly, maybe beacause it is a static datatype?
However, if I select 3 locations for reporting, they appear correctly in the main report, but all the locations are dispaled in the subreports.
Can you give me an example of linking from main to subreport field ?
Thanks
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 07 Jul 2008 at 2:26am

Hi,

Check your record selection formula in Sub-Report are you filtering on the Location field which  you are passing from Main report.
 
The record selection formula in your subreport should be date range and location.
 
cheers
Rahul
IP IP Logged
sjr40
Newbie
Newbie


Joined: 09 Jun 2008
Online Status: Offline
Posts: 7
Quote sjr40 Replybullet Posted: 07 Jul 2008 at 2:56am
Solved, I think
Edit - Subreport links - selected location parameter to link to.
Displays correctly.
Thanks
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