Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Programmatically Suppressing Report Sections?

Can someone please tell me if there is a way to suppress sections of a report at runtime? I am giving the user the option to output to excel or pdf. If excel, I want to suppress the page headers and footers so I donu2019t end up with a bunch of blank rows for every page break. Can this be done or do I need to create two nearly identically reports to accomplish this? Thanks!

Version u2013 vs2003, C#

Former Member
replied

Hello, Dan;

You can do a conditional suppression on sections in the designer based on a parameter you pass in at runtime.

If {?SuppressSection} = "View" Then

False

Else If {?SuppressSection} = "Suppress" then

True

Then from your application pass in "View" or "Suppress" depending on if you are viewing or exporting the report.

'Pass the parameter Name and parameter Value

crReportDocument.SetParameterValue("SuppressSection", "View")

Elaine

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question