Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 27th, 2011, 09:52 AM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
  #2 (permalink)  
Old May 31st, 2011, 01:18 PM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input string was not in a correct format Dwizz VB.NET 2002/2003 Basics 8 April 29th, 2010 05:56 AM
Input String was not a correct format clem99 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 March 15th, 2008 11:01 AM
Input string was not in a correct format. palleti VB.NET 2002/2003 Basics 2 October 17th, 2006 10:38 AM
Input string was not in a correct format. Silfverduk VB.NET 2002/2003 Basics 1 May 20th, 2006 04:58 AM
input string was not in a correct format kunal.net VS.NET 2002/2003 1 October 11th, 2005 12:18 AM



All times are GMT -4. The time now is 07:20 PM.


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