January 10, 2008 at 8:11 am
Okay, this one is confusing because it works for some values and not for others.
I have a text box which displays a money value. I've edited the box and put in the following expression.
=IIF(ltrim(rtrim(Fields!ID03_2007.Value)) = 0
or isnothing(ltrim(rtrim(Fields!ID03_2007.Value))), 0,
Round(Fields!ID03_2007.Value,2))
Now, for specific occurances of the value, I'm getting the error:
[rsRuntimeErrorInExpression] The Value expression for the textbox 'mytextbox' contains an error: Input string was not in a correct format.
Like I said, though, it's not occuring on every row. For example, the report preview looks like the below:
ProductName ID03_2007
cars 200.00
boats 150.00
planes #Error
Where it says "#Error" now, was blank before, hence the isnothing() function in the code. Any thoughts?
January 10, 2008 at 10:19 am
What does the DB say is in the field erroring out? (i.e. what's the value causing the #error?)
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
January 10, 2008 at 10:22 am
Hey Brandie, this looks like a reporting services, not Integration Services question, but I'll give it a shot anyway.
What is being returned by the datasource in the planes row, empty or NULL? If it is null try using :
IIF(Fields!ID03_2007.Value=System.DbNull.Value, 0)
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 10, 2008 at 10:32 am
I thought of that one, and from the little I can see - it looks like that .NET notation doesn't work.... Have you tried to throw on an ISNUMERIC thing to see what happens?
Also - try putting a conversion on the field BEFORE the rounding to make sure you're not getting some kind of odd narrowing conversion failure.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
January 10, 2008 at 10:55 am
Gosh darnit! I had multiple windows open this morning and thought I put this one in the SSRS forum. Sorry all.
But I'll take Matt's suggestion and see if the IsNumeric comes up with anything. Thanks, Matt.
January 10, 2008 at 11:25 am
Jack & Matt,
You were both right. Non-numeric empty string that I couldn't fix on the query side. Had to mask it in the report.
Thanks to both of you and again, my apologies for the mis-post.
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply