Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2010
    Posts
    0

    Unanswered: Stored Procedures and Passing Parameters

    I have a stored procedure I am trying to use in Crystal Reports

    Code:
    CREATE OR REPLACE PROCEDURE TRACIT_DW.rpt_mileage_month (p_results IN OUT TRACIT_DW.PKG_REPORTS.RPT_CURSOR, p_begin_date IN VARCHAR, p_firm_number IN NUMBER) IS
    
        l_facility_name VARCHAR2(65);
    
    BEGIN
    
        -- get facility name 
        SELECT name
        INTO l_facility_name
        FROM facility
        WHERE facility_number = p_firm_number;
        
        OPEN p_results FOR
            SELECT
                l_facility_name AS facility_name,
                month_id,
                SUM(loaded_mileage) AS total_mileage, 
                AVG(loaded_mileage) AS avg_mileage, 
                COUNT(*) AS total_runs
            FROM
                tracit_dw.ems_data
            WHERE report_period_begin_date = to_date(p_begin_date, 'mm/dd/yyyy')
            AND loaded_mileage < 9999.99
            AND tdh_firm_number = p_firm_number
            GROUP BY 
                month_id;
    
    END;
    When i go to verify the database i get an error
    "Database Connection Error: 'ORA-24338: statement handled not executed
    [Database Vendor Code: 24338]'

    I am guessing that its needing some parameters that don't exist yet or it cant find.

  2. #2
    Join Date
    Aug 2009
    Posts
    262
    i have been using crystal reports 10 .


    the only way around i managed was using refcursor and sys.refcursor .

    any other way the system vomits

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •