Setting alternate line collors on Data Band

Stimulsoft Reports.WEB discussion
Post Reply
Paulo Lemos
Posts: 19
Joined: Tue Jan 06, 2015 7:39 pm

Setting alternate line collors on Data Band

Post by Paulo Lemos »

Hi!

I have a collor picker on my form, and want to set the single data band that I have on my report, to alternate the lines background or font collor from transparent, to the collor from my picker.

Is that a way to do it? Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting alternate line collors on Data Band

Post by HighAley »

Hello.

You could create a variable and path the color to it. Then you can use Begin Render event of the Data band and specify all necessary colors there.

Thank you.
Paulo Lemos
Posts: 19
Joined: Tue Jan 06, 2015 7:39 pm

Re: Setting alternate line collors on Data Band

Post by Paulo Lemos »

Thank you Aleksey. I imagined that would be the way to do it, but my question is what's the property that I need to set. If you could spare an example, would be great.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting alternate line collors on Data Band

Post by HighAley »

Hello.

Could you send us a sample where we could see what you need to change exactly? What do you mean under: "the lines background or font collor from transparent"?

Thank you.
Paulo Lemos
Posts: 19
Joined: Tue Jan 06, 2015 7:39 pm

Re: Setting alternate line collors on Data Band

Post by Paulo Lemos »

Aleksey Andreyanov wrote:Hello.

Could you send us a sample where we could see what you need to change exactly? What do you mean under: "the lines background or font collor from transparent"?

Thank you.
Sure Aleksey.

Look for the BeforePrint event in the data band.

Thank you.
Attachments
SampleReport.mrt
(57.17 KiB) Downloaded 286 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting alternate line collors on Data Band

Post by HighAley »

Hello.

If you need to change the backgroud of the Data Band you should set its Brush with code like this:

Code: Select all

ContratosData.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromArgb(255, 183, 221, 232));
Thank you.
Paulo Lemos
Posts: 19
Joined: Tue Jan 06, 2015 7:39 pm

Re: Setting alternate line collors on Data Band

Post by Paulo Lemos »

Thank you Aleksey!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting alternate line collors on Data Band

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any help.

Thank you.
Post Reply