Sei sulla pagina 1di 101

BI Publisher and E-Business Suite R12:

The Basics of Customizing Delivered


Templates
Session ID #8
Rhonda Stonaker
Infosemantics, Inc.
Agenda

• Overview

• Hands On – Modify AP Invoice Register


Report

• Questions
Overview
• Separates source of Report
Template
data from
presentation of data XSL

BI Publisher
• Data Template Processing
Engine
Produces XML Data Formatted
Output

• Report Template
formats data

XML Data
XML EDI
XML Data
• Any Valid Source
• Oracle Reports
• SQL, SQLX,
PL/SQL
• Scripting (Perl,
PHP,etc)
• Email, FTP
• Discoverer
• XML data template
• Multiple Uses
• One XML File,
Multiple Template
• One template,
multiple XML Files
• Conditional Subsets
Report Templates
• Create with Text Tags
common desktop
tools
• MS Word
(RTF, EDI,
XSL)
• Adobe
Acrobat Text Form Fields
(PDF)
• MS Excel
• Template Markup
Tags
• Text Tags
• Text Form
Fields (RTF
Only)
Formatted Output
• Advanced
Formatting
• Precision Control
• User Interactivity
• Parameters
• Sorting
• Links, Drilling
• Conditions,
Exceptions
• Formulas
• Charts and
Graphs
Processing Engine
RTF
• Merges XML Data with Report PDF
Processor

Template Processor

• PDF, RTF, EDI Processors


Engine
• Three Versions
• Desktop
• Version 5.6.3
• Enterprise Edition
• Version 10.1.3.4 EFT

• Oracle Applications
Processor

• Version 5.6.3 processing


engine embedded in E-
Business

How the processing engine works


Report Delivery
Data Source Layout Output Delivery
Email
Oracle DB, PDF
MS SQL Server

RTF

Oracle Reports, Printer


PL/SQL, Java, HTML
Perl, etc

EXCEL
Oracle 11i, XSL
PeopleSoft, Fax
SAP, Siebel
Templates XML

EDI WebDAV
Web Services

EFT WWW
Requirements
• EBS 11i/R12
• Patch #: 12395372 is the latest
• Version 10.1.3.2.1 Desktop included
• For EBS server version 5.6.3 in 11i/R12
• Refer to Overview of Available Patches for Oracle XML Publisher
(embedded in Oracle E-Business Suite) [ID 1138602.1]
• Includes latest server and desktop patches
• Desktop Plug-in Includes
• Template Builder for Word
• Template Viewer for Word for previewing (requires Java and .Net)
• Flash Demos
• Sample Templates
• AND NOW FOR THE “GOTCHAS”…
Requirements
• Template Builder version 10.1.3.2.1 included in patch
#12395372 can only be installed on Windows
XP/2k/Vista – this is the only version that can be used
to design templates that will work with EBS without
issue
However, for the rest of us who have moved on to newer
technology, there is a pretty good solution:
• Download and install BIP Enterprise Desktop version
10.1.3.4.2 from OTN
• Works with Windows 7 AND Word 2010
• Known problem with pivot tables (crosstabs) not
being compatible, but will “mostly” work with EBS BI
Publisher version 5.6.3
Requirements
Download 10.1.3.4.2 from www.otn.oracle.com:
Other Template Builder
Considerations
From Note# 1138602.1:
Note: The Template Builder for Excel 11.1.1.5.0 is not included in the above
listed patches. For true Excel Template design (Creating Excel Templates) it is
required to:
• Uninstall the BI Publisher Desktop 10.1.3.2.1
• Install Oracle BI Publisher Desktop 11.1.1.5.0 for Windows (download)
• Use the Template Builder for Excel 11.1.1.5.0 for creating Excel templates

Oracle E-Business Suite 11i and Release 12 customers must not use the
Template Builder for Word as part of Oracle BI Publisher Desktop 11.1.1.5.0 for
RTF layout template design as it is not backwards compatible.

FYI at this time there is limited support for Excel templates in R12.0 and 12.1.
There is no support for Excel templates in 11i.
The best solution for EBS clients wanting to use Excel templates is to license
and install BIP Enterprise 10g or 11g, and run the reports from there.
Installation of Template Builder
• After downloading zip file from OTN, run the installer, choose
setup language and all defaults
• May have to specify a location for Java JRE – required to use
the Preview function
Installation of Template Builder
• Once the installation is complete, verify that BI Publisher shows
up under the Add-Ins menu, and verify the version is 10.1.3.4.2
Delivered Templates
• In EBS R12, 2000+ templates delivered across most
modules

• Templates may be associated with inactive and/or


