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

  • Question

  • 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.


    Robert Boccone
    Monday, September 26, 2011 3:07 PM

Answers

  • I had a similar error that was corrected by deletion of BIDS' "*.rdl.data" temporary file.
    Tuesday, April 10, 2012 1:18 AM
  • 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.
    I work to UK time. If this post, or another, answers your question, please click the 'Mark as answer' button so others with the same problem can find a solution more easily.
    • Marked as answer by robboc Tuesday, September 27, 2011 6:06 PM
    Tuesday, September 27, 2011 5:05 PM

All replies

  • Does it tell you where in the report the error is happening; a particular text box or item? What does that location contain?
    I work to UK time. If this post, or another, answers your question, please click the 'Mark as answer' button so others with the same problem can find a solution more easily.
    Monday, September 26, 2011 4:12 PM
  • 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.
    Robert Boccone
    Monday, September 26, 2011 5:26 PM
  • did you write any vb expression calculator which has type conversion ?
    Gaur
    Monday, September 26, 2011 5:31 PM
  • 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.

     


    Robert Boccone
    Monday, September 26, 2011 5:42 PM
  • 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


    I work to UK time. If this post, or another, answers your question, please click the 'Mark as answer' button so others with the same problem can find a solution more easily.
    Tuesday, September 27, 2011 8:02 AM
  • 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


    Robert Boccone
    Tuesday, September 27, 2011 2:02 PM
  • 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.
    I work to UK time. If this post, or another, answers your question, please click the 'Mark as answer' button so others with the same problem can find a solution more easily.
    • Marked as answer by robboc Tuesday, September 27, 2011 6:06 PM
    Tuesday, September 27, 2011 5:05 PM
  • 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


    Robert Boccone
    Tuesday, September 27, 2011 6:13 PM
  • 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


    I work to UK time. If this post, or another, answers your question, please click the 'Mark as answer' button so others with the same problem can find a solution more easily.
    Wednesday, September 28, 2011 8:09 AM
  • I had a similar error that was corrected by deletion of BIDS' "*.rdl.data" temporary file.
    Tuesday, April 10, 2012 1:18 AM
  • Thanks BillVo! Almost on the path to rebuild the report.. Deleting the *.rdl.data file in the report project folder resolved the issue.
    Thursday, October 25, 2012 2:53 PM
  • 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.
    Friday, January 4, 2013 6:44 PM
  • Delete the old .data file.  Nice!  Thanks.


    Jeremy Sechler

    Wednesday, March 26, 2014 7:05 PM
  • worked like a charm
    Friday, February 20, 2015 6:35 PM
  • It's now 2016 boys and this solution still works like a charm.  Thank you for saving me hours of work.


    AT

    Monday, March 7, 2016 1:39 AM
  • Thanks, BillVo, for coming up with a workaround for yet another Microsoft bug.

    6 years later and this BUG is still causing issues while Microsoft doesn't even want any bug reported in Connect anymore. Apparently they got tired of marking them as WAD of Won't Fix.

    Friday, July 14, 2017 9:24 PM
  • It is not a bug, .data file is cached locally under development from VS. As long as the parameters are not changing, VS will try to use the file for rendering. If by chance the data type changed from the time .data was built and now, we may get that error.  
    Friday, July 14, 2017 9:37 PM
  • So deleting the .data file should force a rebuild of the .data and fix the problem - Is that what you're suggesting?

    I can't test this myself as we no longer use SSRS - we've moved on to Tableau. I do love these old threads popping into my inbox now and again - helps to remind me why we moved on. No doubt I'll be posting the same on their user forums in years to come!

    Ray (aka Rapier)


    • Edited by Ray Lashley Saturday, July 15, 2017 11:08 AM
    Saturday, July 15, 2017 10:41 AM
  • Worked, thanks! You save me quite some work. 

    Still an hour lost. MS please fix these things. This happens too often. 


    Thanks, Edgar Walther

    Wednesday, August 9, 2017 11:33 AM