Solved

oracle report

Posted on 2004-08-13
4
2,521 Views
Last Modified: 2013-12-12
Is there a way to generate oracle report in pdf format
0
Comment
Question by:alialyosofy
4 Comments
 
LVL 7

Accepted Solution

by:
BobMc earned 250 total points
ID: 11797886
With Oracle Reports, you need to set the REPFORMAT to PDF.
Heres an example from Oracle :

Problem Description:
====================
Using RUN_PRODUCT to start a report from a form on the web.
IF DESTYPE is set to SCREEN or PREVIEW the format is specified by the
FORMS60_REPFORMAT environment variable.
DESFORMAT will be ignored if it is used to change the format
of the report output.
Problem Explanation:
====================
The following example describes the problem
Registry:
---------
TO MODIFY THE REGISTRY:
1) click on START, then RUN
2) type REGEDT32
3) click on HKEY_LOCAL_MACHINE
4) click on SOFTWARE
5) click on ORACLE
6) under ORACLE to the right frame look for FORMS60_REPFORMAT
7) If you don't have it, click on EDIT, NEW, STRING VALUE
8) You will now see a NEW VALUE #1 highlighted...type in FORMS60_REPFORMAT
9) Click once on it to highlight it and RIGHT CLICK and MODIFY
10) Edit VALUE and type in 'PDF' or 'HTML'....no quotes...just PDF or HTML
Forms Trigger:
--------------
Note: DESTYPE = SCREEN
DESFORMAT = PDF
FORMS60_REPFORMAT = HTML
DECLARE
pl_id Paramlist;
v_Show_Report_Name VARCHAR2(50);
BEGIN
pl_id := GET_PARAMETER_LIST('tmpdata');
If NOT Id_Null(pl_id) THEN
Destroy_Parameter_List(pl_id);
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'PARAMFORM', TEXT_PARAMETER, 'YES');
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'SCREEN');
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'PDF');
Add_Parameter(pl_id,'ORIENTATION',TEXT_PARAMETER,'LANDSCAPE');
RUN_PRODUCT(REPORTS,'c:\orant\forms60\emp',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id,'');
Destroy_Parameter_List(pl_id);
END;
PROBLEM:
--------
The output will be HTML not PDF
Solution Description:
=====================
A workaround is to set DESTYPE to FILE instead of SCREEN
and use WEB.SHOW_DOCUMENT to display the output file produced.
The above example should be modified as follows:
Registry:
---------
FORMS60_REPFORMAT = HTML
Forms Trigger:
--------------
Note: DESTYPE = FILE
DESNAME = c:\webforms\test.pdf
DECLARE
pl_id Paramlist;
v_Show_Report_Name VARCHAR2(50);
BEGIN
pl_id := GET_PARAMETER_LIST('tmpdata');
If NOT Id_Null(pl_id) THEN
Destroy_Parameter_List(pl_id);
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'YES');
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'FILE');
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'PDF');
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,'c:\webforms\test.pdf');
Add_Parameter(pl_id,'ORIENTATION',TEXT_PARAMETER,'LANDSCAPE');
RUN_PRODUCT(REPORTS,'c:\orant\forms60\emp',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id,'');
Web.Show_Document('http://<server_name>/<virtual_path>/test.pdf','_SELF');
Destroy_Parameter_List(pl_id);
END;
Solution Explanation:
=====================
DESNAME is hard coding the path as well as the output file name in this example.
WEB.SHOW_DOCUMENT <virtual_path> is set in the web server and should point to
the location of the output file.
0
 
LVL 14

Assisted Solution

by:leoahmad
leoahmad earned 250 total points
ID: 11797948
yes it is easy
Do the following steps
make a report in the report builder then

In the Object navigator goto System parameters
double desformat and write initial value pdf
now double click the desname and write the path where file going to store like c:\report.pdf ( this inclueded the file name) in the initial value
then double click the destype and select the file from list
now run the report
it ask for print click  on print button and report save in pdf format.

LeoAhmad
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

Suggested Solutions

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
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 shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

747 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

9 Experts available now in Live!

Get 1:1 Help Now