Page 1 of 1
Customizing report
Posted: Mon Jul 24, 2006 9:13 am
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.
Customizing report
Posted: Mon Jul 24, 2006 9:46 am
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!