Hi how can print report from form directly
Hi,
I would like to print report from D2k directly....
i.e. suppose we pressed a button report has to be generated and printed automatically.... Generating of report is done by Run_product function, but how to give print directly...
please u send ur valuable suggestions to my mail id also
[email protected]
bye!
When calling the report from form, include 2 more parameters in the parameter list:
- PARAMFORM=No
- DESTYPE=Printer
hth
Similar Messages
-
How to print report From Oracle form directly on printer
Hi,
I am running report from form and output should be directly printed on printer.
Database: 11g Release2
Forms version : 11.1.2
Report version : 11.1.2
OS: windows 7 professional 32 Bit
Written following code:
declare
pl_id ParamList;
varno number;
x VARCHAR2(150);
y NUMBER;
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
begin
pl_id := Get_Parameter_List('tmpdata');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
repid := FIND_REPORT_OBJECT('SALEBILLNEW'); -- report object name
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'copies',TEXT_PARAMETER,'1');
Add_Parameter(pl_id,'background',TEXT_PARAMETER,'Yes');
Add_Parameter(pl_id,'mode',TEXT_PARAMETER,'Character');
Add_Parameter(pl_id,'printjob',TEXT_PARAMETER,'YES');
Add_Parameter(pl_id,'VCOMPANY',TEXT_PARAMETER,:block50.coname);
Add_Parameter(pl_id,'VCOde',TEXT_PARAMETER,:block50.code);
Add_Parameter(pl_id,'VOURBILLNO',TEXT_PARAMETER,:BLOCK50.FROMBILL);
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER, 'PRINTER') ;
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, 'OKI MICROLINE 391 TURBO (COPY1) on NILESH-PC') ; --default printer name
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,RUNTIME);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,PRINTER);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_adminserver_inorasrv-pc_asinst_3');
y := LENGTH ('rep_adminserver_inorasrv-pc_asinst_3') + 2;
x := RUN_REPORT_OBJECT (repid, pl_id);
WEB.SHOW_DOCUMENT('http://inorasrv-pc:7001/reports/rwservlet/getjobid'||SUBSTR(x,y)||'?server=rep_adminserver_inorasrv-pc_asinst_3&userid=scott/tiger@winorasr');
Destroy_parameter_list('tmpdata');
end;
Above code giving following error:
REP-52251: The output of job ID 111 requested on Thu Oct 18 18:37:20 IST 2012 cannot be retrieved.<P>REP-51026: No output is generated for job 111.
Need help..
Thanks in advance.Hi,
I have change the printer name to OKI
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, '\\Nilesh-pc\OKI') ;
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER, 'dflt.prt');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'\\Nilesh-pc\OKI');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'dflt.prt');
code which i have posted above unable to reach at default printer and gives following error
The report generated successfully but distribution to destinations failed.
Modified above code to take default printer from registry.
Added below code
rtn_Registry := CLIENT_WIN_API_ENVIRONMENT.Read_Registry('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows','Device');
rtn_defaultPrinter := substr(rtn_Registry,1,instr(rtn_Registry,',',1)-1);
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, 'rtn_defaultPrinter') ;
It is giving error
CLIENT_WIN_API_ENVIRONMENT.Read_Registry must be declare.
Edited by: parapr on Oct 20, 2012 10:47 PM -
Urgent: how to run report from forms runtime
hi
can anybody tell me how to call reports in forms through menu
i just forgot how to call...
exact menu item code!!
rgds,Dear
if u are using client server then use this code
Run_Product(REPORTS, 'd:\emp.rep', ASYNCHRONOUS, RUNTIME,
FILESYSTEM, 'x', NULL);
if u r wsing web then use this code
Web.Show_Document('/reports/rwservlet?server=myrepserv&report=test.rdf&userid=scott/tiger@mydb&desformat=pdf&destype=c
ache¶mform=yes', '_blank');
M Rizwan -
How to run report from form using run_object_report
I AM USNING FORMS9I/REPORTS 9I , HOW TO RUN REPORT FROM FROM USING RUN_REPORT_OBJECT AND HOW
TO PASS PARAMETER AS WE DID IN RUN_REPORTS PLEASE HELP MEhere an example !
I hope this example you can use it
PROCEDURE pr_reporte IS
BEGIN
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status Varchar2(20);
d1 DATE;
d2 DATE;
BEGIN
d1 := :GLOBAL.DIA_INI;
d2 := :GLOBAL.DIA_FIN;
repid := find_report_object('rep_lab02');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'p_fec_uno='||to_char((add_months(last_day(d1),-1) +1),'DD/MM/YYYY')||' '||
'p_fec_dos='||to_char(d2,'DD/MM/YYYY'));
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := report_object_status(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
rep_status := report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' then
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
ELSE
ventana('E','error reporte no encontrado','S');
END IF;
END;
END;
The 'rep_lab02' is the name of the report that you give in the node reports
p_fec_uno and p_fec_dos they are the parameters in the report
repserver is the name of server created with rwserver
Greetings -
How to run report from forms 6i
i want to run report from forms 6i.
can anyone help me in this regard.
asif iqbal
karachi.hi
try something like this.
parameter_list_id := CREATE_PARAMETER_LIST('temp_data');
mywhere:='where 1=1';
if :RESULT_VALUE is not null then
mywhere:=mywhere || ' and diagnosis like ''%'||:RESULT_VALUE||'%''';
end if;
if :HISTORY is not null then
mywhere:=mywhere || ' and histodesc like ''%'||:HISTORY||'%''';
end if;
if :RCOMMENTS is not null then
mywhere:=mywhere || ' and scomments like ''%'||:RCOMMENTS||'%''';
end if;
if :PATHOLOGIST is not null then
mywhere:=mywhere || ' and PATHOLOGISTS like ''%'||:PATHOLOGIST||'%''';
end if;
mywhere:=TRANSLATE(mywhere,' ','~');
ADD_PARAMETER(parameter_list_id,'MYWHERE',TEXT_PARAMETER,mywhere);
RUN_PRODUCT(REPORTS,'C:\SearchResult.RDF',SYNCHRONOUS,RUNTIME,FILESYSTEM,parameter_list_id,NULL);
ADD_PARAMETER(parameter_list_id,'PARAMFORM',TEXT_PARAMETER,'NO');
DESTROY_PARAMETER_LIST(parameter_list_id);and also u can try the following code please modify it with u r requirements.
declare
v_plist_id paramlist;
pl_name varchar2(50) := 'rep_params';
begin
v_plist_id := get_parameter_list(pl_name);
check_param_list (pl_name); --Check availability of paramlist and
destroy is present
--When the parameter list already exists it needs to be distroyed first
if not id_null(v_plist_id) then
destroy_parameter_list(v_plist_id);
end if;
v_plist_id := create_parameter_list(pl_name);
add_parameter(v_plist_id, 'P_1', text_parameter, :block_name.item);
-- input parameter
add_parameter(v_plist_id, 'PARAMFORM', text_parameter, 'NO'); --
suppress the display of the Reports p-form
add_parameter(v_plist_id, 'DESTYPE', text_parameter,
:control.dest_type); -- set file destination type
add_parameter(v_plist_id, 'DESNAME', text_parameter,
:control.dest_name); -- set file destination name
add_parameter(v_plist_id, 'DESFORMAT', text_parameter,
:control.dest_format); -- set file destination format
-- call reports
run_product(reports, 'reports_file', asynchronous, runtime,
filesystem, v_plist_id, null);
end;sarah -
I've interview tomorrow , still do not know how to run report from forms
hi all ,
i asked before about running report from forms 10g rel2 , but vainly , because i could not configure the reports server ,
and no one told me .
now i've an interview tomorrow , and sure it will be included in the task which i have to do .
i am in a bad need for your step by step help
thanks in advanceExcuse me for being lazy and not searching your previous threads containing questions about configuring your reports server. As I don't know their content I don't know the links posted, the advices given and what you did, and as this is a new thread I'll go ahead and ask what you tried, where you failed and what exactly did not work out for you.
i am in a bad need for your step by step help Fine, here is an easy one:
Step 1: go to http://tahiti.oracle.com
Step 2: click on "Oracle Application Server, 10g Release 2 (10.1.2)"
Step 3: click in the searchbox, type "Configuring Reports Server"
Step 4: click "search"
Step 5: You will be redirected to some links, the very fist of them is this:http://docs.oracle.com/cd/B14099_19/bi.1012/b14048/pbr_conf.htm
This is as step-by-step as it gets, if you want detailed help ask detailed questions.
cheers -
hi all,
i have tried to run report from forms using below codig(got from online help)
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
v_host varchar2(100):= 'localhost';
v_port varchar2(10);
v_parameter_string varchar2(4000);
v_username varchar2(50);
v_password varchar2(50);
v_database varchar2(50);
BEGIN
repid := find_report_object('REPORT27');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
if rep_status = 'FINISHED' then
message('Report Completed');
copy_report_object_output(v_rep,'E:/Rep/local1.pdf');
-- host('MOZILLA E:/Rep/local.pdf');
-- WEB.SHOW_DOCUMENT('http://192.168.0.160:1521/reports/rwservlet/getjobid'||
-- substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
else
message('Error when running report.');
end if;
-- Get the full domain name of the server from the formsweb.cfg
tool_env.getvar('SERVER_URL',v_host);
-- Get the username/password and database from the .env file
tool_env.getvar('APPLICATION_USERNAME',v_username);
tool_env.getvar('APPLICATION_PASSWORD',v_password);
tool_env.getvar('APPLICATION_DATABASE',v_database);
-- If it is localhost then we are running on windows and need to use the windows port, otherwise we
-- are on AIX and need to use the AIX port
IF v_host = 'localhost' THEN
v_port := '8889';
ELSE
v_port := '8889';
END IF;
-- Now build the parameter string for running the report
v_parameter_string := 'server=repserver';
v_parameter_string := v_parameter_string||'&report= E:\AGE_NoELIGIBLEReport.rdf';
v_parameter_string := v_parameter_string||'&userid='||v_username||'/'||v_password||'@'||v_database;
v_parameter_string := v_parameter_string||'&execution_mode=batch';
v_parameter_string := v_parameter_string||'&comm_mode=synchronous';
v_parameter_string := v_parameter_string||'&destype=cache';
v_parameter_string := v_parameter_string||'&desformat=pdf';
-- Now run the report
web.show_document('http://'||v_host||':'||v_port||'/reports/rwservlet?'||v_parameter_string,'_blank');
END;
REP-110: Unable to open file ' AGE_NoELIGIBLEReport.rdf'.
REP-1070: Error while opening or saving a document.
REP-0110: Unable to open file ' AGE_NoELIGIBLEReport.rdf'.
but i hav report in e:\ then why its getting?Hi,
I suggest you not to use the "E:\" directory letter, but the REPORTS_PATH instead.
<p>
from the Online Help
</p>
<p>
On Windows, edit environment variables through the Registry Editor (Start > Run > Regedit).
</p>
<p>
On UNIX, edit environment variables by revising and running the shell script that defines the initial default values (reports.sh). If you do this, be sure to keep a backup of the original, unaltered reports.sh file.
</p>
<p>
Regards
JeanYves
</p> -
HOW TO Call REPORT from FORM usning a Button ?
Hi All,
Please Help me and Help other Beginers in this :
Hot to call a report from a form using WHEN_BUTTON_PRESSED trigger (using Oracle 10g R1)
Should i save the report as .rdf or .jsp ?
Should i save the report in a specific path ?
Should i add the path to the REPORTS_PATH in the registery ?
What about the Report Server ? should i install it first ?
What about the report properties ? what should i change ?
Please Help with Steps to make this sample report with the most important thing which is the PLSQL code we will type in the WHEN_BUTTON_PRESSED trigger.
Regards,
PS. i tried to search in the forum .. but u can imagine how hard it is to look within Messages: 164,066 - Threads: 46,773 - Pages: 3,119 :)Hi there,
Most of the things do not come for free. You need to spend some effort in order to obtain results.
Check run_product, run_report_object built-in.
Also, download the documentation library and go through:
http://www.oracle.com/technology/documentation/devsuite.html
The example of how to use the run_product directly from the book "Oracle Forms Developer Form Builder Reference, Volume 1 - Release 6i.pdf":
RUN_PRODUCT examples
** Built-in: RUN_PRODUCT
** Example: Call a Report Builder report, passing the
** data in record group ’EMP_RECS’ to substitute
** for the report’s query named ’EMP_QUERY’.
** Presumes the Emp_Recs record group already
** exists and has the same column/data type
** structure as the report’s Emp_Query query.
PROCEDURE Run_Emp_Report IS
pl_id ParamList;
BEGIN
** Check to see if the ’tmpdata’ parameter list exists.
349
pl_id := Get_Parameter_List(’tmpdata’);
** If it does, then delete it before we create it again in
** case it contains parameters that are not useful for our
** purposes here.
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
** Create the ’tmpdata’ parameter list afresh.
pl_id := Create_Parameter_List(’tmpdata’);
** Add a data parameter to this parameter list that will
** establish the relationship between the named query
** ’EMP_QUERY’ in the report, and the record group named
** ’EMP_RECS’ in the form.
Add_Parameter(pl_id,’EMP_QUERY’,DATA_PARAMETER,’EMP_RECS’);
**Pass a Parameter into PARAMFORM so that a parameter dialog
will not appear
**for the parameters being passing in.
Add_Parameter(pl_id, ’PARAMFORM’, TEXT_PARAMETER, ’NO’);
** Run the report synchronously, passing the parameter list
Run_Product(REPORTS, ’empreport’, SYNCHRONOUS, RUNTIME,
FILESYSTEM, pl_id, NULL);
END;
Hope it helps,
Michael -
Hi All,
How do I print a report from a form? I have users wanting to print a report by pressing a button. They do not wish to see the report, but to print it directly to their default printer. I do not want to give any printer name, but rather form print to the default printer.
Any help is appreciated.
My environment is
Database: Oracle 9i
AS: Oracle Application Server 9i release 2
Forms: 9i
Reports: 9i
Thanks
-JohnHi...
See the URL
How i select printer in Forms9i
Really the the solution is "ridicula"
Forms not have a solution printer for Reports...
Regards
Hector Ulloa Ligarius -
Hi,
I want to set printer that can print the number of page I want, ex: I have 100 page and I just want print 50 page. The report printed from form or runtime preview.
I don't know how I start that
ThanksHi...
See the URL
How i select printer in Forms9i
Really the the solution is "ridicula"
Forms not have a solution printer for Reports...
Regards
Hector Ulloa Ligarius -
How to run report from form in DS9I
Hi,
Can anybody guide me how to run the webreport from the form by passing some parameter from form to report
by using Oracle developer 9i
thanksTry
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
You'll find there all what you need -
Error when printing reports from forms in Linux
Im having an error when printing a report from a form. The problem is, only with certain forms. when printing a report (to PDF) from other forms, it prints with no problems. The oracle is 10g AS and operating system is Redhat AS 3.
The error, in the log from the reports server is:
[2004/9/7 7:14:59:599] Exception 62204 (): Internal error writing the image BandCombine: a row of the matrix does not have the correct number o
f entries, should be OpImage.getExpandedNumBands(source0.getSampleModel(), source0.getColorModel()) + 1..
exception oracle.reports.RWException {
oracle.reports.RWError[] errorChain={struct oracle.reports.RWError {
int errorCode=62204,
java.lang.String errorString="Internal error writing the image BandCombine: a row of the matrix does not have the correct number of entries, sh
ould be OpImage.getExpandedNumBands(source0.getSampleModel(), source0.getColorModel()) + 1..",
java.lang.String moduleName="REP"
at oracle.reports.utility.Utility.newRWException(Utility.java:604)
at oracle.reports.toolkit.image.writer.JPEGImageWriter.writeImage(JPEGImageWriter.java:130)
at oracle.reports.toolkit.image.ImageManager.writeJPEGImage(ImageManager.java:524)
at oracle.reports.engine.EngineImpl.CRunReport(Native Method)
at oracle.reports.engine.EngineImpl.run(EngineImpl.java:353)
at oracle.reports.engine.EngineClassPOATie.run(EngineClassPOATie.java:84)
at oracle.reports.engine.EngineClassPOA._invoke(EngineClassPOA.java:117)
at oracle.reports.engine.EngineClassPOA._invoke(EngineClassPOA.java:62)
at com.inprise.vbroker.poa.POAImpl.invoke(POAImpl.java:2355)
at com.inprise.vbroker.poa.ActivationRecord.invoke(ActivationRecord.java:104)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:492)
at com.inprise.vbroker.IIOP.ServerProtocolAdapter.doRequest(ServerProtocolAdapter.java:64)
at com.inprise.vbroker.GIOP.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:653)
at com.inprise.vbroker.orb.TPDispatcherImpl$TPDispatcher.run(TPDispatcherImpl.java:99)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:76)
[2004/9/7 7:14:59:599] Error 50103 (C Engine): 19:14:59 ERR REP-0069: Internal error
REP-62204: Internal error writing the image BandCombine: a row of the matrix does not have the correct number of entries, should be OpImage.get
ExpandedNumBands(source0.getSampleModel(), source0.getColorModel()) + 1..
[2004/9/7 7:14:59:600] Error 50103 (C Engine): Error Writing Image, ID 2
[2004/9/7 7:14:59:601] Error 50103 (rwtic:rwticga): Look up for image attributes for image 2
[2004/9/7 7:14:59:602] Error 50103 (rwtic:rwticgi): Looking up for Image, ID 2 in the cache
[2004/9/7 7:14:59:603] Error 50103 (rwtic:rwticgi): Loading the Image into the cache
[2004/9/7 7:14:59:603] Debug 50103 (ImageManager:getImageSource): Retrieving the Image object for ID : 2
[2004/9/7 7:14:59:603] Error 50103 (rwtic:rwticgi): Image successfully loaded into the cache
[2004/9/7 7:14:59:604] Debug 50103 (ImageSource:getImageHeight ): Start Height : 155
[2004/9/7 7:14:59:604] Debug 50103 (ImageSource:getImageWidth ): Start : width : 138
[2004/9/7 7:14:59:604] Debug 50103 (ImageSource:getImageColorSpace ): Start
[2004/9/7 7:14:59:608] Exception 50125 (): Caught exception: java.lang.NullPointerException
exception oracle.reports.RWException {
oracle.reports.RWError[] errorChain={struct oracle.reports.RWError {
int errorCode=50125,
If anyone could help me, is important !
Thx in advance
Bruno SantosRaise a TAR I reckon
-
I'm tring to open report from a form
using Run_report_object built_in on 9i
and i get error messages
such "you did not specify repor name "
and "REP-0110 unable to open file
REP-1070 error while openning or saving document "
I get a look on the help and i found an enviroment parameter called
"Reports25_path" that un seted on my computer (Windows XP) and I must put my report file in its location
what can i do to open my report from a form ?
thank yuo for help .
I'll be gratfull if you send answer on my e-mail [email protected]Forms/Reports Integration 6i (6.0.8)
http://www.oracle.com/technology/products/forms/pdf/277282.pdf
Forms/Reports Integration 9i (9.0.2)
http://www.oracle.com/technology/products/forms/pdf/frm9isrw9i.pdf
Forms/Reports Integration 10g (9.0.4)
http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf -
How to print report from JSP Page
Hi Everybody,
I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
Could anyone help me to solve this problem.Hi Everybody,
I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
Could anyone help me to solve this problem. -
How Call crystal report from form
Hi all
i make report by crystal report but i can't call it from form , which function in form builder do that?Hi all
i make report by crystal report but i can't call it from form , which function in form builder do that?
Maybe you are looking for
-
One iTunes media folder for multiple users
Hi there, I'm having trouble getting iTunes 9.0.3 to let me share one media folder across two users. I want to be able to share and update the contents of the media folder from either user account. I had this going before I updated thanks to another
-
LIBC PROBLEM - SIGSEGV in getc()
Hello. I'm using arch krnl2.6.25 on a 2gb amd64-3200+ 320gb nforce4 machine. I'm using Gnome as my GUI. I'm also using gnu gcc bined with eclipse, I have JRE 6 installed. Freshest versions of libc/binutils installed also. No permission problems spot
-
How do I play my downloaded rental movie on my ipad2?
How do I play my downloaded rental movie on my ipad2 and where do I find it...help ?
-
Measurement & Automation Explorer would work under lookout 6.02
Hello, The Historical data viewer, Measurement & Automation Explorer, for Lookout, would not work under Windows XP. It never start and just says that it have found a fail and stops, then It would like to send a report to Microsoft? I have tried to re
-
Some errors about spatial objects during upgrade to 9.2.0.8
Hi all, I installed the 9.2.0.8 patch and upgraded my 9.2.0.7 database to 9.2.0.8 and got some error messages, ORA-29832 and ORA-29844 when the scripts were updating some Spatial objects. The database seems to work properly however after the upgrade,