Solved

oracle report

Posted on 2004-08-13
4
2,525 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle function works in 11g but not in 12c 21 72
Oracle RAC 12c 8 60
passing parameters to sql script oracle 4 27
PL SQL Search Across Columns 4 21
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

895 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

19 Experts available now in Live!

Get 1:1 Help Now