I am having a problem setting the visible property of a subreport to FALSE.
I have a form that i use to run the report and set a few options before execution. I have a check box that i want to use to show the subreort...
What's the correct way to do this????
Last edited by GaryElwood; 09-23-11 at 11:03.
Reason: Problem Solved!
You cannot change the visual aspect of a report when its rendition is completed. If you try to use this code when the report is open, it's too late. This must be done before the report leaves the Open or Load event (not sure which one).
You could possibly reopen the report in Design mode, change the Visible property then re-reopen it in Preview or Normal mode, but this would be rather awkward. Or you could open it in Preview or Normal mode with an argument in OpenArgs that would specify whether the subreport must be visible or not. You would process the contents of OpenArgs in the Open event of the report and set the Visible property of the subreport accordingly.