on 09-30-2008 4:04 PM
Hi,
my requirement is to suppress the no data groupheader and its groupfooter. Please help me on this.
There are two options that I can see:
1. Use a formula to suppress. Just go into the section expert and change the formula for the "Suppress" option on the group header and footer to something similar to:
if isnull(count({Customer.Customer ID})) then true else false;
2. Suppress the sections via code. This sample suppresses the page header.
Section oSection = (Section)oReportClientDocument.getReportDefController().getReportDefinition().getPageHeaderArea().getSections().getSection(0);
// copy the format object as per the Model/View/Controller architecture
// and make the modifications to the copy of the format object.
ISectionFormat oSectionFormat = new SectionFormat(oSection.getFormat());
oSectionFormat.setEnableSuppress(true);
// Commit the changes back to the ReportClientDocument object using the
// ReportSectionController.
oReportClientDocument.getReportDefController().getReportSectionController().setProperty(
oSection, ReportSectionPropertyEnum.format, oSectionFormat);
Shawn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shawn,
Actually my requirement is to suppress the blank row (i.e) suppress the groupHeader which is blank and its corresponding groupFooter.
This is my code snippet for suppressing the groupheader,
ISectionFormat sectionFormat = groupHeader.getFormat();
//iSectionFormat.setEnableSuppress(true);
sectionFormat.setEnableSuppressIfBlank(true);
clientDoc.getReportDefController().getReportSectionController().setProperty(groupHeader,ReportSectionPropertyEnum.format, sectionFormat);
This is my code snippet for suppressing the groupFooter,
ISectionFormat iSectionFormat = groupFooter.getFormat();
iSectionFormat.setEnableSuppressIfBlank(true);
// Set the Properties of the Section through the ReportSectionController by passing in the original section you wish to modify,
// the type of propery you wish to set (ReportSectionProperyEnum.format), and the modified section property
clientDoc.getReportDefController().getReportSectionController().setProperty(groupFooter,ReportSectionPropertyEnum.format, iSectionFormat);
Now coming to my problem, as per the above code my guess is blank data groupHeader and its groupfooter should suppress, but groupHeader alone gets suppressed, but what i want is to suppress the groupFooter too..
Thanks,
Sureshkumar Durairaj
You want to suppress a Group section if there's no data - have you tried asking on Business Objects -> Crystal Reports Design?
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.