[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SSRS Expression error

Posted on 2011-05-06
2
Medium Priority
?
1,470 Views
Last Modified: 2012-05-11
I get the error
"The value for the expression textbox contains an error [BC30452] 'is not defined for types Microsoft.ReportingServices.ReportingProcessing.ReportObjectModel.Field' and Integer
for the following code in my expression
=IIF(not(isnothing(fields!MonthSales1)) and not(isnothing(fields!MonthSales1_LY)) and fields!MonthSales1_LY > 0,fields!MonthSales1/fields!MonthSales1_LY -1, 0)
=IIF(not(isnothing(fields!MonthSales1))and not(isnothing(fields!MonthSales1_LY)) and fields!MonthSales1_LY <= 0,fields!MonthSales1/fields!MonthSales1_LY -1, 100)

Basically I think the problem is that fields!MonthSales1_LY is null sometimes so when I try to set it greater than 0, I get the error.  I am used to doing this with nested ifs in other packages, but am not how to in SSRS.
0
Comment
Question by:sbdt8631
2 Comments
 
LVL 22

Accepted Solution

by:
Nico Bontenbal earned 2000 total points
ID: 35708042
fields!MonthSales1 refers to the field, which is an object. Not the value of an object try using:
fields!MonthSales1.Value
instead.
0
 
LVL 1

Author Closing Comment

by:sbdt8631
ID: 35708094
Oops
Thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part III
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question