Generate .PDF file from Oracle Form and print .pdf
Hello, I am new to oracle form. I need direction on how to create .pdf file on a button click.
The requirement is when user click a button on a form, I need to write some data to the pdf file and open the .pdf file for print.
I am using Oracle Form builder 10.1.2.0.2
Thanks a lot! Please help!
Dear all,am new to oracle report and oracle forms and i know the
basics how to generate the report and to create the form, Now my doubt is, like generating report
from oracle report how to generate the report from oracle from,should i add any command button? and where
to add the coding and what coding ? when i click that command button the report should be generated like oracle
report,what should i do?Please help me to learn.
my table name is 'student' and it has the following columns,
sid,sname,grade,result.
Am using oracle from 10.1.2.0.2 version and
oracle report version is 10.1.2.0.2.
Please give step by step procss.
Thank you.
Similar Messages
-
How to call pdf files from oracle forms
I have a pdf file in the server , I need to call this and open when a button is pressed in the oracle forms.
Please let me know how to do this.
Thanks,
PrevinFrank,
I have oracle applications and I want to open a pdf file located in the server from a button in oracle applications.
Previn,
you don't mention the Forms release you are running.
If you are running Forms on the web, you can use
web.show_document() to load files from the Web if
they are accessible via HTTP.
Frank -
Create a PDF file from swing component and print
Hi,
Suppose i have a JFrame where in i add a JScrollpane which has a JPanel with some painting on it, suppose i want to create a pdf file of the total JPanel, and not of what i see on screen like taking a screen shot, or print the total JPanel, and not only the screen that is displayed
how can i do it
I am attaching the code below, how can i create a pdf for MyPanel and print it
//start code
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TestDisplaySize extends JFrame
JScrollPane scrollPane ;
public TestDisplaySize()
super("layered pane");
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
MyPanel panel = new MyPanel();
scrollPane = new JScrollPane(panel);
Container contentPane = this.getContentPane();
contentPane.add(scrollPane, BorderLayout.CENTER);
setSize(new Dimension(800,600));
this.setVisible(true);
JViewport viewPort = scrollPane.getViewport();
class MyPanel extends JPanel
public MyPanel()
setPreferredSize(new Dimension(2000,600) );
this.setBackground(Color.white);
this.setOpaque(true);
public void paintComponent(Graphics g)
super.paintComponent(g);
setBackground(Color.white);
Rectangle r = scrollPane.getViewport().getViewRect();
g.setClip((Shape)r);
g.setColor(Color.blue);
int x = 0;
for(int i = 0; i < 60; i++)
x +=60;
g.drawLine(x, 0, x, 600);
g.drawString(String.valueOf(i), x, 50);
public static void main(String args[])
new TestDisplaySize();
//end codecreate a class wich implements printable, redefine the print method of this class with the this you want to print
and at the end of the constructor...
PrinterJob printJob = PrinterJob.getPrinterJob();
PageFormat myFormat = new PageFormat();
myFormat.setOrientation(PageFormat.LANDSCAPE);
myFormat.setPaper(ps.getMyPaper());
printJob.setPrintable(this, myFormat);
if (printJob.printDialog()) {
try {
printJob.print();
} catch (Exception pe) {
System.out.println(pe); -
Attach pdf files in oracle forms 11g
Hello everyone, I would like to know if is possible and how to attach a pdf file in oracle forms, and how to open it to read it
thankshello ,
u can also try out a HOST command in Oracle Forms.
Give path of PDF file and it will open PDF directly.
Thanks
HARSH SHAH -
Generated pdf file from oracle reports show bad characters
Hello all,
Iam fighting with a problem with generated pdf file from oracle reports which show some bad characters. I was searching for some information but it didnt help...
I have Oracle Database 11g R2 (or 10g R2) on Oracle Linux or Windows, Oracle forms and reports 6i (i know that is very old and not supported with 11gr2 but we are in this scenario).
NLS parameters are set like this
server:
NLS_CHARACTERSET EE8MSWIN1250
NLS_TERRITORY AMERICA
NLS_LANGUAGE AMERICAN
client:
NLS_CHARACTERSET EE8MSWIN1250
NLS_TERRITORY SLOVAK
NLS_LANGUAGE SLOVAKIA
When I run Oracle Reports it show perfect in display and when I try to print them, they are all good with good characters, but when I try to generate pdf file, some characters like č,š,ľ are not displaying corectly... This happen only when try to generate to pdf...
I try to work with uifont.ali on client side but without any result. Fonts for reports were installed on client and server side... Can someone help me with this problem? Thank you very much for every advice.
MartinHi Sergiusz,
Thank you for your reply. I look at what you wrote and try to make some test...
1) For first I download FontForge, which can generate type1 font from true type. So I open FontForge and open my Arial.ttf font and use "Generate Fonts" to save my Arial.ttf font to pfb and pfm (whoch are need to set in uifont.ali). I have to change encoding, because my font has 2byte encoding so I reecondode the font from ISO10646-1 to ISO8859-2 and generate to pfb.
2) Then I navigate REPORTS_PATH from regedit to my *.pfm and *.pfb files.
3) I add these lines to end of my uifont.ali
[ PDF:Embed ]
Arial = "Arial.pfm Arial.pfb"
ArialNarrow = "ArialNarrow.pfm ArialNarrow.pfb"
4) Then I generate my report but nothing change... I check "Font used" in my pdf file, but there were not my fonts embedded I guess..
I also try PDF:Subset, but it doesnt change anything... I try PDF aliasing to see if my uifont is working - this work very well, but I dont need to change font...
Any other advice? Thank you so much to everyone!
Martin -
Generate pdf file from 9i reports and save it in C:\oracle_reports\
i want to generate a file from oracle reports in PDF format and want to save it on already defined path.
c:\oracle_reports\
right now pdf generation of report is working fine but before generation of pdf report system prompt me or open a dialogue box to save my pdf file on drive. i dont want to see these dialogue box or prompt me to explicitly save it.
i want all the work done automatically.
regards
------------ source code--------------
PROCEDURE PRINT_PROC IS
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
pl_id ParamList;
report_path varchar2(100);
aud_sno varchar2(1000);
aud_type varchar2(500);
BEGIN
pl_id := Get_Parameter_List('report_data');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('report_data');
User parameters : Customize these to fit your report
report_path := :GLOBAL.Web_BASE_PATH||:GLOBAL.PATH_SCM||'REPORT\scm_rfq.rep';
-- Initialize your report parameters here
Add_Parameter(pl_id, 'p_cmp_code' , TEXT_PARAMETER, :global.company_code);
Add_Parameter(pl_id, 'p_rfq_sno' , TEXT_PARAMETER, :document_sno);
Add_Parameter(pl_id, 'P_PATH' , TEXT_PARAMETER, REPORT_PATH);
Standard parameters: Don't change
Add_Parameter(pl_id, 'PARAMFORM' , TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'PAGESTREAM' , TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'MAXIMIZE' , TEXT_PARAMETER, 'YES');
-- end standard parameters
repid := find_report_object('REPORT_OBJ');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_oas');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,report_path);
-- SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'htmlcss');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'\\ORCLSRV\UTL_MAIL\'||:doc_type||:receiver_sno||'.pdf');
v_rep := RUN_REPORT_OBJECT(repid,pl_id);
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;
END;If you use rwclient you could that easily, from a Form, it requires additional steps.
Look at this thread Re: save report -
I want read PDF file from SAP directory and create a spool request or print
Hi all,
I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body help me in this.
Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
Thanks in advance,
SunnyHi Sunny,
Check these links.
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
http://www.erpgenie.com/sap/abap/pdf_creation.htm
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
Hope this resolves your query.
Reward all the helpful answers.
Regards -
How to access a PDF file from Oracle DATABASE SERVER
Hi
I have some pdf files in "\home2\docs" directory in Oracle database server 10g. (OS is Linux) I want to access those pdf files from my client system through Oracle Forms. How is it possible?
Please Help!!!! It is very urgent !!!
Expecting fast response!!!!!
Byehi
Thank u for ur response.
Initially i tried to access pdf file from database server. I didn't get any solution for that. So I copied all my pdf files to Application server which is in Linux environment at "/home2/docs" directory.
I gave the following command for accessing the pdf files kept in Lnux Application Server from Oracle 10g forms in a button press trigger.
web.show_document('http://192.168.1.53:7779/home2/docs/test.pdf');
It says "page cannot be found"
So I copied one of the pdf file named "test.pdf" to "/oracle/oas10g/IasHome/forms90/java" in Linux Application Server . Then the following command
web.show_document('http://192.168.1.53:7779/forms90/java/test.pdf');
has opened the the pdf file in browser.
192.168.1.53 is my Linux Application Server IP. and 7779 is the port.
Actually we have lacs of pdf files. So i cannot keep all the pdf files in "/oracle/oas10g/IasHome/forms90/java" directory in Linux Application Server. And also all the pdf files not in the same directory , "/home2/docs" some of the pdf files r in the subdirectories of "/home2/docs/" like /home2/docs/sub1, /home2/docs/sub2, /home2/docs/sub3 etc.
Then how to configure my "/oracle/oas10g/IasHome/forms90/server/forms90.conf" file for retrieving pdf files from "/home2/docs/" and its subdirectories. Is Anything other than this, required for solving my problems.
Now My PDF files r in LINUX APPLICATION SERVER not in database server.
Please help!! It is VERY URGENT!!! -
How to open .cmdrw file from Oracle Forms 10g
Hi,
We need to call *.cmdrw* file from Oracle forms 10g. Is there any way to call *.cmdrw* file from Oracle forms 10g?
Thanks for the help.
Viishnu NekkantiIn case you want to open a .cmdrw with its associated application you can use the following procedure:
webutil_host.NonBlocking( 'rundll32 url.dll,FileProtocolHandler ' || client_filename );This works for every file where a program has been associated to its file extension. (Adobe Reader for *.pdf, Microsoft Word for *.doc, Microsoft Excel for *.xls and so on)
Regards
Markus -
How to mail pdf file from oracle database 11g
Hi,
Using following code to send pdf file from oracle database.
DECLARE
v_From VARCHAR2(80) := '[email protected]';
v_Recipient VARCHAR2(80) := '[email protected]';
v_Subject VARCHAR2(80) := 'test subject';
v_Mail_Host VARCHAR2(30) := '116.214.31.249';
v_Mail_Conn sys.utl_smtp.Connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
BEGIN
v_Mail_Conn := sys.utl_smtp.Open_Connection(v_Mail_Host, 26);
sys.utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
sys.utl_smtp.Mail(v_Mail_Conn, v_From);
sys.utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
sys.utl_smtp.Data(v_Mail_Conn,
'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
'From: ' || v_From || crlf ||
'Subject: '|| v_Subject || crlf ||
'To: ' || v_Recipient || crlf ||
'MIME-Version: 1.0'|| crlf || -- Use MIME mail standard
'Content-Type: multipart/mixed;'|| crlf ||
' boundary="-----SECBOUND"'|| crlf ||
crlf ||
'-------SECBOUND'|| crlf ||
'Content-Type: text/plain;'|| crlf ||
'Content-Transfer_Encoding: 7bit'|| crlf ||
crlf ||
'some message text'|| crlf || -- Message body
'more message text'|| crlf ||
crlf ||
'-------SECBOUND'|| crlf ||
'Content-Type: file;'|| crlf ||
' name="D:\mail\pdfSample.pdf"'|| crlf ||
'Content-Transfer_Encoding: 8bit'|| crlf ||
'Content-Disposition: attachment;'|| crlf ||
' filename="D:\mail\pdfSample.pdf"'|| crlf ||
crlf ||
'CSV,file,attachement'|| crlf || -- Content of attachment
crlf ||
'-------SECBOUND--' -- End MIME mail
sys.utl_smtp.Quit(v_mail_conn);
EXCEPTION
WHEN sys.utl_smtp.Transient_Error OR sys.utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;
Above code executed successfully and mail is send to recipient but file is corrupted.
I think it doesn't pick file from specified location, attachment name is appearing like this 'D:mailpdfsample.pdf
Oracle Database : 11g R2
O.S : windows 7 Professional
Thanks in Advanceparapr wrote:
sys.utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);The above violates RFC 5321 section 4.1.1.1
'-------SECBOUND'|| crlf ||
'Content-Type: file;'|| crlf ||
' name="D:\mail\pdfSample.pdf"'|| crlf ||
'Content-Transfer_Encoding: 8bit'|| crlf ||
'Content-Disposition: attachment;'|| crlf ||
' filename="D:\mail\pdfSample.pdf"'|| crlf ||Invalid Mime header above. Filename are logical. Not physical. Loose the drive and directory names. The filename is there to name the Mime body's content.
crlf ||
'CSV,file,attachement'|| crlf || -- Content of attachmentHow is the above PDF content? This is a string containing the text CSV,file,attachement. Which means when this is what is saved as a PDF file by the mail reader.
EXCEPTION
WHEN sys.utl_smtp.Transient_Error OR sys.utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;Silly. Why change meaningful exceptions into a generic meaningless exception?? That does not make any sense. -
How to run batch file from oracle forms 9i
Hi everyone.
i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
i have made a batch file which run the sql loader and transfer my data to database.
How to run batch file from oracle forms 9i.
when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
here is my code
Begin
HOST('C:\temp\batchfile.bat');
message('done');
end;
Thanks in advance
regards
sajidthis is my log file, when i run manually.
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: file_to_upload.ctl
There are 2 data files:
Data File: sk.csv
Bad File: sk.bad
Discard File: none specified
(Allow all discards)
Data File: sk1.csv
Bad File: sk1.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table KHAN, loaded from every logical record.
Insert option in effect for this table: APPEND
Column Name Position Len Term Encl Datatype
SR FIRST * , O(") CHARACTER
DATES NEXT * , O(") CHARACTER
AGENT NEXT * , O(") CHARACTER
COUNTRY NEXT * , O(") CHARACTER
TRANSACTIONS NEXT * , O(") CHARACTER
PKR NEXT * , O(") CHARACTER
USD NEXT * , O(") CHARACTER
BANK NEXT * , O(") CHARACTER
Table KHAN:
11088 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 132096 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 11088
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Thu Jul 01 23:27:53 2010
Run ended on Thu Jul 01 23:27:54 2010
Elapsed time was: 00:00:00.63
CPU time was: 00:00:00.17 -
How to call a .rpt file from oracle form 10g
I need to call a .rpt file from oracle form 10g. please suggest what to do for this
Hi,
onlz rdf and rep files are Reports executables. Convert rpt to rep and you are file (Reports has a conversion utility in the bin directory)
Frank -
Call an executable file from oracle forms 6i
Hello ,
i want to call a local .exe file from oracle forms 6i passing along a couple of parameters in the command line .
Can anyone help me out here ?
thanks
C.
Edited by: user539712 on Jan 21, 2011 11:55 AM
Edited by: user539712 on Jan 21, 2011 11:55 AMthat worked...now i am facing a different issue now which i didnt have without the start command . i am calling iexplorer.exe but i am passing a long a url in the command line . the 2nd parameter in the url is not working so when i do :
"start c:\progra~1\intern~1\iexplore.exe" http://localhost/hello.jsp&a=ddd&b=333
the &b=333 is not passed (some issue with the & character i am guessing). Would you know a workaround ?
thanks -
How to generate MT files from Oracle EBS Payables
Hi, does anyone has experience in generating MT files from Oracle Payables?
All contributions are welcome...Hi,
are you talking about MT-940 format files? If so, what is the use case behind this issue?
I created a custom loader process to upload MT-940 bank statements into Cash Management
some time ago, but as far as i understood your question, you want to create those files based
on payables data?
Regards -
Generate PDF file from oracle Table
We need to populate pdf file into oracle table of column blob through informatica by taking
path\name(/path/filename.PDF) as input from source table.
The pdf file is on some other server so, we need to create a stored procedure which will give pdf file as output from
other server by taking path\name from source table column as mentioned above.
So please suggest how we can create a stored procedure for that purpose.
If possible please share some script.Dear all,am new to oracle report and oracle forms and i know the
basics how to generate the report and to create the form, Now my doubt is, like generating report
from oracle report how to generate the report from oracle from,should i add any command button? and where
to add the coding and what coding ? when i click that command button the report should be generated like oracle
report,what should i do?Please help me to learn.
my table name is 'student' and it has the following columns,
sid,sname,grade,result.
Am using oracle from 10.1.2.0.2 version and
oracle report version is 10.1.2.0.2.
Please give step by step procss.
Thank you.
Maybe you are looking for
-
SCOM 2012r2 Favorite Report could not be shown on web console internal error 500
Please HELP!!! My lab settings: SCOM1, SCOM2, SQL1 Both SCOM servers were installed on 2012r2 Server and SCOM 2012 r2 Rollup3 with Web Console enabled. Report server installed on SQL1, MSSQL2012 with Report service, All role are installed on differen
-
Capturing keystrokes; using modifier keys
I want to create a shortcut using "Command-R" on the mac and "Control-R" on windows. I know how to capture a single keystroke (my code is attached), but how do I capture using the modifier keys?
-
when i try to correct and reset the ID it sends the new pasword to the missspelled email address.
-
hi team, how to use the nodes with smartforms...in which situation we have to use the command and alternative nodes and folders also....in the smartfroms Thanks, vijay...
-
I've been publishing a business directory using InDesign for 18 years. Acquired CS6 last year and, with help, directory has been posted as an interactive file with internal and external hyperlinks (more than 1,000). When saving the original document