I posted this last week, and no one answered :-( If at first you don't
succeed...
************************************************************
I am trying to use the following expression to establish the default
value for a parameter:
="SELECT DefLib FROM Users WHERE (UserName = SUBSTRING('" & User!UserID
& "', 6, LEN('" & User!UserID & "') - 5))"
The User!UserID resolves as the domain\username or "AERO\username"
When I run the report with this expression in the default value of the
parameter, I get the error:
An unexpected error occurred in Report Processing.
Input string was in the wrong format.
I can use the following query in SQL Query Analyzer to successfully
return all records (or a specific record if I substitute an actual
username).
SELECT DefLib FROM Users WHERE (UserName = SUBSTRING('Aero\' +
UserName, 6, LEN('Aero\' + UserName) - 5))
The return value DefLib is type Int... The value field for the
parameter is also an integer. Why would I receive this error if the
datatypes are the same?
TIA,
FerdBump - Anyone have any ideas?
Ferd Biffle wrote:
> I posted this last week, and no one answered :-( If at first you don't
> succeed...
> ************************************************************
> I am trying to use the following expression to establish the default
> value for a parameter:
> ="SELECT DefLib FROM Users WHERE (UserName = SUBSTRING('" & User!UserID
> & "', 6, LEN('" & User!UserID & "') - 5))"
> The User!UserID resolves as the domain\username or "AERO\username"
> When I run the report with this expression in the default value of the
> parameter, I get the error:
> An unexpected error occurred in Report Processing.
> Input string was in the wrong format.
> I can use the following query in SQL Query Analyzer to successfully
> return all records (or a specific record if I substitute an actual
> username).
> SELECT DefLib FROM Users WHERE (UserName = SUBSTRING('Aero\' +
> UserName, 6, LEN('Aero\' + UserName) - 5))
> The return value DefLib is type Int... The value field for the
> parameter is also an integer. Why would I receive this error if the
> datatypes are the same?
> TIA,
> Ferd
No comments:
Post a Comment