August 22, 2008 at 2:46 am
Hello
I have a query with several conditons (eg. where field1 >=300 or (tableA field2 <> tableB Field2) ), the query runs fine and retuns the result set i want.
What i want to achive is to have a color flag when a certain conditon is met when the report is run.
In others words, when field1 >=300 returns a result of over 300, the field box should flag red,
when (tableA field2 <> tableB Field2) is met, the field box should flag Orange.
Can anyone help?
August 26, 2008 at 3:13 am
Hi There
In others words, when field1 >=300 returns a result of over 300, the field box should flag red,
when (tableA field2 <> tableB Field2) is met, the field box should flag Orange.
This is pretty easy to do, you should go to the properties area of the text box you want to change, then go to thew Colour property and open up the expression box. In the expression you should create something like the following:
=IIF(Fields!Field1.Value >= 300, "Red", IIF(Fields!TableAField2.Value <> Fields!TableBField2.Value, "Orange", "Black" ))
In the above example, black is the default, you can keep adding nested IIF statements after the "Orange" though.
Regards,
Nigel West
UK
October 16, 2009 at 6:04 pm
In my report, one column/cell is grouped by products and it children are sales, dept, employees, etc.
Now I only want to change color of dept cell to red if count is over 70.
Also, I only want to change color of sales cell to black if count is over 120.
Below is an example that changes color of dept cell to red if count is over 70, the only problem
is it only works since all other cell count values are below 70,
I cannot force it to check if cellname is dept, then if count is over 70 cellname is dept.
If both conditions are met, change color to red.
Any suggestions ?
===
=Switch
(
Count(Fields!Dept.Value) > 70, "Red",
Count(Fields!Dept.Value) < 9, "Transparent",
True, "Transparent"
)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply