Re: Run report from form

From: Scott Mattes <Scott_at_TheMattesFamily.ws>
Date: Mon, 12 Jan 2004 17:08:49 GMT
Message-ID: <Xns946E7BACC61B8ScottatTheMattesFami_at_24.48.107.54>


[Quoted] "Giordano Torelli" <giordanotorelli_at_yahoo.it.invalid> wrote in news:btuhs8$n4t$1_at_grillo.cs.interbusiness.it:

> Hello to everybody!
>
> I need to run a report from a form, developed with Oracle Forms
Builder.
> To do this I have created a button with a trigger on the event
> WHEN-BUTTON-PRESSED, with the following PL/SQL code:
>
> DECLARE
> repid REPORT_OBJECT;
> v_rep VARCHAR2(100);
> rep_status varchar2(20);
> BEGIN
> :GLOBAL.PROJECT_PATH:='c:\my_work_path\';
> repid := find_report_object('ru.RDF');
> v_rep := RUN_REPORT_OBJECT(repid);
> END;
>
> Forms Builder compile this, but when I run my form and I click on the
> button, the following error message is displayed:
>
> FRM-41219: Impossible to find the report: ID not valid.
>
> Can you help me to solve this problem?
> Thanks, regards,
>
> Giordano

In the help for RUN_REPORT_OBJECT it says



Syntax

FUNCTION RUN_REPORT_OBJECT
  (report_id REPORT_OBJECT
);

Built-in Type unrestricted procedure
Returns VARCHAR2
Enter Query Mode yes

Parameters

report_id Specifies the unique ID of the report to be run. You can get the report ID for a particular report using the built-in FIND_REPORT_OBJECT. Usage Notes

n Returns a VARCHAR2 value that uniquely identifies the report that is running either locally or on a remote report server. You can use this report ID string as a parameter to REPORT_OBJECT_STATUS , COPY_REPORT_OBJECT , and CANCEL_REPORT_OBJECT.


I think that you have to Add a Report in the Object Navigator first, then you can reference that. Received on Mon Jan 12 2004 - 18:08:49 CET

Original text of this message