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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show this if item is suppressed 1

Status
Not open for further replies.

kpetree10

IS-IT--Management
Jun 15, 2007
57
0
0
US
I've got a sub-report that may become suppressed. I want to add a text box with a warning for the user if that sub-report is suppressed. How can I trigger the text to appear only when the sub-report's suppressed?

Thanks!
 
You need to explain under what conditions the subreport becomes suppressed. If you have a conditional formula that does this, show the contents. If the sub is suppressed because it is empty, let us know. It is also important to know where the sub is located (what report section and whether it is linked to the main report).

-LB
 
The sub-report is suppressed when it's empty and is located in the group footer. It is linked to the main report on data in the group header.
 
Okay, then create a formula in the main report and place it in a suppressed group footer_a section (move the sub to GF_b):

whileprintingrecords;
shared numbervar x := 0;

In the sub, set a recurring non-zero number field to the shared variable in a formula in the subreport footer:

whileprintingrecords;
shared numbervar x := {table.number};

Then in GF_c, add the message, using a formula like this:

whileprintingrecords;
shared numbervar x;
if x = 0 then
"Alert: No Data for this Group"

You could alternatively use a non-null string field, and replace "numbervar" with "stringvar" and 0 with "".

-LB
 
Thank you so much lbass! That worked perfectly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top