1
votes

In SSRS, when I pass hard-coded values to my stored procedure, it works fine. But it doesn't work when I try to pass the parameters.

Can you please tell me the right syntax for calling MySQL stored procedures in SSRS, through an ODBC data source.

Actually, my problem is either SSRS or the ODBC driver is having a problem sending/receiving the parameter value. Other attempts at syntax:

call shop.GetRegions() ,

call shop.GetRegions(?) ,

call shop.GetRegions(regid),

call shop.GetRegions(@regid)

None of these worked. If I call the procedure with a hard-coded value i.e.

call shop.GetRegions(5)

  • it works. Again, if the stored procedure has no parameters it works fine. I Want to know How to call MySQL stored procedure in SSRS Reporting? Can You give me any real direction on this issue?
1

1 Answers

1
votes

I don't really know where to start with this one because there seems to be a lot of things I could mention, but here it goes...

First, I believe you can use MySQL with SSRS, but I'm not sure why you would want to avoid using SQL Server which is meant to work with SSRS. Additional to that, I'm not sure where this call function is coming from? I've never seen that before unless you went with some custom code.

Next, if this is being done in SSRS, you'll need to call the parameter the correct way. The syntax for referencing parameters in SSRS looks like the following Parameters!regid.Value

The reason for attempting to call a procedure this way as opposed to loading the data into a dataset is another thing I'm curious about. The easiest thing to do is a dataset getting values from a stored procedure and that way, SSRS typically handles things like this parameter issue in the dataset properties, rather than explicitly calling the procedure.