How to call a stored procedure in crystal report

2019-07-06 18:38发布

问题:

Using Crystal Report 7

I want to call a stored procedure in Crystal Report.

How to do it?

回答1:

Add the stored procedure into your report; like you would add a table.

Add the parameters the stored procedure needs to run; as parameters with exactly the same name they have on the stored procedure.

So if the SP had two parameters, @PARAM1 and @PARAM2 you would need these same paramaters (name, type etc) in your report.

Crystal will allow you to use the SP returned fields like any normal table's fields.