如何在 Crystal 报告中以编程方式抑制某个部分?

How to suppress a section programmatically in Crystal Reports?

有没有办法在 Crystal 报告中以编程方式 suppress/hide 一个部分???

我需要在 Crystal Reports when Change Text in one textbox

中隐藏一个部分

谢谢

在您的代码隐藏文件中添加以下代码

    CrystalDecisions.CrystalReports.Engine.ReportDocument doc=your 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;