If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Stored Procedures and Passing Parameters

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-10, 13:47
multiviper multiviper is offline
Registered User
 
Join Date: Feb 2010
Posts: 0
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.
Reply With Quote
  #2 (permalink)  
Old 02-16-10, 07:17
mishaalsy mishaalsy is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On