cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

main report / subreport parameter

Former Member
0 Likes
329

hi -- I have a report S and a report M. S is run stand-alone, and it's also included in M as

a subreport.

In S, there's a text object that needs to be displayed when S is running standalone. It needs

to be suppressed when S is being run as part of M.

I think I need a parameter in S that's set to false by default, but when it's part of M, a subreport

link from M to S will set it to true. I don't want either of these "parameters" to be editable (or even seen)

by the user... that's one of the things I'm having trouble with.

How can I accomplish this... either w/ parameters or something else?

Thanks,

Carol

View Entire Topic
Former Member
0 Likes

In M's Report Header section, add the following formula object:

@SetSubreportFlag

shared booleanVar MasterReport := TRUE;

You can suppress the Report Header or the formula object to hide the resulting TRUE value.

In the subreport, edit the text object's properties and enter the following suppression formula:

shared booleanVar MasterReport;

MasterReport

When a boolean variable is declared, it defaults to FALSE, so when you run your subreport as a stand-alone report, the shared variable MasterReport will default to FALSE and your text object will not be suppressed. But when the subreport is called from the main report, the shared variable MasterReport will have previously been set to TRUE and therefore the text object will be suppressed.

Fuskie

Who hopes this helps...

Former Member
0 Likes

Fuskie -- Worked like a charm... thank you!

Carol