SSRS error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chinni0719
    New Member
    • Apr 2008
    • 18

    SSRS error

    i have a stored procedure with a cursor in it...and in the result set its going to produce two o/p tables


    result:

    col1 col2 col3 col4 col5
    Edit false false 5555555555 NULL
    New Record false NULL NULL NULL


    column1 column2 column3 column4 column5
    New Record 6B3 03 31 S01ECC60UNI
    New Record 6B4 03 31 S01ECC60UNI
    New Record 6B5 04 31 n S01ECC60UNI


    when i used this Procedure in SSRS........... ..its producing an error like

    Invalid length parameter passed to the SUBSTRING function.


    but i was able to get result set in management studio with out errors............... .


    n i used in my SP like


    elect @WhereClause5 = @WhereClause5 + ' n.' +
    (Reverse(substr ing(Reverse(Obj ectname), 0, charindex('.', Reverse(Objectn ame))) ) + ' , ') + ' b.' +
    (Reverse(substr ing(Reverse(Obj ectname), 0, charindex('.', Reverse(Objectn ame))) )+ ' , ')
    from dbo.basetable
    where RuleID = @baseObject
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    I think it's because you're starting position on substring is zero.

    -- CK

    Comment

    • chinni0719
      New Member
      • Apr 2008
      • 18

      #3
      eveni tried from 1 i got same error

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        Try putting your entire query in a string and display or output it in a text file. The objective is to get the actual query and run it.

        -- CK

        Comment

        Working...