unassigned concurrent programs, but can easily be
copied/associated with custom concurrent programs
for your use

• Provide a great starting point for template


development, no need to start from scratch
Delivered Templates
To review delivered
templates:
• Must have the XML
Publisher Administrator
responsibility assigned

• Click on Templates –
will bring up a
searchable form
Delivered Templates
Searching for just Payables templates will give you about 100 different
templates to choose from
Delivered Templates
Searching for Payables templates with the word “Invoice” in them will give
you almost 20 different templates to choose from
Delivered Templates
Trace lineage of delivered templates:
• Template to Data Definition
• Data Definition to Concurrent Program
• Concurrent Program to Executable
Delivered Templates
From Template, get Data Definition Code/Name and
see/download layout template:
Delivered Templates
Review the Data Definition:
Delivered Templates
Using the Data Definition Code, query for the
Concurrent Program Short Name to determine that
an Oracle Reports program (rdf file) is the source tied
to this template
Delivered Templates
Alternatively, when we trace a different template file
back we find another source:
Delivered Templates
Again, looking at the template details provides the
Data Definition name and code, and the template
name:
Delivered Templates
This time we find a Data Template under the Data
Definition tab. Data Templates are XML files used to
generate the source XML data file for the template:
Delivered Templates
Header and Parameters section of the Data Template
file:
Delivered Templates
Lexicals and sql statement sections of the Data
Template file:
Delivered Templates
Data structure and group name sections of the Data
Template file:
Delivered Templates
The delivered Java program XDODTEXE calls the
delivered Data Template APXINRIR_XML to generate
source XML data for the template:
Recap
• BI Publisher is a very powerful reporting tool, much
easier/flexible than Oracle Reports
• EBS R12 delivers many more seeded BI Publisher
content than 11i, better quality too
• Though the BI Publisher delivered with EBS R12 is
feature-rich, it still lags behind the latest Enterprise
versions of BI Publisher
• Before starting a BI Publisher project from scratch,
see what is already delivered that you may leverage
to reduce development time and efforts
How to Modify
AP Invoice Register
What Does Delivered Report
Look Like?

Run a request using the Invoice Register concurrent program


View the Output
Note things that need to be changed:
• Need logo

• Change fields in
header, and should
repeat on other pages

• Want page break after


each vendor name

• Don’t use “batch”


functionaliity

• Add filter
View the Template
View the CP to get short name and other info:

• Note that this


is an Oracle
Reports
based
program, not
a Data
Template
using
XDODTEXE
View the Template
Using the XML Administrator > Templates menu path, query
for the template using the short name APXINRIR:

Click on the template name hyperlink to view the details


View the Template
Notice that you can download the template, but the Preview,
Update and Delete icons are greyed out – click the download
icon to open the template in Word:
View the Template
This shows you the code behind the
template – tables, form fields and data
fields:
Generate XML Data File
For Testing
Return to the Payables responsibility, view requests, find the
Invoice Register request you ran earlier – click the
Diagnostics button, then View XML:
Generate XML Data File
For Testing
• This is the XML data
file created by the
delivered program

• Save this file locally as


.xml to use when
testing and developing
template changes

• May need to convert to


‘DOS’ format if
prompted, the “-” may
cause problems
Generate XML Data File
For Testing
• Review generated
data
• Oracle may (or
not) furnish
report name
• Look at each
grouping (starts
with dash)
• Look at end of
report for fields
that can also be
used
• Parameters
• Constants
Notes on Developing
and Testing
• With just a template, the Template Builder for Word,
and a sample XML data file most of the development
can be done off-line from EBS using the Preview option
– however, will want to test with different data sets as
well
• As always, make copies of the delivered programs and
templates and modify the copies, leaving the seeded
functionality intact
Open Template Builder
Start MS Word, ensure that the new menu item Add-Ins is
available:
Setup Template Options
• MS Word,
Add–Ins,
Oracle BI
Publisher
• Add-in Tab
|Tools |
Options
• Build Tab
• 'Abbreviated'
chosen for
For–each
form field
Load Sample XML Data
• Data | Load
XML Data
• Select file
saved from
running
Invoice
Register to
XML, click
Open,
receive Data
loaded
successfully
message
Set Page Layout
• Using standard Word functionality
• Set Orientation to Landscape
• Set Margins
• Set Font and Size
• Set Style
Modify Report Page Header

Report headers can be done in 2 ways:


• Using XSL code, like the delivered
template:

• Using Word’s built-in header


functionality:
Caution: Form Fields are not
allowed in Word
headers/footers, only text
tags
Modify Report Page Header

• Use standard Word header functionality


