Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to disable link to the subreport if a condition is true?

Status
Not open for further replies.

techgo

Programmer
Jan 12, 2005
4
GB
Hi ,

I want to disable the link to the subreport in my main report for a particular condition.When I suppress the subreport for that condition (I apply a formula e.g, {Orders.Order ID}=1),the link disappear but the blank space is still clickable.More precisely,I want an unclickable blank space instead of the subreport link if order id is 1.

This is a very urgent issue for me .Please let me know if you have done this before.

BTW I have to put the subreport link in the details section.

Thanks
 
You might try right clicking the details and selecting insert section below, then palce the subreport in the new detail section.

Then instead of suppressing the subreport, suppress the additional detail section by right clicking it and selecting format section and in the X2 next to suppress place:

{Orders.Order ID}=1

Not the subreport link only appears when the order id <> 1 and there's no white space.

-k
 
I tried it but It didn't work the way I want the final results...It suppresses the other details as well.
I have a few other fields as well in the same detail section and I have to keep the subreport link at the end of the line.So I cant keep it in a different section.

 
It doesn't suppress other sections.

If the current setup had the subreport link at the far right of your details section (what I guess you mean by the unclear end of the line statement), then it isn't creating white space is it?

So let's see an exdample of what you expect rather than text descriptions.

-k
 
Ok,

So I have to Display:

MANAGER Value1 Value2

Gary 100 200 Subrep.rpt
Josh 500 300 Subrep.rpt
N/A 400 100
N/A 100 200
Jerry 800 1000 Subrep.rpt

Subreport takes managername as parameter.
In front of the N/A s , I dont want to display the subreport link.
I have suppressed the subreport so we cant see the link .But that white space is still clickable and takes me to the 'no data' page.
I have also checked the 'Suppress blank subreport option'
But still the same.
 
Use the same sorty of theory of onserting another section, only have 2 sections, only the difference is that one does NOT have a subreport, abd the other does.

Then right click the section that has the subreport and select format section->X2 next to suppress and enter:

{Orders.Order ID}=1

Or whatever your condition is when you do NOT want a subreport.

Then in the section suppress formula for the section that does not contain the subreport place:

not({Orders.Order ID}=1)

So the report will have a subreport when the condition does not exist, otherwise the other section will fire which does NOT have a subreport.

-k
 
Hi,

It might make a difference, if for the subreport file, the Supress Printing If No Data (File/Options and File/Report Options) is checked.

Dana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top