change shape brush color in runtime

Stimulsoft Reports.NET discussion
Post Reply
Mpanal
Posts: 43
Joined: Thu Sep 07, 2006 11:28 am
Location: Spain

change shape brush color in runtime

Post by Mpanal »

Hello,

How i can change the brush color of a shape in runtime?

And, How I can change the page of a subreport in runtime?

Thank you
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

change shape brush color in runtime

Post by Jan »

Hello,
How i can change the brush color of a shape in runtime?
You can use following code:

Code: Select all

Shape1.Brush = new StiSolidBrush(Color.Red);
How I can change the page of a subreport in runtime?
Place following code in BeforePrintEvent of sub report component:

Code: Select all

SubReport1.SubReportPage = subReport_1;
Thank you.
Mpanal
Posts: 43
Joined: Thu Sep 07, 2006 11:28 am
Location: Spain

change shape brush color in runtime

Post by Mpanal »

Code: Select all

Shape1.Brush = new StiSolidBrush(Color.Red);
Ok
How I can change the page of a subreport in runtime?

Place following code in BeforePrintEvent of sub report component:

Code: Select all

SubReport1.SubReportPage = subReport_1;
Using this works but the page of the subreport is printed as subreport and also as alone page. I don't want this second page

Thank you

Mpanal
Posts: 43
Joined: Thu Sep 07, 2006 11:28 am
Location: Spain

change shape brush color in runtime

Post by Mpanal »



Self answering me,

Setting the Enabled property of all the pages of subreport to false works as I like.

Thank you
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

change shape brush color in runtime

Post by Andrew »

This is very good - you solved your problem yourself!
Post Reply