Setting Brush Colour of Cross Tab Cell

Stimulsoft Reports.NET discussion
SWhitty
Posts: 13
Joined: Wed Jul 25, 2012 4:00 pm

Setting Brush Colour of Cross Tab Cell

Post by SWhitty »

Hi Guys,
I am trying to dynamically colour rows in a cross tab.
Applying a condition seems to colour all cells in the cross tab based on the final row processed.
I am trying to colour the cross tab cells using code in the Process Cell event of the Cross Tab Summary field. However, the colour is being applied to all Summary fields, not just the current cell.

I have uploaded an example report, the Dictionary is populated on Report Initialisation and used in the condition in Process Cell to determine which colour each row should be coloured.

Could you please let me know if I need to alter the code to only colour the cell?
Attachments
ExampleReport.zip
(2.83 KiB) Downloaded 308 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting Brush Colour of Cross Tab Cell

Post by HighAley »

Hello.

Please, try to use the Conditions property instead of the Process Cell event.

Thank you.
SWhitty
Posts: 13
Joined: Wed Jul 25, 2012 4:00 pm

Re: Setting Brush Colour of Cross Tab Cell

Post by SWhitty »

Aleksey,

Thank you for your response. unfortunately the conditions are not working either. Please see the updated zip file.
The cross tab should be Red, then Yellow, then Green, however, all rows are filled Yellow.
Is there an alternative method you could tell me?

Thank you for your continued Assistance.
Simon
Attachments
ExampleReport.zip
Updated 03/05/2013
(2.97 KiB) Downloaded 316 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting Brush Colour of Cross Tab Cell

Post by HighAley »

Hello.

Sorry for delay with answer. We need some additional time to prepare it for you.

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

Re: Setting Brush Colour of Cross Tab Cell

Post by HighAley »

Hello.

You should use the Tag and Conditions properties of the Cross-Summary.
Please, look at the attached report template.
ExampleReport_modified.mrt
(14.55 KiB) Downloaded 416 times
Thank you.
SWhitty
Posts: 13
Joined: Wed Jul 25, 2012 4:00 pm

Re: Setting Brush Colour of Cross Tab Cell

Post by SWhitty »

Thanks very much. that worked!

Are there any plans to fix the conditions?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting Brush Colour of Cross Tab Cell

Post by HighAley »

Hello.

The problem with conditions is connected with principle of rendering of cross-tab.
It couldn't be fixed now.

Thank you.
pkokkotis
Posts: 15
Joined: Tue Oct 11, 2016 6:41 am

Re: Setting Brush Colour of Cross Tab Cell

Post by pkokkotis »

Considering this issue, I wonder if it is possible to change size and alignment (not only colour) of summary cell, while it is no condition covering those properties.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting Brush Colour of Cross Tab Cell

Post by HighAley »

Hello.

Could you send us a sample report that reproduce the issue?
Please, create a simple report and specify what do you need to change and we will try to find a solution for you.

Thank you.
pkokkotis
Posts: 15
Joined: Tue Oct 11, 2016 6:41 am

Re: Setting Brush Colour of Cross Tab Cell

Post by pkokkotis »

What I need is really general and easy to understand, that I think it is no need of a sample. Let's say, I have 10 columns in a crosstab that have values (0 to 9). Consider that I need to have the same width in columns 0...8 (e.g. width=5), another width in column 9 (e.g. width=10) and another width in column 10 (e.g. width=3). The widths may vary by column value or column display value (e.g. if value == 9 -> width = 10). Is this possible in crosstab? Could it be possible for every property (e.g. if value == 9 -> alignment = center)?
Post Reply