I have a local Reporting Services report that I am modifying to use a stored procedure.
Although I am executing a stored procedure in the dataset query window, I also have to run a SELECT statement to retrieve the fields from a table that will populate the report.
The code that I have in the dataset query window looks like the following:
EXECUTE @.retCode = RunClaimVerification @.parmID, @.parmDate, @.parmRecordID OUTPUT
SELECT *
FROM ClaimsDetail
WHERE ClaimRecordID = @.parmRecordID
When I execute this code, the only results that are returned SEEM TO BE the return code associated with running the stored procedure.
I thought about putting the SELECT code in the stored procedure and returning a table or a cursor from the stored procedure BUT it looks like tables are not supported as Report Parameter data types.
The stored procedure code generates Claim data that is stored in a SQL Table. The fields in this SQL table need to be retrieved by a unique record id to populate the fields in the report.
Does anybody have any suggestions as to how to go about doing this OR any suggestions that would help me resolve this problem?
Reporting Services only allows one result (table or the return value of a stored procedure) to be retrieved per query. This is the reason that only the return code seems to be included in the dataset. Also, out parameters for stored procedures are not supported in Reporting Services.
Try changing the stored procedure to also Select the data from the ClaimsDetail table, and return the resultant table instead of the return code. However, don't set the return value to a parameter--just execute the stored procedure. This should produce a dataset containing the results of the Select statement.
Ian
No comments:
Post a Comment