在 Stimulsoft Reports 中通过 c# 代码删除 Band

Delete a Band by c# code in Stimulsoft Reports

我在 ASP.Net WebForms 中有一份 Stimulsoft Reports 的报告。

它有一个 PageHeaderBand 和一个 DataBand。 我想在运行时删除报告的 PageHeaderBand(当用户点击自定义按钮时)

请帮助我。

答案是:

StiReport report = ...;
StiComponent component = report.GetComponentByName("<CustomName>");
report.GetComponents().remove(component);