Customizing report

Stimulsoft Reports.NET discussion
Post Reply
David Borg
Posts: 1
Joined: Mon Jul 24, 2006 9:09 am

Customizing report

Post by David Borg »

Hello!
I have 2 questions to you.
1. My Report has a title page. Sometimes my users want to hide this page. Can you show me some code to demonstrate how can I do that.
2. Is it possible to switch off Even and Odd styles in runtime?
Thanks a lot.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Customizing report

Post by Edward »

David wrote:Hello!
I have 2 questions to you.
1. My Report has a title page. Sometimes my users want to hide this page. Can you show me some code to demonstrate how can I do that.
To disable printing StimulReport.Net page please see following code:

Code: Select all

StiReport report = new StiReport();
report.Load("d:\\MyReport.mrt");
report.Pages["Page1"].Enabled = false;
report.Show();
David wrote:2. Is it possible to switch off Even and Odd styles in runtime?
Thanks a lot.
Yes it is possible to switch off or change style of DataBand in runtime. Please see following code:

Code: Select all

StiReport report = new StiReport();
report.Load("d:\\MyReport.mrt");
(report.Pages["Page1"].GetComponents()["DataBand1"] as StiDataBand).EvenStyle = "";
(report.Pages["Page1"].GetComponents()["DataBand1"] as StiDataBand).OddStyle = "Odd";
report.Show();
Thanks!
Post Reply