Zolf
asked on
SSRS - Change colour of row based on column value
Do you have mapping of Receipt Number to Color ??
ASKER
Thanks for your comments
No I do not have anything specific to map it.
I tried something like this, but not what I wantÂ
No I do not have anything specific to map it.
I tried something like this, but not what I wantÂ
=IIf(Fields!receiptno.Value = Previous(Fields!receiptno.Value), Nothing, Fields!receiptno.Value)
How you decide which color for which receipt ??
I am not sure whether this is correct solution. But what you can do it go to text box property and click on Fill go to expression and define the color expression. Sample is shown in screenshot. Also refer the rdl file attached. You can just change DB Connection. ChageRowColor.rdl
ASKER
Thanks for your comments.
I tried with this expression, please see screenshot
How you decide which color for which receipt ??I need to check when the next receipt number starts or when the first receipt number ends. Then accordingly change the colour.
I tried with this expression, please see screenshot
=IIF(RUNNINGVALUE(Fields!receiptno.Value, COUNTDISTINCT,"detailproductandrawmaterialtransaction") MOD 2 = 0,"Yellow","White")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ASKER
I have added another expression for the receiptno. this time not in the textbox properties fill BUT in the expression itself of the table column for receipt no
What it does is it removes the receipt no to repeat itself and just show once. This works properly. see screenshot for exactly the same place where I pointed to the issue above of not changing colour.
=IIf(Fields!receiptno.Value = Previous(Fields!receiptno.Value), Nothing, Fields!receiptno.Value)
What it does is it removes the receipt no to repeat itself and just show once. This works properly. see screenshot for exactly the same place where I pointed to the issue above of not changing colour.
You are not getting result as expected because you might have same Receipt number in other page. Hence your distinct count is not changing. Due to that your color is not changing. You can see in below example.
804 is already there in the data so color didn't change.
804 is already there in the data so color didn't change.
ASKER
Thanks for your comments. Any solution to this issue??
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks a lot!!