SQL Server Performance

Group expression gives #Error

Discussion in 'SQL Server Reporting Services' started by bubberz, Mar 22, 2006.

  1. bubberz New Member

    I have an expression such as:

    =sum(
    IIF( Fields!QuantityType.Value="LB", Fields!TotalQuantity.Value ,0)
    ,"Grp_Number"

    )

    ....Grp_Number is the grouping where I'm trying to insert this summation / total.

    Under Grp_Number, I have a 2nd grouping by QuantityType, where there's two possible values, LB or NLB. So, a Grp_Number could have possible 2nd groupings of:

    1. only LB

    2. only NLB

    3. both


    The only problem is when there's no LB, then the expression comes back as #Error.

    Any suggestions are welcome!

    Thanks!
  2. simondm New Member

    Is Fields!QuantityType.Value return nulls?

    If so you could try putting an ISNULL around it like:

    =sum(
    IIF(ISNULL(Fields!QuantityType.Value,'')="LB", Fields!TotalQuantity.Value ,0)
    ,"Grp_Number"

    )

  3. smy New Member

    ya, if the field is returning null, the field will render #error, however, if you only see the #error when you are viewing the report on IE, then it will be security issue. Some changes needed to be done on the reporting server's config file...

Share This Page