?
Solved

FIND_REPORT_OBJECT always return null id

Posted on 2006-03-22
4
Medium Priority
?
4,570 Views
Last Modified: 2013-12-12
Hi Experts,

I wrote this code in Developer 10g to call a report
in the trigger when-button-pressed

declare
      rep_command    varchar2(1000);
      repid REPORT_OBJECT;
      v_rep VARCHAR2(100);
begin
  repid := FIND_REPORT_OBJECT('rep_name');
  IF ID_NULL(REPID) THEN
SHOW_MESSAGE('ERROR OCCURED33');
ELSE
SHOW_MESSAGE('OK');
v_rep := RUN_REPORT_OBJECT(repid);
show_message(v_rep);
END IF;
END;

always I have rep_id null;  

I check the setting of the REPORTS_PATH in the registry and in the file default.env (REPORTS_PATH=Z:\PWA\reports)

in spite of calling forms is working fine using key (FORMS_PATH=Z:PWA\forms)

also I want to know the ext. of the report name which the function call

any comment will be appreciated...

Regards,
Khalid
0
Comment
Question by:Qosai_DBA
  • 2
4 Comments
 
LVL 8

Expert Comment

by:sapnam
ID: 16268212
declare
     rep_command    varchar2(1000);
     repid REPORT_OBJECT;
     v_rep VARCHAR2(100);
begin
  repid := FIND_REPORT_OBJECT('rep_name');

what is rep_name. where are you assigning value to it ?
0
 
LVL 1

Author Comment

by:Qosai_DBA
ID: 16270085
hi sapnam,

the rep_name is my report name --> "any name"
any report reside in the report_path directory

and as i mentioned before calling forms is working fine using key (FORMS_PATH=Z:PWA\forms)

I'm very upset of facing this problem  :-(

Regards,
Khalid
0
 
LVL 8

Expert Comment

by:sapnam
ID: 16277253
But how does the form get the value of rep_name.

If rep_name is a field in your form, you have to use :rep_name.

You have used 'rep_name'. So, as per my understanding, Oracle will look for an object with the name rep_name.

0
 
LVL 1

Accepted Solution

by:
mitralier earned 400 total points
ID: 16426815
Did u put an object of type report in the form?
find_report_object it's searching for a OBJECT in the form, not for a report on the computer. That object stores the settings like path, etc.
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question