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

Group Headings & No Data Showing 1

Status
Not open for further replies.

dstalls

Programmer
Sep 27, 2007
18
US
I am trouble shooting an old report I inherited. The report has 4 Groups:

1. Unit
2. Worker
3. Case
4. Client

A sub-report is providing details. The worker & unit groups keep showing up with headings but no data (having no data is fine, but if it is empty I don't want the headings).

I don't know what detail to give or I would be more specific. Sorry.

Any help?
 
You should always provide your CR version. In this particular case, you should also specify what section the subreport is located in and how it is linked to the main report.

-LB
 
Are the headings in the subreport? If so, you should go into the subreport and set it to suppress the heading in the subreport.

Right-click on the header section and choose Section Expert. Choose the formula icon (x+2 and a pencil) for suppression. Enter a formula; e.g.
Code:
isnull({your.field})
This suppresses the header when there is no data.

You'd still get a blank section in the main report. But if your Crystal is version 9 or higher, you'll have the option in Section Expert to suppress as blank section.

You should also consider the alternative of saying 'No Details' for such a case. This should also be done in the subreport, have an extra section that suppressed when there is date. i.e. for formula says
Code:
not isnull({your.field})

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I am using XI. The subreport is in Group Footer #4 (the client grouping) and is linked to the main report by a client ID parameter.

The headings are not in the subreport. I did try to suppress null values in subreport from entering the main report, but this did not help and in fact removed some of the information I needed.

I appreciate you both helping me work through this one.

Derik
 
Unfortunately, you would need to add the subreport again to a GH4a header and place your usual headers in GH4b. You can suppress all sections within this copy of the subreport. Format this subreport to "suppress blank subreport" (format subeport->subreport tab), and also format GH4a to "suppress blank section", so that GH4a doesn't show at all.

In the sub, you would need to create a shared variable based on a recurring record, something like the following, to be placed in the sub report footer:

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

In report header and in GF4b (after the section containing the sub) of the main report, place a formula:
whileprintingrecords;
shared stringvar ID := "";

Then go into the section expert->GH4b->suppress->x+2 and enter:

whileprintingrecords;
shared stringvar ID;
ID = ""; //note no colon

The sub showing the details should also be formatted to suppress blank subreport, and GF4a should be formatted to suppress blank section.

-LB





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top