Page 1 of 1

Cross-Tab total condition

Posted: Wed Sep 11, 2019 9:57 am
by mmayasmine
Hello,
I'm using the crosstab component like this attached in file Cross-Tab1.png
For the green cells I set the condition like attached in file Cross-Tab2.png
But i don’t kown how to do the same condition for the red cells wich are vertical and horizontal totals (i have to do this condition for the « S » totals only)
Thanks

Re: Cross-Tab total condition

Posted: Wed Sep 11, 2019 8:31 pm
by HighAley
Hello.

Please, select the Totals and set the Conditions there.
Totals.png
Totals.png (6.05 KiB) Viewed 2687 times
Thank you.

Re: Cross-Tab total condition

Posted: Thu Sep 12, 2019 2:17 pm
by mmayasmine
Hello,

when i set the conditions for the Total as you show me, it is applayed for all lines (E,Q,S) while I need it to be applayed only for the S Line

Re: Cross-Tab total condition

Posted: Fri Sep 13, 2019 2:54 pm
by Lech Kulikowski
Hello,

Unfortunately, there are no other ways.

You can try to use code in events:
https://stimulsoft.zendesk.com/hc/en-us ... -cross-tab

or use Cross-Data instead of Cross-Table.

Thank you.

Re: Cross-Tab total condition

Posted: Mon Sep 16, 2019 12:05 pm
by mmayasmine
Thank you

the issue is resolved by using the proccess cell event on Totals and the code below

if (e.Cell.SummaryIndex==2)
{
decimal value = 0;
if (e.Value is decimal)
{
value = ((decimal)(e.Value));
}

if ((value > 0))
{
((Stimulsoft.Report.Components.IStiBrush)(sender)).Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.LightGreen);
}
if ((value < 0))
{
((Stimulsoft.Report.Components.IStiBrush)(sender)).Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.MistyRose);
}
}

Re: Cross-Tab total condition

Posted: Mon Sep 16, 2019 10:20 pm
by Lech Kulikowski
Hello,

Thank you for the provided solution.