SAP Knowledge Base Article - Public

1542567 - How to use Overloaded procedure in Crystal Report

Symptom

How to use Overloaded procedure in Crystal Reports

Environment

  • Crystal Reports XIR2
  • Crystal Reports 2008
  • Oracle10g

Resolution

  1. In Crystal Report designer click on Database tab--> Database Expert-->Select Oracle DSN and select "Add Command".
  2. We can write the procedure in "Add Command" of Crystal Reports.
  3. We can use the required parameters and select particular fields from the report in the sample code of procedure.     
  4. Below is the sample code of the procedure:

          create or replace procedure test_prcProc_in_procedure
          (
          vid number,
          vname varchar2,
          overload_cur in out overload.overload_cursor
          )
          as
          begin
          if vname is null then
          open overload_cur for
          select name from tbloverload where id=vid;
          elsif vid is null then
          open overload_cur for
          select id from tbloverload where name=vname;
          else
          open overload_cur for
          select id,name from tbloverload where id=vid and name=vname;
          end if;
          end;

Keywords

Overloaded procedures , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports all versions