• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1338
  • Last Modified:

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..
  • 2
  • 2
1 Solution
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.
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.
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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