This is a migrated thread and some comments may be shown as answers.

Conditional Formating

1 Answer 169 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 04 Dec 2013, 02:18 PM

I have a crosstab that displays financials over three time periods (year, month, week) this is the first column group. The next  sub column group is actual vs forecast. The aggregate column for this  takes  max(field.value) - min(field.value) to determine the variance between actual and forecast.


I need to figure out either how to conditionally format this field to show whether the variance is favorable or unfavorable (probably with color)



I need to write the expression to subtract



(fields.value Where fields.type = actual) - (fields.value Where fields.type = forecast)



with this the result would be negative if unfavorable.





Basically I need to create case or switch statements for conditional formatting and format string values can this be done either through the expression editor or through the backend C# code behind page.

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 09 Dec 2013, 12:58 PM
Hello Daniel,

The Crosstab item has a ConditionalFormatting property which lets you dynamically style report items based on rules that you define in the Conditional Formatting Rules Dialog. Each formatting rule contains an Expression which provides great flexibility when controlling the styles. In case this flexibility is not enough in your scenario, you can write a custom User Function and use it in the expression.

If you need additional assistance, please open a support ticket where you can elaborate further on your scenario by sending us a sample project/report definition, screenshots or other helpful information, so we can advise accordingly.

Regards,
Nasko
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
Daniel
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or