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

Conditionally Supressing a Report Header Section

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
Using Crystal Reports 8.5:

I am modifying the sub-reports of a report that I did not create or design. Anyway, there are two sub-reports. One that lists new assignments and a second one that list completed assignments. Both are structured the same: The heading information (title and column headings) are in the Report Header and the list is generated in Group Footer # 1.

All is fine if there are new assignments and completed assignments for a section. However, if there are none of either or both, the report generates a header with nothing listed.

Therefore I need to supress the Report Header if there is no data listed by the Group.
 
In the subreport, go to the section expert->report header->suppress->x+2 and enter:

isnull({table.field})

If these are linked subreports, then you would use the field you are linking on for {table.field}.

-LB
 
If I were doing it, I'd have a special section in the subreport that said "No Data" when there was no data. You'd get that by suppressing the section when the value wasn't null.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Since all the action (listing) takes place in a Group Footer (the Detail section is suppressed), I need the logic of: If the Group Footer is empty, suppress the Report Header.....

Is there a way to do that??
 
It doesn't matter if the data is in the group footer or in the details. Use the group field in the formula:

isnull({table.groupfield})

If the group field is present, you will have data in your group footer, otherwise not.

-LB
 
I have tried every {table.groupfield} that lists. Even stuck them redundantly in the suppressed details section. The damn header still prints........
 
I just placed a field {LABSYS.Lab Case} in the header that I am attempting to suppress if the listing below is empty. Sure enough data prints that has is not in the group that is listed, but it is a record pulled from early in the table (although I can see no other pattern). Even on empty groups, data is printed! It is like the records are leaking from somewhere........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top