1
votes

I created a stored procedure in SQL Server. It works fine there.

When I call it from Crystal Reports, it shows parameters fields but it does not show the outputs in database fields. Actually it shows the stored procedure in database fields but not the output fields or + sign beside the stored procedure.

Here is the codes in stored procedure:

CREATE PROCEDURE [test]
           @mcode char(10),
           @zcode [int], 
           @odolmas[float]=0 output,
           @gmas[float]=0 output,
           @vmas[float]=0 output          
AS
       set @gmas=0
       set @vmas=0
       set @gmas=9
       set @vmas=5

       set @odolmas=((@vmas-@gmas)/2)
GO

In Crystal Reports I can see the @mcode and @zcode as input parameters. But I cannot see @gmas, @vmas and @odolmas as outputs.

Please help me do it and because I am not professional please say it step by step what should I do

Thanks

1

1 Answers

2
votes

When we execute the stored procedure shown in your question, we won't get any output. Try using the select statement inside your stored procedure, the return values will be seen by crystal report.

Say for example Select @gmas as Col1, @vmas as Col2 in your procedure at the end, may show the fileds as col1 and col2. You can place these col1 and col2 on your report for display purpose.