Sie sind auf Seite 1von 26

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

AIM

TECHNICAL WHITE PAPER


Oracle NAIO
Developing Oracle Application
Reports
Author:

Ajay Solanki

Creation Date:

June 8, 2003

Last Updated:

April 11, 2004

Document Ref:

NAIO/APP_REPORTS

Version:

DRAFT 1C

Approvals:

Copy Number _____

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Document Control
(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Document Control
Change Record
26

Date

Author

Version

Change Reference

8-Jun-03
12-Jun-03
11-Apr-04

Ajay Solanki
Ajay Solanki
Ajay Solanki

Draft 1a
Draft1b
Draft1c

No Previous Document
Added section on multi language report
Added section on printing bitmap reports.

Reviewers

Name

Position

Distribution

Copy No.

Name

Location

Library Master

Oracle Project Library

Note To Holders:
If you receive an electronic copy of this document and print it out, please write your
name on the equivalent of the cover page, for document control purposes.
If you receive a hard copy of this document, please write your name on the front
cover, for document control purposes.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Document Control
(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Contents

Document Control ................................................................................................................ 2


Developing Oracle Application Reports............................................................................ 5
Before starting report .................................................................................................... 5
Before report trigger ...................................................................................................... 5
After report trigger ........................................................................................................ 5
Query and group names ............................................................................................... 6
Field, Boiler text, repeating frame names ................................................................... 6
Parameter........................................................................................................................ 6
Column alias names ...................................................................................................... 6
Address field .................................................................................................................. 7
Format triggers............................................................................................................... 7
Formula columns ........................................................................................................... 7
Numeric Formula columns........................................................................................... 8
Data type of variables.................................................................................................... 8
Formatting amounts ...................................................................................................... 8
Precision Formatting ..................................................................................................... 9
Lexical Parameters......................................................................................................... 9
Debugging reports ....................................................................................................... 11
No data found .............................................................................................................. 12
End of report ................................................................................................................ 12
Fonts in character report ............................................................................................. 12
Report Conversion....................................................................................................... 12
Header template .......................................................................................................... 12
Others ............................................................................................................................ 13
References ..................................................................................................................... 13
Registering the report in Oracle Applications................................................................. 14
Creating Executable..................................................................................................... 14
Defining Concurrent Program ................................................................................... 14
Adding Parameters...................................................................................................... 15
Attaching report to responsibility ............................................................................. 16
Creating a Multi Language Report in Oracle Applications........................................... 18
Adding columns........................................................................................................... 18
Create a new Value Set ............................................................................................... 18
Enter values for the value set ..................................................................................... 19
After Parameter Form Trigger ................................................................................... 20
Layout editor ................................................................................................................ 22
Printing a bitmap report from Oracle Applications ....................................................... 23
Postscript Printer.......................................................................................................... 23
Check the printer Type ............................................................................................... 24
Create a new driver ..................................................................................................... 24
Create a new driver style ............................................................................................ 25
Add the printer style to printer type......................................................................... 26
Define Concurrent Program ....................................................................................... 26
Developing Oracle Application Reports
File Ref: Developing Oracle Application Reports

Document Control
(v. DRAFT 1C )

Technical White Paper

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Document Control
(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Developing Oracle Application Reports


This document defines the technical guidelines for developing Oracle Applications
Reports. The information has been drawn from standard documentation and
consulting experience from numerous customization projects. It is aimed to help all
the consultants developing reports in Oracle Applications. It will be helpful in
mentaining standards and debugging if the consultant follows the tips given below
while developing Oracle Applications report. The author welcomes all suggestions at
ajay.solanki@oracle.com.

Before starting report


Please confirm the following things before starting the report.
1.

The report is a character or a bitmap report.


If it is a character report then in the report properties, the Design in
character units property should be set to Yes else if it is a bitmap report
then the Design in character units property should be set to No.
In the System Parameters, the Mode parameter, the initial value should be
made as character or bitmap.

2.

Report style: Portrait (80x66), or Landscape (120x66), or Landwide (180x66).


In the System parameters, Orientation property, set the required initial
value.
In the Layout Model, Main section Properties, set the required width height
and orientation.

Before report trigger


Write the following code in the before report trigger if you are using any user exits or
it is a multi-org report.
SRW.USER_EXIT ('FND SRWINIT');
This sets your profile option values and allows Oracle Application Object Library
user exits to detect that they have been called by a Oracle Reports Program. It also
allows your report to use the correct organization automatically.

After report trigger


Write the following code in the after report trigger.
SRW.USER_EXIT ('FND SRWEXIT');
This ensures that all the memory allocated for Oracle Application Object Library user
exits has been freed up properly.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Query and group names


The query and groups should be given meaningful descriptive names instead of Q_1
and G_1. eg use Q_PO_HEADER, Q_PO_LINE, G_PO_HEADER, G_PO_LINE. This
will make it easier to identify the purpose of the query.

Field, Boiler text, repeating frame names


In the layout editor the name of the field displaying the column should be the same as
the column name. Eg if you are displaying the column requestor then the field name
should also be F_requestor and not F_1.
The names of the boiler text should be same as the text eg if the text is No data
found, then instead of B_1, use B_no_data_found.
When repeating frames are created manually, they are named as R_1, R_2 etc. They
should be given the same names as the Query group name eg R_PO_HEADERS if the
name of the group is G_PO_HEADERS.

Parameter
The parameter p_conc_request_id is necessary to run the report on applications if it is
a multi-org report. The concurrent manager passes the concurrent request id to your
report using this parameter.
Name:
p_conc_request_id
Datatype: Number
Width:
20

Column alias names


Give alias to all your columns as TableAlias_ColumnName.
If it is a attribute column then give the column alias as TableAlias_ColumnMeaning.
This makes it easier to identify from which table, the field is coming by looking at the
data model. Refer to the example in the address field.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Address field
Instead of Selecting address1, address2, address3, country, pin etc as separate fields
and then using the format trigger to hide the object if it is null, use CHR(10). The
format triggers make the report slower. Here the formatting is done in the query
itself.
Instead of using:
SELECT
PVS.vendor_site_id
,PVS.vendor_site_code
,PVS.address_line1
,PVS.address_line2
,PVS.address_line3
,PVS.address_line4
,PVS.country
PVS.zip
PVS.city
FROM po_vendor_sites PVS

PVS_vendor_site_id
PVS_vendor_site_code
PVS_address_line1
PVS_address_line2
PVS_address_line3
PVS_address_line4
|| '-' ||
|| ' ' ||
PVS_country_zip_city

Use the following:


SELECT

PVS.vendor_site_id
PVS_vendor_site_id
,PVS.vendor_site_code
PVS_vendor_site_code
,PVS.address_line1 || DECODE(PVS.address_line1 ,NULL,NULL,CHR(10))
|| PVS.address_line2 || DECODE(PVS.address_line2 ,NULL,NULL,CHR(10))
|| PVS.address_line3 || DECODE(PVS.address_line3 ,NULL,NULL,CHR(10))
|| PVS.address_line4 || DECODE(PVS.address_line4 ,NULL,NULL,CHR(10))
|| PVS.country || '-' ||PVS.zip || ' ' || PVS.city
PVS_address
FROM po_vendor_sites PVS

Format triggers
If you have n fields which have to be formatted with the same condition instead of
using format trigger on each of them separately, put them in a frame and use format
trigger on the frame.

Formula columns
Always write exception no_data_found in the formula columns.
function CF_supplier_contactFormula return Char is
lc_supplier_contact VARCHAR2(40);
BEGIN

SELECT PVC.first_name || ' ' || PVC.last_name PVC_fullname


INTO lc_supplier_contact
FROM po_vendor_contacts PVC
WHERE PVC.vendor_contact_id = :PH_vendor_contact_id ;
RETURN(lc_supplier_contact);
EXCEPTION
Developing Oracle Application Reports
File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

WHEN NO_DATA_FOUND THEN


RETURN ('');
END;

Numeric Formula columns


Always check for zero divide error and use NVL.
Ln_amount := (:qty * :rate) / :abc
Here if :abc is zero then you will get a zero divide error.
Ln_amount := (NVL(:qty, 0) * NVL(:rate, 0) ) /NVL( :abc, 1)

Data type of variables


Always use %type as the data type in formula columns.
function CF_requestorFormula return Char is
lc_requestor per_all_people_f.full_name%TYPE; -- Recommended
VARCHAR2(240) -- Not recommended
begin

Formatting amounts
All the amount columns should use the FND FORMAT_CURRENCY.
Currency formatting support provides a flexible, consistent method to format a
numeric value according to its associated currency. The currency value appears with
the correct thousands separator and radix character 9decimal point) of the users
country. The value appears with positive and negative indicators of users choice.
If you want to format a field called total_amount
Make a formula column CF_total_amount_DISP.
It should be of type character and size 20.
Copy the following code in the formula column.
SRW.REFERENCE (:currency_code);
SRW.REFERENCE (:total_amount);
SRW.USER_EXIT ('FND FORMAT_CURRENCY
CODE
= ":currency_code"
DISPLAY_WIDTH = "18"
AMOUNT
= ":total_amount"
DISPLAY
= "CF_total_amount_DISP"');
RETURN( LTRIM(RTRIM(:CF_total_amount_DISP))) ;
Note: Currency_code has to be selected in the query.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Precision Formatting
If you have a numeric column which has to be formatted according to the precision
parameter (P_qty_precision) then attach the library called inv.pll to your report.
In the format trigger for that field write
get_precision(:P_qty_precision);
return (TRUE);
In this case if you give the value of the precision parameter as 3 then the numeric
column will be shown as 1234.000. If you give the value of the precision parameter as
2 then the numeric column will be shown as 1234.00.

Lexical Parameters
Always use lexical parameters when you have to check in the query if the parameter
value is null or not.
Make a lexical parameter cp_where5
Datatype:
Character
Width:
500
Initial value: AND 1=1
Character comparision:
In the where clause of query, instead of using
AND ( :p_trx_class IS NULL OR
:p_trx_class

RACTT.TYPE)

In the before report trigger, use


IF (:p_trx_class IS NOT NULL) THEN
:cp_where5 := ' AND RACTT.TYPE = '''||:p_trx_class ||'''';
ELSE
:cp_where5 := ' AND 1=1';
END IF;
And in the where clause of query, use
WHERE RACT.cust_trx_type_id
AND RACTT.org_id
&CP_WHERE1
&CP_WHERE5
AND RACT.term_id
AND HZCAS.party_site_id

= RACTT.cust_trx_type_id
= fnd_profile.value('ORG_ID')

= RAT.term_id(+)
= HZPS.party_site_id

Character comparision between:


In the where clause of query, instead of using
AND (API.invoice_num >= :p_invoice_num_from OR :p_invoice_num_from IS NULL)
AND (API.invoice_num <= :p_invoice_num_to
OR :p_invoice_num_to
IS NULL)
In the before report trigger, use
IF :p_invoice_num_from IS NOT NULL AND :p_invoice_num_to IS NOT NULL THEN
:cp_invoice_num := ' AND API.invoice_num BETWEEN ''' || :p_invoice_num_from ||
''' AND ''' || :p_invoice_num_to ||'''' ;
Developing Oracle Application Reports
File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

ELSIF :p_invoice_num_from IS NOT NULL AND :p_invoice_num_to IS NULL THEN


:cp_invoice_num := ' AND API.invoice_num >= ''' || :p_invoice_num_from ||'''' ;
ELSIF :p_invoice_num_from IS NULL AND :p_invoice_num_to IS NOT NULL THEN
:cp_invoice_num := ' AND API.invoice_num <= ''' || :p_invoice_num_to ||'''' ;
ELSE
:cp_invoice_num := ' AND 1=1';
END IF;
Number comparision:
In the where clause of query, instead of using
AND ( :p_trx_type
IS NULL OR:p_trx_type

RACTT.CUST_TRX_TYPE_ID)

In the before report trigger, use


IF (:p_customer_id IS NOT NULL) THEN
:cp_where4 := ' AND RACT.bill_to_customer_id = '||:p_customer_id;
ELSE
:cp_where4 := ' AND 1=1';
END IF;
And in the where clause of query, use
WHERE RACT.cust_trx_type_id
AND RACTT.org_id
&CP_WHERE4
&CP_WHERE5
AND RACT.term_id
AND HZCAS.party_site_id

= RACTT.cust_trx_type_id
= fnd_profile.value('ORG_ID')

= RAT.term_id(+)
= HZPS.party_site_id

Number comparision Number between:


In the where clause of query, instead of using
AND (RACT.trx_number >= :p_trx_no_low OR :p_trx_no_low IS NULL)
AND (RACT.trx_number <= :p_trx_no_high OR :p_trx_no_high IS NULL)
In the before report trigger, use
IF (:p_trx_no_low IS NOT NULL AND :p_trx_no_high IS NOT NULL) THEN
:cp_where1 := ' AND RACT.trx_number between '||:p_trx_no_low||' and '||:p_trx_no_high;
ELSIF (:p_trx_no_low IS NOT NULL AND :p_trx_no_high IS NULL) THEN
:cp_where1 := ' AND RACT.trx_number > = '||:p_trx_no_low;
ELSIF (:p_trx_no_low IS NULL AND :p_trx_no_high IS NOT NULL) THEN
:cp_where1 := ' AND RACT.trx_number <= '||:p_trx_no_high;
ELSE
:cp_where1 := ' AND 1=1';
END IF;
And in the where clause of query, use
WHERE RACT.cust_trx_type_id
AND RACTT.org_id
&CP_WHERE1
&CP_WHERE5
AND RACT.term_id
AND HZCAS.party_site_id

= RACTT.cust_trx_type_id
= fnd_profile.value('ORG_ID')

= RAT.term_id(+)
= HZPS.party_site_id

Date comparision when the date parameter is of type date


In the where clause of query, instead of using
Developing Oracle Application Reports
File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

10

Technical White Paper

AND

AND

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

( :p_print_date_low
IS NULL OR
RACT.printing_last_printed >=
TO_DATE(TO_CHAR( :p_print_date_low ,'YYYY/MM/DD') ||' 00:00:00'
,'YYYY/MM/DD HH24:MI:SS')
)
( :p_print_date_high
IS NULL OR
RACT.printing_last_printed <=
TO_DATE(TO_CHAR( :p_print_date_high ,'YYYY/MM/DD') ||' 23:59:59'
,'YYYY/MM/DD HH24:MI:SS')
)

In the before report trigger, use


IF :p_print_date_low IS NOT NULL AND :p_print_date_high IS NOT NULL THEN
:cp_where2 := ' AND RACT.printing_last_printed BETWEEN
TO_DATE('''|| TO_CHAR(:p_print_date_low, 'DDMMYYYY')||'000000'''||
' ,'||'''DDMMYYYYHH24MISS'''||')'||
' AND TO_DATE('''|| TO_CHAR(:p_print_date_high, 'DDMMYYYY')||'235959'''||
' ,'||'''DDMMYYYYHH24MISS'''||')' ;
ELSIF :p_print_date_low IS NOT NULL AND :p_print_date_high IS NULL THEN
:cp_where2 := ' AND RACT.printing_last_printed >=
TO_DATE('''|| TO_CHAR(:p_print_date_low, 'DDMMYYYY')||'000000'''||
' ,'||'''DDMMYYYYHH24MISS'''||')' ;

ELSIF :p_print_date_low IS NULL AND :p_print_date_high IS NOT NULL THEN


:cp_where2 := ' AND RACT.printing_last_printed <=
TO_DATE('''|| TO_CHAR(:p_print_date_high, 'DDMMYYYY')||'235959'''||
' ,'||'''DDMMYYYYHH24MISS'''||')' ;
ELSE
:cp_where2 := ' AND 1=1';
END IF;

And in the where clause of query, use


WHERE RACT.cust_trx_type_id
= RACTT.cust_trx_type_id
AND RACTT.org_id
= fnd_profile.value('ORG_ID')
&CP_WHERE2
&CP_WHERE5
AND RACT.term_id
= RAT.term_id(+)
AND HZCAS.party_site_id
= HZPS.party_site_id

Debugging reports
You can always return important values by using
SRW.MESSAGE(111,'FAILED TO UPDATE PRINT DATE');
SRW.MESSAGE(112, cp_where2 is || :cp_where2);
These messages can be seen in the log file.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

11

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

No data found
The report should display message *****NO DATA FOUND***** if the query does
not return any rows.
Make a text field with text *****NO DATA FOUND*****
Make a summary column CS_count which gives count of a not null field in the main
query.
Make a format trigger on the text item, if CS_count >0 then hide the object. It should
be center aligned with respect to the page.

End of report
The report should display *****END OF REPORT***** after the last line of the report
is printed. It appears only once per report. If you are printing Pos for the range PO
Number 1 to PO number 20, then the end of report will come after PO number 20 is
printed. It should be center aligned with respect to the page.

Fonts in character report


It is advisable not to have different fonts in character report as the report will become
printer specific. It is suggested to make the report in bitmap mode.

Report Conversion
To convert a bitmap report into character report, go to File  Administration 
Convert
In the Conversion tab enter the following values:
Document Type: Report
Source File:
Report Binary File (RDF)
Source:
Mention the source of the file.
Destination Type: Report Binary File (RDF)
Destination:
Mention the destination
In the Options tab
Destination Unit: Character.
Override: Prompt

Click on Ok button. The report will be converted into character mode.

Header template
Open the properties of the report. In the comments section, paste the header template
which describes who has created the report, when it was modifed and the
functionality of the report.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

12

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Others
Transfer the report in binary mode to server.

References
For more information, please refer to
1.

Build_Standards_MD040.DOC

2.

Oracle Applications Developers Guide.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Developing Oracle Application Reports


(v. DRAFT 1C )

13

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Registering the report in Oracle Applications

Assume that you want to register a report in Purchasing super User.


Report Name: XXSSIPOEDOC.rdf

Creating Executable

System Administrator  Concurrent  Program  Executable


It is suggested that the executable name, short name and execution file name be same
as the rdf name.

Defining Concurrent Program

System Administrator  Concurrent  Program  Define


Enter the values as shown.
Choose the Output format as PDF for bitmap report and Text for character reports.
Choose the required style- Portrait, Landscape, Landwide etc

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Registering the report in Oracle Applications


(v. DRAFT 1C )

14

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Adding Parameters
Click on the parameter button and enter the required parameters.
The important thing to note is that the token should be the same as parameter name
in the report.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Registering the report in Oracle Applications


(v. DRAFT 1C )

15

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Attaching report to responsibility

Adding the report to the Purchasing Super User Responsibility:


System Administrator  Security  Responsibility  Define
Query for the responsibility name ie Purchasing Super User
Note the Request Group name ie All Reports
Note the Application Name ie Oracle Purchasing

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Registering the report in Oracle Applications


(v. DRAFT 1C )

16

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

System Administrator  Security  Responsibility  Request


Query for the Group: All Reports
Application:
Oracle Purchasing:

Add your report to the Group.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Registering the report in Oracle Applications


(v. DRAFT 1C )

17

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Creating a Multi Language Report in Oracle Applications


Quite often we have the need to create a multi-language report in Oracle applications.
Here the headings of the column displayed will change according to the parameter
P_LANGUAGE.

Adding columns
Query the Descriptive Flexfield, Flexfield Segment Values.
Unfreeze the segment definition.
Click on the Segment button and add the required number of attributes.

Freeze the Flexfield definition and press the Compile button.

Create a new Value Set


Create a new Value Set, eg XXSSI_AR_EDIIREP_LANG with validation type
Independent and maximum size 240.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Creating a Multi Language Report in Oracle Applications


(v. DRAFT 1C )

18

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Enter values for the value set


System Administrator  Application  Validation  Values
Choose Find Values by: Value Set
Enter the value set name and click the Find button.

Enter a record for the required language.


Developing Oracle Application Reports
File Ref: Developing Oracle Application Reports

Creating a Multi Language Report in Oracle Applications


(v. DRAFT 1C )

19

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Click on the DFF and enter the values in the corresponding language.

After Parameter Form Trigger

Create various parameters to hold the attribute values.


In the after parameter form write the following code.
function AfterPForm return boolean is
begin

SELECT
Developing Oracle Application Reports
File Ref: Developing Oracle Application Reports

Creating a Multi Language Report in Oracle Applications


(v. DRAFT 1C )

20

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

attribute6
--date:
,attribute7
--terms of payment:
,attribute8
--your ref.:
,attribute9
--department
,attribute10
--our ref.:
,attribute11
--tax number:
,attribute12
--page:
,attribute13
--interest on late payment
,attribute14
--invoice no.
,attribute15
--due date
,attribute16
--late payment amount
,attribute17
--days
,attribute18
--rate
,attribute19
--total
,attribute20
--phone:
,attribute21
--fax:
,attribute22
--internet:
,attribute23
--cvr number:
,attribute24
--bank / swift adr. :
,attribute25
--bank account:
INTO
:pl_date
,:pl_terms_of_payment
,:pl_your_ref
,:pl_department
,:pl_our_ref
,:pl_tax_no
,:pl_page
,:pl_interest_late_payment
,:pl_invoice_no
,:pl_due_date
,:pl_late_payment_amount
,:pl_days
,:pl_rate
,:pl_total
,:pl_phone
,:pl_fax
,:pl_internet
,:pl_cvr_number
,:pl_bank_swiftadr
,:pl_bank_account
FROM fnd_flex_values FFV
,fnd_flex_value_sets FFSV
WHERE FFSV.flex_value_set_id
= FFV.flex_value_set_id
AND
FFSV.flex_value_set_name = 'XXSSI_AR_EDIIREP_LANG'
AND
flex_value
= :p_language;
RETURN(TRUE);
End;

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Creating a Multi Language Report in Oracle Applications


(v. DRAFT 1C )

21

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Layout editor

In the layout editor reference the parameter fields as &pl_due_date etc.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Creating a Multi Language Report in Oracle Applications


(v. DRAFT 1C )

22

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Printing a bitmap report from Oracle Applications


There are certain settings which are required to prin t the report in bitmap mode, pdf
format from oracle applications. This section will explain how to go about printing a
bitmap report in pdf format from the oracle applications.
We need to create the printer drivers and styles as follows. The printer we are using
should be a postscript printer.

Postscript Printer
Ask the DBA to configure a postscript printer to apps. Let us call this printer as
factprinter.
Ask the DBA to install Acrobat reader on the application server.
Put a pdf file on the server and try printing the pdf file from the OS
OS should be able to print PDF files directly from prompt.
cat < PDF document > | /usr/Acrobat4/bin/acroread -toPostScript -shrink | lp -c d < Printer > -n
Example go to the directory where you have put the pdf file in bitmap mode and
give the following command:
cat test.pdf | /factd4/applmgr/Acrobat5/bin/acroread -toPostScript -shrink | lp -c
-d factckprinter
Where
test.pdf is the name of the test pdf file to be printed.
/factd4/applmgr/Acrobat5/bin/acroread is the location where the acrobat reader is
installed
factckprinter is the name of the printer.
Once the command works from the OS, register a new driver and type as follows.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Printing a bitmap report from Oracle Applications


(v. DRAFT 1C )

23

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Check the printer Type


System Administrator  Install  Printer  Register.
Query all the records and check the type of the factckprinter.
Change the printer type to HPLJ4SI, and bounce the concurrent manager.

Create a new driver

System Administrator --> Install --> Printer --> Driver


Create a new driver as follows:
a. Driver Name: PDF_PORTRAIT_DRIVER
b. User Driver: PDF Portrait for HPLJ4SI
c. Driver Method: Command
d. Arguments:
cat $PROFILES$.FILENAME | /opt/Acrobat4/bin/acroread -toPostScript -shrink |
lp -c -d$PROFILES$.PRINTER -n$PROFILES$.CONC_COPIES
-t"$PROFILES$.TITLE"
Example:
cat $PROFILES$.FILENAME | /factd4/applmgr/Acrobat5/bin/acroread toPostScript -shrink | lp -c -d$PROFILES$.PRINTER -n$PROFILES$.CONC_COPIES
-t"$PROFILES$.TITLE"
Where
/factd4/applmgr/Acrobat5/bin/acroread = path where the acrobat reader is
installed
e. Driver Method: Comand.
f. Driver Method Parameters: Standard Input "checked"
Save your new driver.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Printing a bitmap report from Oracle Applications


(v. DRAFT 1C )

24

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Create a new driver style


System Administrator  Install  Printer  Style.
We'll create new style as follows
a. Style Name: PDF_PORTRAIT_STYLE
b. Seq: an unique number
c. User Style: PDF Protrait
d. SRW Driver: HPL
e. Description: PDF Protrait
f. Columns: 80
g. Rows: 55
h. Orientation: Protrait
i. Save your work.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Printing a bitmap report from Oracle Applications


(v. DRAFT 1C )

25

Technical White Paper

Doc Ref: NAIO/APP_REPORTS


April 11, 2004

Add the printer style to printer type


System Administrator  Install  Printer  Types - we'll change an existing type:
HPLJ4SI
a. Enter query Mode and find HPLJ4SI
b. Here, add a new Style: PDF_PORTRAIT_STYLE (from LOV)
and the new Driver Name: PDF_PORTRAIT_DRIVER (from LOV).
c. Save your work.

Define Concurrent Program


Create an Executable and a Concurrent Program for the report to be printed. In the
Concurrent Program set the Format as PDF and Style as
PDF_PORTRAIT_STYLE.

Developing Oracle Application Reports


File Ref: Developing Oracle Application Reports

Printing a bitmap report from Oracle Applications


(v. DRAFT 1C )

26

Das könnte Ihnen auch gefallen