Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Suppress multiple sections at a time?

$
0
0

Hi sap experts,

 

I now using C# to suppress section with the following code:

 

                ReportDocument rd = new ReportDocument();

                ISCDReportClientDocument crReportClientDocument = rd.ReportClientDocument;

                CrystalDecisions.ReportAppServer.ReportDefModel.SectionFormat crSectionFormat;

                CrystalDecisions.ReportAppServer.ReportDefModel.Section crSection;

                rd.Load("E:\\SouthGis\\CASS\\Code\\trunk\\Code\\ShowReport\\ShowReport\\CRReport\\CrystalReport_ALLCR.rpt");

                crSection = crReportClientDocument.ReportDefController.ReportDefinition.ReportFooterArea.Sections[0];

                crSectionFormat = crSection.Format;

                crSectionFormat.EnableSuppress = true;

                crReportClientDocument.ReportDefController.ReportSectionController.SetProperty(crSection, CrystalDecisions.ReportAppServer.Controllers.CrReportSectionPropertyEnum.crReportSectionPropertyFormat, crSectionFormat);

 

But now I have about 14 ReportFooterSections.

 

Sometimes, I have to suppress 10 or 9 or 11 ReportFooterSections at a time. While using the above code , I have to define many crSections. This may cause may dumplicate code.

 

Is there a way to accomplish it?

 

Thanks.

 

QQ截图20140805104126.png


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>