Skip to Content
Former Member
Dec 04, 2007 at 07:02 PM

Programmatically Supress Section and Override Condition


Post Author: Ragu

CA Forum: .NET

Hi Everyone,I am trying to programmatically modify a report when it's being written out in Excel format. The idea is to suppress any page headers, footers, etc. that are not desirable when creating an Excel file (so that the end result looks more like a spreadsheet, rather than a printable document). The reason for doing it this way, is that the reports are sometimes run to PDF and we'd like them to print with nice headers, etc. (Rather than maintain two sets of reports, this originally seemed like a good idea.) Things started out good, but then I noticed I was unable to programmatically suppress some group footers. At first I was totally stumped, but then I realized that in these footers I have a conditional formula set. (Basically it allowed the user to toggle whether or not they wanted to see graphs.) Since I never want these footers in Excel format, I tried setting:SectionFormat.EnableSuppress = true;The problem, it seems, is that the conditional formula overrides the EnableSuppress property. It also seems that there is no way to remove the conditional formula programmatically in .NET.Does anyone out there know of a way to disable or remove the conditional formula programmatically? OR a way to check in a CR formula if the section is already suppressed? I could easy update the conditional suppression to work like this:not() OR {?ShowGraphs} = "No" Thanks in advance.Dan