Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3424
  • Last Modified:

Calling Oracle 9i Report within Oracle 9i form with: RUN_REPORT_OBJECT

I'm working in Oracle 9i forms and reports and am currently debugging both on my local machine.
As usual I start up the "OC4J Server" on my local machine then I start up Oracle forms Developer
and bring up my first form in the application.  Their is a button on this first form that is attempting
to open up a Oracle report with the "Run_Report_Object" function.  

All of my forms and reports are in the same directory.  I recently had to add the FORMS90_PATH
so that my app knew that my fmx files were in my directory.  Is there a similiar variable that needs
to be added so that it is known where my compiled reports are?

This is the error that is displayed when the pl\sql code is executed:
>> FRM-41219: Cannot find report: invalid ID.

This is the code that I have:

DECLARE

   al_id            Alert ;
   al_button      NUMBER;
   PARAM_LIST_ID      PARAMLIST;
   PARAM_LIST_NAME      VARCHAR2(20) := 'REPORT_PL';
   qc_ue_prob_lst_rpt FORMS4C.REPORT_OBJECT;
   varchar_return VARCHAR2(20);

BEGIN

   PARAM_LIST_ID := GET_PARAMETER_LIST(PARAM_LIST_NAME);
   IF NOT ID_NULL(PARAM_LIST_ID) THEN
      MESSAGE( 'Parameter List ' || PARAM_LIST_NAME || 'already exists.' );
      RAISE FORM_TRIGGER_FAILURE;
   END IF;

   PARAM_LIST_ID := create_parameter_list(PARAM_LIST_NAME);
   IF ID_NULL(PARAM_LIST_ID) then
      MESSAGE( 'PARAMETER_LIST' || PARAM_LIST_NAME || 'Cannot be created.' );
      RAISE FORM_TRIGGER_FAILURE;
   END IF;  
         
   ADD_PARAMETER( PARAM_LIST_ID, 'P_RPT_KEY', TEXT_PARAMETER, :GLOBAL.RPT_KEY);      
   ADD_PARAMETER( PARAM_LIST_ID, 'P_EXEMPTN_NO', TEXT_PARAMETER, :GLOBAL.EXEMPTN_NO);      
   ADD_PARAMETER( PARAM_LIST_ID, 'P_START_QTR', TEXT_PARAMETER, :GLOBAL.START_QTR);
   ADD_PARAMETER( PARAM_LIST_ID, 'P_START_YR', TEXT_PARAMETER, :GLOBAL.START_YR);
   ADD_PARAMETER( PARAM_LIST_ID, 'PARAMFORM', TEXT_PARAMETER, 'NO');
   ADD_PARAMETER( PARAM_LIST_ID, 'BACKGROUND', TEXT_PARAMETER, 'NO');
   ADD_PARAMETER( PARAM_LIST_ID, 'ORACLE_SHUTDOWN', TEXT_PARAMETER, 'Yes');
   
   qc_ue_prob_lst_rpt := find_report_object( 'qc_ue_prob_lst' );
   varchar_return := run_report_object( qc_ue_prob_lst_rpt, PARAM_LIST_NAME );        
   DESTROY_PARAMETER_LIST(PARAM_LIST_ID);
EXCEPTION
   WHEN OTHERS THEN
   MESSAGE('Internal error occurred in WHEN-BUTTON-PRESSED trigger');
   RAISE FORM_TRIGGER_FAILURE;
END;

0
wesunivofmd
Asked:
wesunivofmd
  • 10
  • 7
1 Solution
 
schwertnerCommented:
The error message frm-41219 is a new error code which corresponds to the
Oracle Developer forms/report integration.  
 
This message essentially means that the report cannot be found.  Specifying the
correct name of a report object found in the forms object navigator (not the
actual name of the rdf file) usually resolves the problem.
 
See
http://www.dbasupport.com/oracle/ora10g/deploying_reports.shtml
0
 
wesunivofmdAuthor Commented:
Schwertner,

I already know that the report cannot be found.

The error states:
>> FRM-41219: Cannot find report: invalid ID.

Then you say:
>> This message essentially means that the report cannot be found

I know this, but what is the name of the report object, if it's not the name of the rdf file?
Is there some built in oracle function where I pass the name of the rdf file and it returns
the report object name that I need to use to pass to the run_report_object function?

The url that you provided is broken, I am unable to bring up the page.

Thank you,
Wes
0
 
paquicubaCommented:
I've seen that error several times. I bet you that you're trying to use the filename << PATH\<name>.RDF >> instead of the name under report node.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
paquicubaCommented:
Put a code like the one below in your button and you should be OK:

