Wednesday, March 7, 2012

Expression help

Hello Everyone...

Please can you help me with this expression ...

I have two boolean's that I convert to 1's and 0's... I would like to colour the background when they are not equal to each other...

Currently All the values stay green which is wrong.

=Iif (SUM(CDec(iif(Fields!In_or_Not.Value= 0 ,"0" ,"1")) <> (iif(Fields!ND.Value= 0 ,"0" ,"1"))) ,"Red","Green")

Hello,

Why can't you use this way

iif(Fields!In_or_Not.Value <>Fields!ND.Value, "Red", "Green")

Thanks,

Farooq

|||

Because its sum'ing up all the true and false values b 4 you drill down ... its grouped... SQL stores bit's as True and False, I need to do a count of all the trues/Falses and display it as a number ...

Compare the two cloumns and flag it as red if they are not equal.

|||

HI,mrb_bhana@.yahoo.com :

How about suming up the values in the sql statement into a new field?

|||Thanks for your reply ...

What I landed up doing was to create a new column in the table then use an update trigger to do the decision... then it was much easier to get what I wanted in the report

Thanks

No comments:

Post a Comment