How to use the shared variable from an earlier sub-report in a Selection statement to a later sub-report
Crystal Reports 2008
Reproducing the Issue
Create a Report with multiple Sub Reports
Shared variables are executed at a later stage of Crystal Reports processing and hence they are not available for Record Selection.
- Need to pass shared variable as a Parameter to the 'later sub-report'. This parameter can then be used in the select expert
- create a formula in the Main-Report and capture the value of the sub-report by creating Shared variable
- Place this formula and any formula that returns the SharedVar after the sub-report (perhaps, in a section that is below the sub-report that is returning this value)
- Make sure this formula shows the correct value in the Main report too
- Then right-click the second sub-report -> To which you want to pass this shared variable in select statement and use sub-report linking to link the Main report with second sub-report.
Pass shared variable to next level, pass shared variable to next level of sub-report, crystal reports , KBA , BI-RA-CR-DSL , Crystal Reports on C++ Data Semantic Layer (ClassicUniverse) , How To