[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1324
  • 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 :

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

begin

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

end;

Currently I saved all my files (forms and reports) in c:\devsuitehome\forms..
0
KG1973
Asked:
KG1973
  • 2
  • 2
1 Solution
 
gackiCommented:
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

Gerald
0
 
KG1973Author Commented:
Hi,
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.
0
 
gackiCommented:
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');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_report_server);
v_rep := run_report_object(repid);
      
The "rep" file is a compiled "rdf" file. You can use either.
 
HTH
Gerald
0
 
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.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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