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

main report / subreport parameter

Former Member
0 Likes
326

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

hi Carol,

I have tried this and it got worked with shared variable concept.

In Main report 'M', create a formula

Formula Name: F1

Definition :

shared numbervar i:=1;

i;

And now drag the formula on top of main report.

In Sub report 'S', create a formula

Formula Name: F2

Definition :

shared numbervar i;

i;

And now drag the formula on top of Sub report.

Now go to text box in Sub report and right click -> Format Text -> Suppress

Write the below condition :

if {@F2} <> 0 then true

Save the report and refresh it once.

Text box is visible in Subreport for standalone mode.

When Main report 'M' is refreshed, text box will not appear.

Hope this works for you too.

Regards,

Vamsee

Former Member
0 Likes

Hello Vamsee -- I've tried this, but it's not working. The text box is displaying when S is run standalone or

in the main report. I've checked and double checked and am sure I've duplicated what you suggested.

I put a text box in both M and S to display the value of the formula field (eg the shared variable)

to at least try to see if my formatting formula is correct.

The value in M is 1 (which I'd expect).

When S is run standalone, the value is 0. But it's also 0 when it's run within M. I've refreshed both reports (actually what I've done

is, after setting all this up, I completely removed S from M, saved and closed M, re-opened it and re-included S... so I'm

quite sure it has the most current version of S).

It seems to me that my shared variable either isn't getting passed into S from M at all (it should override the value of

the shared variable in S... is that correct?). Or possibly it gets passed after the suppress formula is evaluated. Is

that possible? I've read some things on the forum regarding evaluation time for shared variables, but I'm not sure

how they apply to me.

Thanks,

Carol

Former Member
0 Likes

Hello Vamsee -- I've tried this, but it's not working. The text box is displaying when S is run standalone or

in the main report. I've checked and double checked and am sure I've duplicated what you suggested.

I put a text box in both M and S to display the value of the formula field (eg the shared variable)

to at least try to see if my formatting formula is correct.

The value in M is 1 (which I'd expect).

When S is run standalone, the value is 0. But it's also 0 when it's run within M. I've refreshed both reports (actually what I've done

is, after setting all this up, I completely removed S from M, saved and closed M, re-opened it and re-included S... so I'm

quite sure it has the most current version of S).

It seems to me that my shared variable either isn't getting passed into S from M at all (it should override the value of

the shared variable in S... is that correct?). Or possibly it gets passed after the suppress formula is evaluated. Is

that possible? I've read some things on the forum regarding evaluation time for shared variables, but I'm not sure

how they apply to me.

Thanks,

Carol