p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2005 (http://p2p.wrox.com/forumdisplay.php?f=220)
-   -   SSRS - Input string was not in a correct format (http://p2p.wrox.com/showthread.php?t=83797)

aztech2403 May 27th, 2011 09:52 AM

SSRS - Input string was not in a correct format
 
I am trying to hide rows in my report where a certain field is may be blank. I entered the following formula in the "Hidden" properties of the details row in layout:

=Iif(Fields!REVVAL3.Value="",TRUE,
Iif(Fields!REVVAL5.Value="",TRUE,
Iif(Fields!REVVAL6.Value="",TRUE,
Iif(Fields!REVVAL7.Value="",TRUE,
Iif(Fields!REVVAL8.Value="",TRUE,
Iif(Fields!REVVAL9.Value="",TRUE,
Iif(Fields!REVVAL10.Value="",TRUE,
Iif(Fields!REVVAL12.Value="",TRUE,
Iif(Fields!REVVAL14.Value="",TRUE,
Iif(Fields!REVVAL15.Value="",TRUE,FALSE))))))))))

I work for a hotel chain and the "REVVAL...value" represents a UserDefinedField at each property that contains the data I am trying to pull onto the report. In a perfect world, it would be easy if each property had the same UDF field defined for the same data, but that's not the case.

When I run the report, I get this error:
"An error occured during local report processing. The Hidden expression for the table 'table1' contains an error: Input string was not in a correct format.

Can anyone explain what I am doing wrong and what is the correct way to eliminate these rows when this field is blank?

Thank you.[:confused:]

aztech2403 May 31st, 2011 01:18 PM

I found my own solution
 
After playing around with different expressions, I finally came up with one that worked.

The REVVAL fields are part of a "SWITCH" expression called "RebateAmt", where if the property name is this, then use this REVVAL field.

With that in mind, I created this expression and it works perfectly!

=Iif(isnothing(Fields!RebateAmt.Value)or
(Fields!RebateAmt.Value)=0,true,false)


All times are GMT -4. The time now is 09:27 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.