I am working on SSRS 2008 for creating a simple list report. I created a Calculated field which results in two values either New or Renewal for rows.
=iif (LEFT (Fields!ProductShortName.Value, 5)= "Renew" or LEFT (Fields!ProductShortName.Value, 2)= "TR" or LEFT (Fields!ProductShortName.Value, 2)= "XR" or LEFT (Fields!ProductShortName.Value, 3)= "WOW" or LEFT (Fields!ProductShortName.Value, 3)= "Gra" or LEFT (Fields!ProductShortName.Value, 3)= "CTr" ,"Renewal", "New")
I want to further filter the data by excluding the data where the Value is "Renewal" and MaturityDate is null
For that purpose I created another calculated field:
=iif (Fields!New_Renew.Value = "Renewal" and
Fields!MaturityDate.Value <> "" or
Fields!New_Renew.Value = "New", cdbl(1),cdbl(0))
And then filter this field by 1. I get a blank report when I run it. Can anyone please suggest an appropriate coding for my requirement?
NULL is not the same as an empty string. NULL is an unknown value thus cannot be evaluated.
Try:
=IIF(
(Fields!New_Renew.Value = "Renewal" AND IsDate(Fields!MaturityDate.Value))
OR Fields!New_Renew.Value = "New",
cdbl(1),
cdbl(0)
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.