Hide a report textbox if report is not loaded as a subreport

1 Answer 45 Views
Conditional Formatting Report Designer (standalone) SubReport
Mike
Top achievements
Rank 1
Iron
Mike asked on 21 Apr 2023, 06:22 PM

I have a main report (A) which loads and embeds a 2nd report (B) as a subreport.

Report B can also be loaded on its own, without being contained in report A. 

I would like to hide (or blank out the value) in a Textbox on Report B if it has been loaded on its own. How do I do this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Mike
Top achievements
Rank 1
Iron
answered on 24 Apr 2023, 06:03 PM
I resolved this by adding a nullable parameter IsSubreport to the report being used as a subreport (B), then conditionally setting the Textbox value based on that parameter being true.  Then set the parameter to be passed in as True from the subreport ReportSource.Parameters property on the main report (A).  Seems to work fine.
Tags
Conditional Formatting Report Designer (standalone) SubReport
Asked by
Mike
Top achievements
Rank 1
Iron
Answers by
Mike
Top achievements
Rank 1
Iron
Share this question
or