Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Help with Conditional Formatting Expression

Author  Topic 

jrapp
Starting Member

9 Posts

Posted - 2005-01-27 : 19:23:07
I've been fighting with RS to get fields to conditionally format the ffield based on the value displayed. For example: =IIF(Fields!Date.Value ="", "Unknown Date", Format(Fields!PolicyDate.Value, "D"))
which produces #Error instead of the desired formatted date if the a date is provided. In addition, have tried conditional formating in the field's format properties with the following expression: =IIF( Fields!PolicyDate.Value ="", "", Format(Fields!PolicyDate.Value, "D"))
again with no luck. Any ideas?

jhermiz

3564 Posts

Posted - 2005-01-27 : 22:32:55
quote:
Originally posted by jrapp

I've been fighting with RS to get fields to conditionally format the ffield based on the value displayed. For example: =IIF(Fields!Date.Value ="", "Unknown Date", Format(Fields!PolicyDate.Value, "D"))
which produces #Error instead of the desired formatted date if the a date is provided. In addition, have tried conditional formating in the field's format properties with the following expression: =IIF( Fields!PolicyDate.Value ="", "", Format(Fields!PolicyDate.Value, "D"))
again with no luck. Any ideas?




You can try this:

=IIF(IsNull(Fields!PolicyDate.Value), "N/A", Format(Fields!PolicyDate.Value, "D"))

Or

=IIF(Len(Fields!PolicyDate.Value) > 0, Format(Fields!PolicyDate.Value, "D"), "N/A")




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

jrapp
Starting Member

9 Posts

Posted - 2005-01-28 : 11:09:33
The second one worked! Thank you!!!!!!!!!
Go to Top of Page
   

- Advertisement -