How to hide the section part

Posted by Jayakumars under C# on 11/24/2016 | Points: 10 | Views : 3273 | Status : [Member] [MVP] | Replies : 1

How to hide particular section in Crystal report version 13 only .

My Section like this

Section2 (Page Header a)
Page Header (Page Header b)

I need how to visible false (Page Header b) in runtime when i click my report generate but how will hide this or how to hide using formula.

Mark as Answer if its helpful to you


Posted by: Manicse on: 11/24/2016 [Member] Bronze | Points: 25


We can easily Hide the Section or any areas in the Crystal Report. We have many ways to hide it programmatically or Manually.

CrystalDecisions.CrystalReports.Engine.ReportDocument doc= CrystalDecisions.CrystalReports.Engine.ReportDocument() ;

doc.DataDefinition.FormulaFields["yourformulaname"].Text = "your value"; //or you can directly set the visibility of your section from code behind on the basis of your business logic as

doc.ReportDefinition.Sections["sectionnameOrIndex"].SectionFormat.EnableSuppress = true; // Suppress is true so hide


You can right click the section, click section expert, click the suppress checkbox, then the suppress formula button. In the formula section, enter a condition that will result in an empty sub-report. Click save and close.

Section-->Right Click-->Suppress(If want to specify Condition then Formula Field)

Also select the suppress blank section checkbox

You can also do the same by selecting the sub-report, click format sub-report and in the sub-report tab, select the checkbox that says suppress blank sub report. This may depend on the version off Crystal you have.


Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response