FIND_REPORT_OBJECT always return null id

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
LVL 1
Qosai_DBAAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sapnamCommented:
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
Qosai_DBAAuthor Commented:
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
sapnamCommented:
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
mitralierCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.