How can I run reports from my form ?

I am just started using 10G Developer Suite. I managed to convert all my old forms to a new one including reports. But I failed to call my report from my form. I already changed calling function to run_report_object(). However it return an error message "Invalid ID".

Here is my script under "when button pressed" trigger :

  repid report_object;
  v_rep varchar2(100);
  rep_status varchar2(10);


  repid := find_report_object('myreport');  -- do i need to include ".rdf" extension ?? I already verified the filename..
  v_rep := run_report_object(repid);


Currently I saved all my files (forms and reports) in c:\devsuitehome\forms..
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

In your code, 'myreport' must match the name of a reports object in your form (see object navigator).

The next thing to check is the file name property of that reports object. From my experience it is a good idea to remove the path information and just provide the file name (in your case myreport.rep). Keep in mind that if you intent to go live with a unix/linux application server, file names are case sensitive, so make sure you have a kind of naming convention and keep all of your file names in either lower or upper case letters.

Last thing is to make sure your report server finds the rep files. Open the <rep_server>.conf file and edit the "sourceDir" property of the reports engine object accordingly.

Hope this helps

KG1973Author Commented:
Thanks for your quick reply.

I tried just now but still having similar problem. The file that I changed as suggested is rwbuilder.conf

<!--property name="sourceDir" value="your reports source directory"/-->

changed to
<!--property name="sourceDir" value="f:\my ReportsDir"/-->

Bytheway, what is the file extension for report file ? ".rep" ".rdf" or else ?

Your help is very much appreciated.
Sorry for the delay.

Take it step by step (suggested you are on windows):
If possible, undo the changes you made in rwbuilder.conf. After that open a DOS box and run this command: "rwserver server=myrepserver &". This creates a new file myrepserver.conf in the /ORACLE_HOME/reports/conf/ directory and starts the reports server. (If it doesn't work, cd to /ORACLE_HOME/bin and run it again).
Shutdown the server. Now modify the sourceDir property as mentioned above, but make sure you remove the comment tags:
<property name="sourceDir" value="f:\my ReportsDir"/> instead of
<!--property name="sourceDir" value="f:\my ReportsDir"/-->

Start the server again using the above mentioned DOS command.
In your forms module make sure you provide the reports server name, either in the Reports Server property of the Reports object, or, to be more "dynamic", in your code using

v_report_server := 'myrepserver';
repid := find_report_object('myreport');
v_rep := run_report_object(repid);
The "rep" file is a compiled "rdf" file. You can use either.

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
KG1973Author Commented:
Hi anand 2000v,

Please give me more time on this. I really need this one to be solved. The reason why is, at the same time, I have another problems not related to this one but need my urgent attention. I wish I can solve the problem one by one at a time, but that is not the case with me.

Bytheway, what if I manage to solve the problem my own after a while, (not taking any advise from anyone EE) how can I close it ? And also if there is no comment/response  from anyone to all my opened questions for 21 days, what should I do to avoid from being abandoned ? Actually I am waiting for the solutions.

Thanks for your consideration.
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
Java App Servers

From novice to tech pro — start learning today.