How to hide the section part

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

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


Responses

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

Up
0
Down
Hi,

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

Programmatically
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


Manually

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.


Mani.R

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

Login to post response