Unanswered: Filter data in subreport based on a value passed from main report
I am using crystal report 2008.
In the crystal report that I have designed, has a main report and a subreport.
A date value from main report has to be passed to the subreport and based on that date, the records should be filtered, in the sub report.
What I have done is created a shared variable for this date value, in the main report,like below. The value is pulled to report and is showing the correct value in main report.
From the main report, right-click the subreport and chose "Change Subreport Links..."
This allows you to pass the value to the subreport either as a filter to a given field in the subreport, or as a parameter (you may wish to untick the box labelled "Select Data in subreport based on field:" if you just want it as a vanilla parameter).
Then in your subreport you can add the parameter to the record selection formula however you see fit.