• XML data may include Report title, may have to hard code
• Insert logo, clean up second header, etc.

Use tables to align data, in header and body of report:


Modify Report Page Header

Check your work using the Preview option:

Header repeats on page 2


Page Break by Supplier
Want to start a
new page at
each change
in Supplier to
help with
report
distribution:
Page Break by Supplier
Need to insert page break form field right before End
Vendor Break – can copy/paste field then change
• Double-click on
new form field to
open Properties
box
• Replace End for-
each with split-
by-page-break:
• Also change Text
to display so it’s
not confusing
• Click OK to save
Page Break by Supplier
Preview report to verify change:

Page break after


each vendor total
Remove “Batch” References

Not using batch functionality, remove these references


in the template:

Don’t need this


extra section
Remove “Batch” References

• Need to remove the


table and all group by
references, beginning
and ending

• Highlight form
fields/table, then delete

• Must delete Group


start/end, Subtotal
start/end and table
Remove “Batch” References

Preview to verify your results:

Be sure to
delete any
extra rows,
these will
show up in
the output
Add Filter on Amt Remaining
Want to filter this report so only those invoices with an
amount remaining not equal to $0 are shown:

Note: Good practical use of a filter, but this data shows all
amounts remaining = 0…
Add Filter on Amt Remaining
Add a start tag right after the vendor grouping:
• Put cursor right
after Group
Vendor Break

• Developer
menu > Legacy
Tools > Text
Form Field
(instead of
copy/paste)

• This inserts
grey box after
Group Vendor
Break
Add Filter on Amt Remaining
• Double click on
new grey box,
opens Properties

• Enter filter code


<?if:C_AMOUNT
_REM!=0?>, then
click Word
Properties

• Enter filter
description in
Default Text box

• Click OK, OK
Add Filter on Amt Remaining
Add an end tag right before vendor grouping
end:
• Place cursor
between Vendor
Page Break and
End Vendor Break

• Insert Legacy
Form Field

• Double Click on
resulting grey box
to open Properties
Add Filter on Amt Remaining
• Enter filter code
<?end-if?>,
then click Word
Properties

• Enter filter
description in
Default Text
box

• Click OK, OK
Add Filter on Amt Remaining
Preview report to verify results:

In this case, all invoices have an amount remaining = 0, so no


results are showing – will remove filter for demo purposes
Review Results So Far

Let’s see if there are any more fields available that we might
want to add…
Available Fields
Click on Add-Ins > Insert > Field to see available fields:
Available Fields
Don’t see any fields to
add in the details of the
report, but would like to
add more report
parameters – found at the
bottom of the field list

Want to add Cancelled


Invoices Only and
Unapproved Invoices Only
flags to header
Available Fields
Also helpful to
browse through
XML data output
file to see if
anything needs to
be added, as
sometimes field
names aren’t very
descriptive:
Add Fields to Header
Click Insert > Header > Edit Header:
Add Fields to Header
Add 2 columns (one for Title, one for data) to the header table
using standard Word functionality:
Add Fields to Header
Since this is header area, must type in data field names –
choosing from data field list is not available in header/footer:

Receive error
message when
trying to insert
from field browser
Add Fields to Header

Type field names


into columns as
they appear in
the field browser
Add Fields to Header
Preview report to verify results:
Design Tips
• Every character in template will show in report results
– spaces, line feeds, etc.
• If you’re seeing blank pages or strange formatting,
check the template for extra spaces or rows (turn
on Word’s “Show Formatting Marks” feature)
• Review template to make sure same font is used
throughout, and font size/bold/italic applied
consistently
• Check template results using a different XML data set
to ensure all contingencies are addressed
• Different languages
• Different currencies
• Different field values
Final Check
• Validate
Template

• Error messages
are not always
helpful, but does
identify line
Ready to Test in EBS
• We have been using the XML output and template that
are associated with the seeded Payables concurrent
program Invoice Register (APXINRIR)
• The Template associated with APXINRIR can’t be
updated, as we saw earlier – however can use
duplicate
• As standard practice, make a copy of the Invoice
Register concurrent program (same executable, just
new short name), create a new Data Definition for the
new short name, then a new Template record so the
modified template can be uploaded
• Also need to add new concurrent program to the
appropriate request group
Create Custom Copy of Existing Invoice
Register Concurrent Program

• Concurrent |
Program |
Define
• System
Administrat
or or
Application
Developer
• Query program

Choose the
Copy to button
Create Custom Copy of Existing Invoice
Register Concurrent Program
• Enter slightly
different
Program, Short
Name

• Click Include
Parameters and
Include
Incompatible
Programs

