Reputation: 13
I cannot seem to get a HANA Stored Procedure to work with input parameters in SSRS by passing parameters via CALL:
Actuaaly my problem is either SSRS or the ODBC driver is having a problem sending/receiving the parameter value.
Other attempts at syntax: call "sp_getdata"() , call "sp_getdata"(?) , call "sp_getdata"(regid) , call "sp_getdata"(@regid)
None of these worked.
If I call the procedure with a hard coded value i.e. call "sp_getdata"(5) - it works.
Again, if the stored procedure has no parameters it works fine.
Can anyone give me any real direction on this issue. A sample of the correct syntax or a step by step example would really be appreciated.
Upvotes: 1
Views: 928
Reputation: 1
I have gotten this to work by setting the Dataset query to text with a format such as : CALL DBNAME.SPROCNAME (?, ?, ?, ?, ?, ?, ?, ?);
In the Parameters tab of the Dataset, you add multiple parameters each named ?, mapped to a Parameter Value.
Upvotes: 0
Reputation: 10880
Create the syntax in the Dataset Expression from the Parameter instead of letting SSRS insert the parameter call "sp_getdata"(?)
Use the Expression in the Dataset's Command Text box.
="Call " & CHR(34) & "sp_getdata" & CHR(34) & "(" & Parameters!REG_ID.Value & ")"
The resulting text passed to the server would be (with X for the number):
Call "sp_getdata"(x)
Upvotes: 1