Solved

rep-0110  calling report from form with paramter

Posted on 2004-04-25
8
14,291 Views
Last Modified: 2011-08-18
hi

i have report with paramter

when i run it in report builder it is working fine  but

when i call it from form with paramters  by using run_report_object i get errors (REP-0110: Unable to open file  and REP-1070: Error while opening or saving a document)

i made the changes to registry >> report_path  to my report folder

i put this code on WHEN_BUTTON_PRESSED trigger

DECLARE
pl_id      PARAMETERLIST;
report_id Report_Object;
ReportN VARCHAR2(100);

BEGIN
  pl_id := get_parameter_list('tempdata');
    IF NOT id_null(pl_id) THEN
          pl_id :- destroy_parameter_list(pl_id);
    END IF;
  pl_id := create_parameter_list('tempdata');
  Add_Parameter(pl_id, 'P_1', TEXT_PARAMETER, :item3);
  Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
  report_id:=find_report_object('REPORT4');
  SET_REPORT_OBJECT_PROPERTY (report_id,REPORT_COMM_MODE, SYNCHRONOUS);
  SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE, CACHE);
  ..
  ..
  ReportN:=run_report_object(report_id,pl_id);

END;


0
Comment
Question by:symon22
  • 5
  • 3
8 Comments
 
LVL 13

Expert Comment

by:anand_2000v
Comment Utility
Give the entire pathwith the file name. Make sure that the file's location is specified in the PATH environment variable.
0
 

Author Comment

by:symon22
Comment Utility

i put the name of the report with its folder at  the filename property (report object)

and i try to assign it with
 SET_REPORT_OBJECT_PROPERTY (report_id,REPORT_FILENAME, 'c:\orapro\reportM.rdf');
it is still not working.



0
 
LVL 13

Expert Comment

by:anand_2000v
Comment Utility
What is the version?.....
check this out

The information in this article applies to:
 
  Developers who are integrating Forms and Reports with paramform=yes. This is  
for developers who are following NOTE 139546.1 <ml2_documents.showDocument?p_id=139546.1&p_database_id=NOT> or the whitepaper available on OTN.
 
 
Symptom(s)
~~~~~~~~~~
 
Following Note 139546.1 <ml2_documents.showDocument?p_id=139546.1&p_database_id=NOT> Forms and Reports are configured to run on Web. In Forms 6i
everything worked fine. Parameter Form comes up fine and later report runs without
any error. After upgrading or using the same note in Forms 9i you get
 
REP-110: Unable to open file ''.
REP-1070: Error while opening or saving a document.
REP-0110: Unable to open file ''.
 
 
Change(s)
~~~~~~~~~~
 
Upgraded to or using Forms/Reports 9i.
 
Cause
~~~~~~~
 
The problem is with the function get_report_name in the srw package in Reports 9i.  
srw.get_report_name
 
In Reports 6i the function srw.get_report_name returned trailing spaces along with  
the report name. So the code in Before Parameter Form trigger
 
vc_report_name:=substr(vc_report_name,1,instr(vc_report_name,' ')-1);
 
removed the trailing spaces and returned only the report name to vc_report_name
variable.  
 
But in Reports 9i srw.get_report_name returns just the report name without any  
trailing spaces. As there are no spaces in the report name instr function returns
0 which is making the 3rd parameter for substr to be -1. This leads to substring
returning nothing for the report name. And so the error.
 
 
Fix
~~~~
 
Remove the above code from BeforPForm trigger as there are no trailing spaces.  
This fix is for 9i Version only.
 
References
~~~~~~~~~~~
 
Bug 2726064 <ml2_documents.showDocument?p_id=2726064&p_database_id=BUG>
Note 139546.1 <ml2_documents.showDocument?p_id=139546.1&p_database_id=NOT>

.
0
 
LVL 13

Accepted Solution

by:
anand_2000v earned 50 total points
Comment Utility
 
   
Oracle Forms Technical Forum

         

Displayed below are the messages of the selected thread.


Thread Status: Closed

From: Kathleen Manafi 01-Sep-99 19:18
Subject: REP-110 and REP-1070 When Trying to Run a Report from a Form


REP-110 and REP-1070 When Trying to Run a Report from a Form

Hi,

I am using Developer 6.0 on a Windows 98 platform. I created a new form using Developer 6.0 and
also created a new form to call it. I am passing a number of parameters to the report. The form
will run when I execute it from within Report Builder but when I call it from the Form it gives me
the two errors rep-0110 and rep-1070. I set the report path in the registry when I first installed
Developer 6.0.

I also tried to run a report from a form that I developed some time ago using Developer 2.0. I
converted both the form and report some time ago to developer 6.0 and after some initial problems
with the report executable not getting created in Developer 6.0 it seemed to be running OK. And is
still running in a testing environment (pseudo production environment). However, I cannot run this
same report from the calling form from within Developer. I get the same two messages.

What might there be in the development environment that prevents the reports from executing? I am
having great difficulty testing the report and the form together.

I hope you can help.

Kathleen





--------------------------------------------------------------------------------

From: Oracle, Kanagarani Babu 02-Sep-99 12:02
Subject: Re : REP-110 and REP-1070 When Trying to Run a Report from a Form


Hi Kathleen,

Do you have your report under FORMS60_PATH?
You cannot run a report that has been stored in the database
from FORMS using the RUN_PRODUCT command. The report must be
saved as a file to the filesystem.

Please refer the follo. document:

REP-110 AND REP-1070 USING RUN_PRODUCT TO CALL REPORT FROM FORMS

Hope this helps you.

Regards,
Kanagarani Babu.






0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 13

Expert Comment

by:anand_2000v
Comment Utility
hope these articles help...If not please give me complete details about the version / OS
0
 

Author Comment

by:symon22
Comment Utility
thanks anand 2000v


i have oracle 9i -windowsXp

i think the problem  with report_filename

on the error message rep-0110 Unable to open file '??'
unknown charcter apear between qutes '??'

how to fix this problem?... i check the trigger BeforPForm
it is empty!
--------------------
Fix
~~~~
Remove the above code from BeforPForm trigger as there are no trailing spaces.  
This fix is for 9i Version only.
 
--------------------

i tested this form with report on other machine (developer6 ) and it is working and i used run_product instesd of run_report_object





0
 
LVL 13

Expert Comment

by:anand_2000v
Comment Utility
Ohhhhh....... I am sorry. I did not read the code properly before answering you.

The run_report_object is used with those report objects created in Forms Builder. If you have configured with reports builder you have to use Run_product. I hope this helps.
0
 

Author Comment

by:symon22
Comment Utility
thanks anand_2000v

your answer helped me
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

763 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

10 Experts available now in Live!

Get 1:1 Help Now