• Click OK
Create Custom Copy of Existing Invoice
Register Concurrent Program

• Change
Output Format
to XML

• Save work
noting new
Short Name
Create Custom Copy of Existing Invoice
Register Concurrent Program
• Register Report to
Request Group
• Security |
Responsibility |
Request
• Query Group
assigned to
responsibility
where report
will be run
Load Template into EBS
• Use XML Publisher Administrator responsibility
• Home | Data Definitions
• Click Create Data Definition
Load Template into EBS
• Enter any Name
• Code MUST match Short Name of Concurrent Program
definition with XML output
• Click Apply
Load Template into EBS
• Query Data Definition just created
• Click the link under Name
Load Template into EBS
• Click Add File next to Preview Data to load XML data file used
in template build testing
Load Template into EBS
• Click Browse button, select file from PC file system, click Open
• Selected file name fills into Preview Data box
• Click Apply
Load Template into EBS
• Click Templates tab
• Click Create Template
Load Template into EBS
• Enter any Name,
Code, Description

• Data Definition must


match one just
defined

• Since template
created in Word, set
Type to RTF

• Set Subtemplate to
No
Load Template into EBS
• Click Browse to upload template file from PC file system
• Enter Language and Territory
• Click Apply
Load Template into EBS
• Click Preview to verify template is correct
• If correct, report will show
Modifying a Seeded Template

• Copy the template record using the Duplicate icon in the


template page
• Download/modify/upload the duplicated template
End date the original template record and only copy will be
available for published output
Test Report
• Return to
responsibility
where report
registered

• Verify
template
name in
Layout
Test Report
• Click Options
and verify
Template
Language and
Format

• Close Options
window and
click Submit

• When report
finishes, click
View Output
View Finished Report
Add Parameter to Report
• MetaLink Doc. ID 741301.1 "Implement Concurrent
Request Parameter Values In RTF Layout Template"

• Allows adding parameter without modifying Oracle


code

• Delivered standard in first release of R12; backported


to 11i, requires certain files/patchsets to be applied
(see note above)
Add Parameter to Template
• Place cursor before first F
• Add Form Field Legacy
• Developer Tab Tools
• Click Design Mode
• Click Legacy Tools Text
button Form
• Click Text Form Field
• Double–click resulting
gray field to open
Properties page
• Enter description of filter in
Default text:
• Click Add Help Text…
Resulting
Gray box
Add Parameter to Template
• Click Type your own:
• Enter condition using
syntax <xsl:param name =
"<parameter_name>"
xdofo:ctx="begin"/>
• Replace
<parameter_name>
with name of
parameter
• Do not use $ in
parameter name
• Click OK then Click OK Note: until you add this parameter definition to the template the
parameter will not be included in the XML output, even if it is
defined in the concurrent program
Replace Filter Start Tag
Help Text
• (Earlier we applied
this filter, then took it
out because no
invoices met the
condition)

• For condition Logical


or/and use <xsl:if test
= "condition">

• Parameter must be
preceded by $

• Click OK twice
Conditional Heading
• Place <?if:$P_UNPAID=‘Y'?> just before Unpaid Invoices and
<?end if?> immediately after
• Remember, cannot use form field in Header/Footer
Add Parameter to Concurrent Report
Definition

Ensure values will


match those values
used in template

Name must match


name used as
parameter name
in template
Upload Updated Template
• Query
Template
• Click Update
• Use the
Browse
button to
select
updated file
from PC file
system
• Click Apply
Run Report
Unpaid Invoices only?=Yes Unpaid Invoices only?=No
Developer Resources
Extended SQL and XSL Functions:
http://docs.oracle.com/cd/E10415_01/doc/bi.1013/e1
2187/T421739T481158.htm
Additional Resources
• OAUG Knowledge Factory
• BI Publisher Blog by Tim Dexter
• http://blogs.oracle.com/xmlpublisher/
• BI Publisher for Oracle E–Business Suite by Roel A. Hogendoorn
MSc
• EBS Documentation
• Release 11i.10.2+ – User's Guide
• Release 12 – Administration and Developer's Guide
• MetaLink Communities and Knowledge Browser (XML and/or BI
Publisher)
• Infosemantics Demo EBS R12 environment (registration required)
• http://www.infosemantics.com/infosemantics-oracle-r-
vision.html
About Infosemantics
•Established in 2001
•Commercial, Higher Education, and Federal Government client base
•Senior resources averaging 15 years of experience

10
0
Q&A
Thank You!
Rhonda Stonaker
Rhonda.Stonaker@infosemantics.com
www.infosemantics.com

Potrebbero piacerti anche