Search code examples
crystal-reportscrystal-reports-2011

Remove data from sub report that exists in Main Report Crystal Reports


I have the following issue which I'm not sure how to handle.

My main report returns data that exists in my sub report.

I basically need to remove the record from my sub report if it exists in my main report.

e.g

Current results

Main Report- A2, Sub Report - A1, A2, A3

Desired Results-

Main Report- A2, Sub Report - A1, A3

Thank you in return.


Solution

  • Pass main report data to sub report using sub report links and then add below condition in sub report Record selection formula

    databasefield not in {pm-mainreportfield} //this is main report link to sub report