By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,378 Members | 1,385 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,378 IT Pros & Developers. It's quick & easy.

SSRS error

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


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(substring(Reverse(Objectname), 0, charindex('.', Reverse(Objectname))) ) + ' , ') + ' b.' +
(Reverse(substring(Reverse(Objectname), 0, charindex('.', Reverse(Objectname))) )+ ' , ')
from dbo.basetable
where RuleID = @baseObject
Apr 16 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 2,878
I think it's because you're starting position on substring is zero.

-- CK
Apr 16 '08 #2

P: 18
eveni tried from 1 i got same error
Apr 17 '08 #3

Expert 2.5K+
P: 2,878
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
Apr 17 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.