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

Not display record if sub-report is populated 1

Status
Not open for further replies.

jsh20fall

Programmer
Jan 3, 2003
9
US
How can I get my main report to display data only if the sub-report is missing information? I see how to suppress a record with a blank sub-report - but how about the other way around. I am looking for all my records that are missing something - thus the sub-report is blank?
 
Use a shared variable in the subreport footer, like:

whileprintingrecords;
shared numbervar x := sum({table.amt};

In the main report add a reset in a section above the one containing the sub:

whileprintingrecords;
shared numbervar x := 0;

Then suppress the main report section (below the one containing the sub) using a formula like this:
whileprintingrecords;
shared numbervar x;
x <> 0

In the future, you should specify the main report groups and the location of the sub and the section you want to suppress.

-LB
 
Sorry - Thanks so much for the help here.

Main report: Grouped by Patient Visit ID Number
Detail A: (new to hold reset formula)
Detail B: contains: Sub report > Documents attached to the Patient visit
(suppress if not blank - i.e. if there are documents are attached)
Detail C: contains: Patient Name and details
(suppress if sub report is not blank)

I put the shared variable in the footer of the sub report
I put the reset formula into Detail A (main report)
I put the suppress in detail B and detail C (main report) - if I only put it into one or the other, the all patients displayed ?

Now I have the data - with huge spaces in between - how can I just get the results?
 
further clarification... the shared variable is a count of the number of documents in the sub report
 
Question:
Now I have the data - with huge spaces in between - how can I just get the results?
 
I am unclear on what the remaining issue is. If you now have blank space, go into the section expert->select the section showing blank space->check "suppress blank section".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top