SSRS Expression error

Posted on 2011-05-06
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.
Question by:sbdt8631
    LVL 22

    Accepted Solution

    fields!MonthSales1 refers to the field, which is an object. Not the value of an object try using:
    LVL 1

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now