declare
repid report_object;
v_rep varchar2(100);
rep_status varchar2(20);
begin
      repid := find_report_object('<TYPE_HERE_JUST_THE_REPORT_NAME_UNDER_REPORT_NODE>');
      v_rep := run_report_object(repid);
      end;
0
 
wesunivofmdAuthor Commented:
I still get the same error Paquicuba.  My code is right here:

 -- i declare like this
repid report_object;
v_rep varchar2(100);

--and call like this, qc_ue_prob_lst is the name of the report w/o the .rdf
--i get the exact same error: FRM-41219: Cannot find report: invalid ID.
repid := find_report_object( 'qc_ue_prob_lst' );
v_rep := run_report_object( repid );

Any other suggestions, before when I had this similiar problem, (when it wouldn't find
my forms) I had forgotten to set the forms90_path variable to where all my fmx files are,
could this be a similiar problem?
0
 
paquicubaCommented:
Go to Forms Builder, open your form and under 'Report Node' check that the name of the report is 'qc_ue_prob_lst' .
0
 
wesunivofmdAuthor Commented:
Yes it is.
0
 
paquicubaCommented:
Can you post the values in the property palette?
0
 
wesunivofmdAuthor Commented:
In my form called: QC_RPT_SELC under the report node
is the report named: QC_UE_PROB_LST and its values are
as follows:

NAME:
QC_UE_PROB_LST
FILENAME: U:\Common\Wesley\ASR\ASR_9i\qc_ue_prob_lst.rdf
EXECUTION MODE:
BATCH
COMMUNICATION MODE:
SYNCHRONOUS
DATA SOURCE DATA BLOCK
<NULL>
REPORT DESTINATION TYPE:
FILE



0
 
paquicubaCommented:
Why are you using BATCH? Are you using graphics?
0
 
wesunivofmdAuthor Commented:
No, this was just the default that was selected after I brought it in from when it was
a form from an older version of Oracle.  I just changed it to runtime and compiled
and ran but now I'm getting the error:

REP-0503: You did not specify the name of the report.

0
 
paquicubaCommented:
Let's try this:

EXECUTION MODE: RunTime
REPORT DESTINATION TYPE: Screen

0
 
wesunivofmdAuthor Commented:
I still get this error after changing those two parameters in the report node of my form and then
recompiling and ran.

>> REP-0503: You did not specify the name of the report.

I start the "OC4J" server so I can run this Oracle forms\reports application on my local machine.
I start the "OC4J" server from within the Oracle Forms developer.  Is this supposed to be the server
that handles the Oracle Reports as well?  Is there a separate server that needs to be running for the
oracle reports to be run successfully?
0
 
paquicubaCommented:
OC4J instance is enough for testing the report. Once an OC4J instance has been started it acts as lightweight HTTP Listener enabling the developer to test the forms / reports application modules in a true web (even if only intranet) architecture.

Now in your browser it should be: http://<HOST>:8889/reports/<report_name>.jsp?userid=<user_id>/<password>@<DB_Name>
0
 
paquicubaCommented:
Are you upgrading from 6i?

Can you access your report from a web browser?
0
 
paquicubaCommented:
I'm hitting the same error in 10g when using OC4J. I can see the reports from Report Builder but OC4J doesn't handle the request from Forms as that comes in via CORBA.

You need to install a standalone report server and start it explicitly. Also in the property palette you'll have to update report server property to the name of your server.

A workaround will be using web.show_document built-in: http://www.oracle.com/technology/products/forms/pdf/10g/frmwebshowdoc_rep.pdf

0
 
wesunivofmdAuthor Commented:
I want to thank you for all your help.  I think your last response is my problem and will spending today to try to get this up and working.  Is rwserver a server that your familiear with?  Any ideas\links of where I can go to learn about it, if this is a solution for my reports server.

You get the points, Thanks again for your help,
Wes
0
 
paquicubaCommented:
rwserver is a command to install Reports Servers as a service on a Windows machine.
http://www.comp.hkbu.edu.hk/docs/o/dl/bi/B13673_01/pbr_strt.htm

Oracle Application Server Forms and Reports Services 10g (9.0.4x)

you can download it from:

http://www.oracle.com/technology/software/products/forms/index.html

Or
 
Oracle Application Server 10g Release 2 (10.1.2.0.2)

http://www.oracle.com/technology/products/ias/pdf/as10gfaq.pdf


http://www.aliantzinc.ca/902sol_rn/relnotes.902/a96189/toc.htm
http://www.oracle.com/technology/products/ias/daily/oct24.html

Good luck!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 10
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now