Conversion from type 'CalculatedFieldWrapperImpl' to type 'Integer' is not valid._

Hi,

I'm using SSRS 2008 to create a relatively simple report with a stored procedure as the dataset. The SP runs fine (no errors) but when I try to run the report I get "Conversion from type 'CalculatedFieldWrapperImpl' to type 'Integer' is not valid. " error message. The data type is declared as int in SQL. I'm using several other int fields in the report without a problem.  Anyone familiar with this error?  Thanks.

September 26th, 2011 6:07pm

Does it tell you where in the report the error is happening; a particular text box or item? What does that location contain?
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2011 7:12pm

The value is mapped to a text box on in a tablix.  There are no special formats or properties for the text box. Pretty much all defaults.
September 26th, 2011 8:26pm

did you write any vb expression calculator which has type conversion ?
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2011 8:31pm

Not that I know of. See below. The properties window of the text box and the dataset.  It's a straight mapping of a field. No calculations.

 

September 26th, 2011 8:42pm

Problems with conversions are usually due to mixing data types in expressions, but that doesn't look like the case here. Can you post the full error message? There may be more clues there. In general, I advise posting as much information as possible; better a few red herrings than missing a vital piece of information.


Ray

Free Windows Admin Tool Kit Click here and download it now
September 27th, 2011 11:02am

Sure:

Warning 2 [rsInvalidExpressionDataType] The Value expression used in textrun ‘ONOrder.Paragraphs[0].TextRuns[0]’ returned a data type that is not valid. ...\Purchasing Reports\IO Modules Requirements.rdl 0 0 

Most of the research I've done suggests this is related to multi-value parameters.  This report doesn't use ANY parameters.  The data comes directly from a SQL SP.   

-r

September 27th, 2011 5:02pm

Hmm, my research also suggests multi-value parameters may be the cause, but you say there aren't any in the report. These sings can sometimes be generated automatically though, even if you haven't knowingly created one. You could try checking the .rdl file directly (if you're using BIDS, just go to View > Code, otherwise load the report into wordpad or similar) and searching for the term 'Parameter' to see if there is anything there. Otherwise, I'm afraid I'm getting a bit lost for ideas too.
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2011 8:05pm

No clues in the code. I came across a site that discussed a similar problem. After exhausting every idea he had the developer simply rebuilt the report from scratch. Not the most technically savy idea but it worked for him, and appears to have worked for me. I still get the warning messages but the report runs correctly whereas my original report got the same warnings but didn't return data for that column.

Thanks very much for your time and ideas.

 

-r

September 27th, 2011 9:13pm

That's a rather strange solution. It might well be worth raising a bug report: http://support.microsoft.com/gp/contactbug. keep both .rdl files as they may well hold the key.

Ray

Free Windows Admin Tool Kit Click here and download it now
September 28th, 2011 11:09am

I had a similar error that was corrected by deletion of BIDS' "*.rdl.data" temporary file.
April 10th, 2012 4:18am

Thanks BillVo! Almost on the path to rebuild the report.. Deleting the *.rdl.data file in the report project folder resolved the issue.
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2012 5:53pm

I'd like to say thanks too... I'm working around a predecessors ehm code and was doing some on the fly parameter calculations that I was suspecting, tried the change Sum to Count option with no result... deleting the .data file in the file directory of the report fixed it somehow, frustratingly weird that that's the fix, but at least I can move on to relevant work now.
January 4th, 2013 9:44pm

Delete the old .data file.  Nice!  Thanks.

Free Windows Admin Tool Kit Click here and download it now
March 26th, 2014 10:05pm

worked like a charm
February 20th, 2015 1:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics