I am using SSRS 2008 R2 with SQL 2008. I have a report that lists dates that a client uses a service. I have grouped on the client name and the detail is the dates. I am trying to check if a date for a specific client is duplicated. To do that I am using an IIF statement.
=IIF(Fields!SvcDate.Value,"table1_ClientName"=Previous(Fields!SvcDate.Value,"table1_ClientName", "Khaki", "White"))
---------------------
Joe Schmoe 8/1/12
---------------------
John Smith [highlight #FCE94F]8/1/12[/highlight]
8/8/12
If I run this expression without the scope in it, it colors the field correctly, but of course the previous part of this means that if another client directly above has the same date, this expression thinks that is the previous date and I get a background color. So I need to make sure that the colors and the previous criteria are limited to each individual client. The expression above gives an error that says that there is no False part to the statement. So I'm thinking that I have the parentheses wrong somehow, but I can't figure out how to correct it. Can anyone help me out?
=IIF(Fields!SvcDate.Value,"table1_ClientName"=Previous(Fields!SvcDate.Value,"table1_ClientName", "Khaki", "White"))
---------------------
Joe Schmoe 8/1/12
---------------------
John Smith [highlight #FCE94F]8/1/12[/highlight]
8/8/12
If I run this expression without the scope in it, it colors the field correctly, but of course the previous part of this means that if another client directly above has the same date, this expression thinks that is the previous date and I get a background color. So I need to make sure that the colors and the previous criteria are limited to each individual client. The expression above gives an error that says that there is no False part to the statement. So I'm thinking that I have the parentheses wrong somehow, but I can't figure out how to correct it. Can anyone help me out?