Page 1 of 1

change shape brush color in runtime

Posted: Thu May 20, 2010 10:53 am
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

change shape brush color in runtime

Posted: Fri May 21, 2010 2:53 am
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.

change shape brush color in runtime

Posted: Mon May 24, 2010 5:47 am
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


change shape brush color in runtime

Posted: Mon May 24, 2010 6:14 am
by Mpanal


Self answering me,

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

Thank you

change shape brush color in runtime

Posted: Mon May 24, 2010 8:01 am
by Andrew
This is very good - you solved your problem yourself!