Passing Data to SubReports for Use in Selection Criteria
Crystal Reports XI Pro
I have a report that contains the main report and several subreports. There is no relation between the main report and any of the subreports (no linking fields). Each report is totally independent. I want to be able to pass two date values from the main report to each subreport. These date values will be used in the report selection criteria of each subreport.
I have tried Shared DateVar variables and they will not work in this context. Any suggestions will be greatly appreciated.
Abhilash Kumar replied
Right-click the Subreport > Select Change Subreport Links > Move the first date field to the pane on the right > Uncheck the option 'Select data in subreport based on field' > Click OK
Repeat the above step for the next date value.
Inside the Subreport, you should notice that the two date fields you used in the 'Change Subreport Links option' appear as prompts.
You can now open the Record Selection Formula in the subreport and use these two prompts like any other field.