How can I run reports from my form ?

Posted on 2006-04-08
Last Modified: 2013-12-01
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..
Question by:KG1973
    LVL 3

    Expert Comment

    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

    LVL 1

    Author Comment

    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.
    LVL 3

    Accepted Solution

    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.
    LVL 1

    Author Comment

    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.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    How to get rid of Java update popups 6 212
    Java charset encoding issue 8 120
    web service Rest Client creation 4 68
    oneTwo java challenge 31 286
    Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
    Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now