Crystal Report using 2 store procedures or 1 stored procedure to exec stored procs based on a parameter
Posted on 2013-10-01
I have to make a report using crystal reports 2008. The report has a parameter in which the end user can choose between 2 options - Admitting or Attending.
Base on what is chosen a stored procedure will execute.
I was trying to make one stored proc, that would execute one of 2 stored proc based on a parameter but the problemsis both stored procs have paremeters.
See my SP below it doesnt work.
The last 3 parameters are the ones that are in the stored procedure
ALTER PROCEDURE [Customer].[bhsf_rpt_RunPhyRelSP_FO]
@StartDate Date ,
SET NOCOUNT ON;
If @PatRel = 'Admitting '
Else Execute Customer.bhsf_rpt_Attending_FO
So basically what I am asking is how can I make a stored procudure execute other stored procedures that have paremeters or how can I add to stored procedures to run in crystal reports and have 1 run based on the paremeter that is chosen?