change color of text in crosstab value by another value

Stimulsoft Reports.NET discussion
Post Reply
michal.schoralek
Posts: 2
Joined: Tue Feb 22, 2011 1:36 pm
Location: Prague, CZ

change color of text in crosstab value by another value

Post by michal.schoralek »

In cross tab there is bound value from dataset called xyDS and in tag there is bound name of color (also from dataset). I want to change color of value by the name of color in tag.

Dataset looks like
Column string
Row string
Value int
Color string

If I use (without using tag, just directly from dataset)
public void CrossTab1_Sum1_GetCrossValue(object sender, Stimulsoft.Report.CrossTab.StiGetCrossValueEventArgs e)
{
this.CrossTab1_Sum1.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromName(xyDS.Color));
}
then the color of all cells (values) is changed by the color in latest record in dataset.

If I use
public void CrossTab1_Sum1_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
{
((StiText)sender).TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromName(((StiComponent)sender).Tag.ToString()));
}
nothing happen.

Is there any way to change color of text cell by cell ?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

change color of text in crosstab value by another value

Post by Alex K. »

Hello,

Please send us your report with sample data for analysis.

Thank you.
michal.schoralek
Posts: 2
Joined: Tue Feb 22, 2011 1:36 pm
Location: Prague, CZ

change color of text in crosstab value by another value

Post by michal.schoralek »

Hello,
there are the files.


Regards,

Michal

Attachments
854.KpiProdWeekDT.xsd
(2.79 KiB) Downloaded 203 times
853.KpiProdWeekDT.xml
(196 KiB) Downloaded 337 times
852.ProdPerWeekByTeam.mrt
(23.81 KiB) Downloaded 377 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

change color of text in crosstab value by another value

Post by Alex K. »

Hello,

Sorry for the delay with response. We need some additional time to check the issue.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

change color of text in crosstab value by another value

Post by Alex K. »

Hello,

Unfortunately, you cannot implement this feature to the Cross-Tab component.
As a way, if the list of color is not very long, then you can set a saparate Condition for each color (if tag == "Blue" then set text color to blue, etc).

Thank you.
guaike
Posts: 5
Joined: Sun Mar 06, 2011 9:44 pm

change color of text in crosstab value by another value

Post by guaike »

Aleksey wrote:Hello,

Unfortunately, you cannot implement this feature to the Cross-Tab component.
As a way, if the list of color is not very long, then you can set a saparate Condition for each color (if tag == "Blue" then set text color to blue, etc).

Thank you.
Hi,i have same problem with this,How to do this step?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

change color of text in crosstab value by another value

Post by Alex K. »

Hello,

Please see tha sample report in attachment.

Thank you.
Attachments
883.Sample.xml
(372 Bytes) Downloaded 396 times
882.SampleReport.mrt
(8.61 KiB) Downloaded 435 times
Post Reply