SSRS 2008 gives error about invalid datatype returned by a borderwidth expression [Solved]

Answered SSRS 2008 gives error about invalid datatype returned by a borderwidth expression [Solved]

  • Wednesday, March 07, 2012 11:08 AM
     
      Has Code

    Hello, 

    When previewing a SSRS 2008 report I get the error :

    [rsInvalidExpressionDataType] The BorderWidth expression used in text box ‘Textbox2’ returned a data type that is not valid.

    Seems like a logical error if there would be an expression in the 'BorderWidth' section of Textbox2. 

    However, the borderwidth properties are set like "1pt; 1pt; 1pt; 1pt; 1pt" 

    (just for testing I added the 1pt on every side, so default 1pt gives the same result)

    In the code: 

                                        <Border>
                                          <Color>LightGrey</Color>
                                          <Style>Solid</Style>
                                        </Border>
                                        <TopBorder>
                                          <Width>1pt</Width>
                                        </TopBorder>
                                        <BottomBorder>
                                          <Width>1pt</Width>
                                        </BottomBorder>
                                        <LeftBorder>
                                          <Width>1pt</Width>
                                        </LeftBorder>
                                        <RightBorder>
                                          <Width>1pt</Width>
                                        </RightBorder>

    Could there be another reason for this error to still occurring, and how could I solve this?

    Thanks in advance

    Peter Montfrooij


    • Edited by Montfrooij Wednesday, March 14, 2012 2:20 PM
    •  

All Replies

  • Friday, March 09, 2012 3:16 AM
    Moderator
     
     

    Hi Peter Montfrooij,

    Could you please check the Border property for Textbox2?

    1. Right-click Textbox2 and select Text Box Properties.

    2.In the Text Box Properties dialog, navigate Border tab to check the Width expression of this textbox.

    Thanks,
    Lola


    Please remember to mark the replies as answers if they help.

  • Wednesday, March 14, 2012 2:20 PM
     
     Answered

    Thanks for the reply. 

    I think I did supply you with your request in my first post. (the properties are shown However, the borderwidth properties are set like "1pt; 1pt; 1pt; 1pt; 1pt" )

    Nevertheless I did find a solution:

    Close and reopen the project. 

    It seems as if the errors are 'stored' in a some kind of cache, because I remembered doing something 'wrong' with the width property of that textbox a week before, but recovering after getting a warning (without checking if that was the solution because I was needed elsewhere). 

    A week later I continued working on the report, still getting the warning. 

    After posting my first post I had to close the project, to work on another SSRS 2008 project. 

    Today I opened the project that gave the warning, and all is fine. 

    Just did a quick check with another report:

    1. I altered the datasource. (less columns in the query)

    2. On preview I got a warning that the columns were missing. 

    3. Closed the project

    4. Reopened the project. All is fine (nothing else changed). 

    • Marked As Answer by Montfrooij Wednesday, March 14, 2012 2:20 PM
    •