Without more information on the specifics of the report you’re running it may be difficult to give an exact solution here, but here’s some typical ideas I usually follow to help processing speed.
Are you only getting information from your subreport to send back to your main report via variables, or are you actually displaying the contents of the subreport, depending on the visibleExpr?
- If possible, Try moving subreport from detailSection to a headerSection, as it may reduce the amount of times main report is calling subreport (and underlying SQL queries).
- Set a variable to send to your subreport (like your @IncludeThis), so that it only actually runs the subreport if needed. You can add this to your filter parameters on the subreport.
- Review and check for optimizations on the DAC joins on both reports to reduce duplicated/unneeded records. You can use the Trace Profiler to get a better idea of the underlying SQL queries.
These are general points and it depends on your specific use case, so If these are not helpful, you could provide your .RPX file of both main and subreport to help review.