Conditional Formatting

Stimulsoft Reports.NET discussion
Post Reply
Mpanal
Posts: 43
Joined: Thu Sep 07, 2006 11:28 am
Location: Spain

Conditional Formatting

Post by Mpanal »


Hello,

I have a databand with a calculated field that is a summatory of another field on databand. This calculated field is named "saldo"

I want that if the value of the calculated field is positive, their colour be green and if negative, red.

What expression I must have to use?

saldo > 0 don't work : error CS0019

Thanks
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Conditional Formatting

Post by Edward »

Hi

Please change the condition as follows:

MyDataSource.saldo > 0

where MyDataSource is the name of the DataSource in the Dictionary which contains that 'saldo' Calclated Column.

Thank you.
Mpanal
Posts: 43
Joined: Thu Sep 07, 2006 11:28 am
Location: Spain

Conditional Formatting

Post by Mpanal »



Thanks for the answer.

Sorry for the mistake, saldo is not a calculated column. Is a STitext.

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Conditional Formatting

Post by Edward »

Hi

You can write the similar condition to the Conditions property of that StiText.

Thank you.
Mpanal
Posts: 43
Joined: Thu Sep 07, 2006 11:28 am
Location: Spain

Conditional Formatting

Post by Mpanal »

Dont work

My report is:

Field1, field2, field3,... saldo

Saldo is a STItext with running sum(field1). Calculate result be fine. filed1 and saldo can be positive or negative on every row.

The problem is formating color on saldo. If on format conditions, I put expresion sum(field1) > 0 color green and sum(filed1) < 0 color red, the result color depents on the result value of sum(field1) at the finish of report, not on the row.

The same result with sum(field1) and sumrunning(field1)
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Conditional Formatting

Post by Edward »

Hi

Please open attached report in the Demo.exe sample application which comes with a standard installation of Stimulsoft Reports.Net.

Thank you.
Attachments
247.RunningSumAndCondition.mrt
(6.91 KiB) Downloaded 345 times
Mpanal
Posts: 43
Joined: Thu Sep 07, 2006 11:28 am
Location: Spain

Conditional Formatting

Post by Mpanal »


Edward,

Works perfectly.

Thank you very much

:biggrin:
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Conditional Formatting

Post by Edward »

Hi

Please let us know if you need any help.

Thank you.
Post Reply