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

SUPPRESS RECORD ON MAIN REPORT WHEN SUBREPORT IS BLANK

Status
Not open for further replies.

lhill1108

Technical User
Oct 6, 2010
1
US
I have a patient report that is currently being used by our financial counselors. They want to split the report up by medicare patients and non-medicare patients. I have a subreport that has the insurance information in it. When I use the select expert to not equal "Medicare" it still puts the patient information on the main report but just blanks out the insurance information. I would like it so it takes the entire record out.
 
If you are grouping by patient, insert a formula in the (suppressed) GH1a of the main report:

//{@reset}:
whileprintingrecords;
shared stringvar insur;
if not inrepeatedgroupheader then
insur := "";

The subreport should be in GH1b, with a formula in the subreport footer:

whileprintingrecords;
shared stringvar insur := maximum({table.insur});

Then show the main report group info in GH1c and in the section expert->GH1c->suppress->x+2->enter:

whileprintingrecords;
shared stringvar insur;
insur = "";

You should also format each GH1 section to "suppress blank section" and also format the subreport to "suppress blank subreport" (format subreport->subreport tab) and remove the border around the sub. If you need to align the sub information with main report info in the group header, you can format GH1b to "underlay following sections".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top