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
Cross-Tab total condition
-
- Posts: 8
- Joined: Wed Sep 11, 2019 9:44 am
Cross-Tab total condition
- Attachments
-
- cross-tab
- Cross-Tab2.png (54.83 KiB) Viewed 2172 times
-
- condition
- Cross-Tab1.png (131.62 KiB) Viewed 2172 times
Re: Cross-Tab total condition
Hello.
Please, select the Totals and set the Conditions there. Thank you.
Please, select the Totals and set the Conditions there. Thank you.
-
- Posts: 8
- Joined: Wed Sep 11, 2019 9:44 am
Re: Cross-Tab total condition
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
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
-
- Posts: 6197
- Joined: Tue Mar 20, 2018 5:34 am
Re: Cross-Tab total condition
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.
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.
-
- Posts: 8
- Joined: Wed Sep 11, 2019 9:44 am
Re: Cross-Tab total condition
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);
}
}
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);
}
}
-
- Posts: 6197
- Joined: Tue Mar 20, 2018 5:34 am
Re: Cross-Tab total condition
Hello,
Thank you for the provided solution.
Thank you for the provided solution.