Hello,
I'm new at SSRS and I'm trying to use a Data Source using a Stored Procedure. But the stored procedure to call is different depending on the value selected in one of the parameters (which is a drop down list).
The drop down list values look like "user name|user role". So if the user role is for example "Doctor" I want to call StoredProcA, otherwise call StoredProcB.
So when I set up the Dataset, instead of choosing a specific stored procedure, I click on the fx button to come up with a formula to figure out what Stored Proc to call:
When I click the OK button I get an error with the following: SqlCommand.ComandText property value is an invalid multipart name, incorrect usage of quotes.
Can someone help me out please?
I'm new at SSRS and I'm trying to use a Data Source using a Stored Procedure. But the stored procedure to call is different depending on the value selected in one of the parameters (which is a drop down list).
The drop down list values look like "user name|user role". So if the user role is for example "Doctor" I want to call StoredProcA, otherwise call StoredProcB.
So when I set up the Dataset, instead of choosing a specific stored procedure, I click on the fx button to come up with a formula to figure out what Stored Proc to call:
=
IIF(Split(Parameters!User.Value,"|")(1)="Doctor", StoredProcA, StoredProcB)When I click the OK button I get an error with the following: SqlCommand.ComandText property value is an invalid multipart name, incorrect usage of quotes.
Can someone help me out please?