xml publisher 101: learn to code like the mastersdavidvandiver.com/portfolio/xmlpheugalliance.pdfxml...

43
XML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014

Upload: vanhanh

Post on 02-Apr-2018

220 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

XML Publisher 101: Learn to Code Like the Masters

Session #33299

March 12, 2014

Page 2: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

David Vandiver

• Lead Technical at Fort Bend ISD (SW Houston)

• Prior Life: Consultant for 15 years

University of Houston

UT Health Science Center - San Antonio

International Red Cross – Geneva

Presented “Adding Rich Excel Reporting To Your

PeopleSoft Web” at Alliance 2006

Page 3: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Fort Bend ISD & Oracle

• Customer since 2006 with version 8.9

• Finance, HCM, & Portal - 9.1

• CRM - 8.9

• Tools version 8.50

• Currently performing Hardware Upgrade

• Planning has begun to upgrade Finance to 9.2, with

HCM to follow

Page 4: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

XML Publisher

• Never built an XML Publisher Report?

• Using XML Publisher (beginner)?

• Using XML Publisher (expert)?

Survey

Page 5: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• Review XML Publisher basics

• Discover two methods to execute XML Publisher, complete

with example code.

• Learn advanced techniques used in Microsoft Word when

building the XML Publisher template.

Session Objectives

Page 6: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Review XML Publisher Basics

Primer

Page 7: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• Released in Tools 8.48

• XML Publisher = BI Publisher

• Replacement for SQR and Crystal?

XML Publisher Facts

Page 8: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Allows the data extraction and report layout to be built and

managed independent of each other

Data and Layout

Page 9: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

PDF to create your first XML Publisher Report:

Available at Alliance website with presentation files.

(Covers the XML Report setup and App Designer portions.)

XML Primer

Page 10: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Discover the Page method

to execute XML Publisher

Page Method

Page 11: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

User Execution – Page

Page 12: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Build Query Report Template Method to Execute

Design Cycle – Page

Page 13: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Pushbutton on a Page Example:

• FieldChange PeopleCode

• Query as the source

• No process scheduler involved

Benefits:

• Quick processing time (No Prcs Scheduler)

Watch:

• Page may not be saved yet

Page Method Details

Page 14: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Build Query

• Based on PSRoleUser and PSOprDefn

• Prompt on RoleName

Build Data - Page

Page 15: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Run Query to XML

• Retrieve Sample XML File

Sample XML Data - Page

Page 16: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• Import XML File (sample data)

• Build template (utilized table wizard)

• Upload template to XML Report Defn

Build RTF Template - Page

Page 17: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Build Page with four pushbuttons

Build Execution – Page

Page 18: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Add FieldChange Peoplecode to first button

Build Code - Page

Page 19: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Testing Page

Page 20: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Testing Page

Video of Page Example

Page 21: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Discover the Batch method

to execute XML Publisher

Batch Method

Page 22: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

User Execution - Batch

Page 23: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Method to Create XML File Report Template Finish Method

Design Cycle – Batch

Page 24: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Batch Example:

• Uses App Engine process

• App Engine creates the data source (XML File)

• Process scheduler involved

Benefits:

• Complex statements to create the XML data file

• Complex Emailing Rules can be designed

• Can be scheduled

Watch:

• Connected Query (alternate solution)

• Use unique names for XML File

Batch Method Details

Page 25: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Build Batch Page and App Engine

• Basic Run Control page

• App Engine

Build Data - Batch

Page 26: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

AE Step 1 - BatchFirst Step: Load data into Temp Table.

Page 27: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

AE Step 2 - BatchSecond Step: Create the XML Data File.

Page 28: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Run App Engine

• Retrieve Sample XML File in Log Directory

Sample XML Data - Batch

Page 29: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• Import XML File (sample data)

• Build template (utilized table wizard)

• Upload template to XML Report Defn

Build RTF Template - Batch

Page 30: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

AE Step 3 - BatchThird Step: Run the XML Publisher.

Page 31: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Testing Page

Video of Batch Example

Page 32: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Expand your knowledge on advanced techniques

for building the RTF template

Expand

Page 33: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• Oracle’s Website has both a version 10 and 11.

• For PeopleSoft customer’s, per an Oracle

support document, it is best to use version 10.x.

We have had success with 11.x.

• The latest version as of this presentation is

10.1.3.4.2.

Oracle BI Version

Page 34: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• Spend time on the front end to have the right

extract. Adding more fields or adding more

records can alter the xml record layout, which

could mean re-work on the report template.

• Place function/logic more often on the query

side and less in the RTF template. This allows

the database to handle formulas instead of the

XMLP (such as substring, etc.).

Query’s XML File

Page 35: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• This trick comes from an HTML technique of

using HTML tables with no borders/lines.

• When placing data in the header/footer, use

tables (with no lines) to keep data uniform and

aligned.

Clean Headings

Page 36: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• Use <?template:x?> to write the header in the body of Word instead of in the header.

Templates

Page 37: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• The font needs to be installed on both the client (for

development) and server (for use by the end user).

• Next, you pick the field and change the font to be

the Bar Code font.

• The final piece is you need to reference the bar

code in both the local and server xdo.config file.

Bar Codes

Page 38: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• You can set and get variables.

• Useful if you need to aggregate on a field

found on all rows of your xml data.

Use Variables

Page 39: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• If possible, mask the number before the data

gets written to the XML file.

• If the data in the xml file cannot be changed,

then you can mask the number in a formula:

Masking a Number

<?xdofx:substr('**********',1,6)?>

<?xdofx:substr(BNK_ID_NBR_CUST,7,3)?>

(all in a single formula window)

Page 40: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• XML Publisher Tips for PeopleTools

by Lori Haussermann

http://www.oracle.com/technetwork/middleware/bi-

publisher/xmlpublishertips4peopletools-163309.pdf

• Oracle XML Publisher Integration with PeopleSoft

by Mr. “Venkat”

http://www.slideshare.net/JAYAARC/xmlpublisher

• PeopleSoft XML Publisher Primer

by David Vandiver

http://peoplesofttricks.com/pdf/xmlp.pdf

• More XML Publisher Tricks

http://peoplesofttricks.com

Additional Resources

Page 41: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David
Page 42: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

• David Vandiver

• Tech Team Lead, Financials

• Fort Bend ISD

• E-mail: [email protected]

• Presentation Download

• Alliance Conference website

• Additional Techniques at www.PeopleSoftTricks.com

Contact / Information

Page 43: XML Publisher 101: Learn to Code Like the Mastersdavidvandiver.com/portfolio/xmlpHEUGAlliance.pdfXML Publisher 101: Learn to Code Like the Masters Session #33299 March 12, 2014 David

Presentations from previous meetings are also available

This presentation and all Alliance 2014 presentations are

available for download from the Conference site at

www.alliance-conference.com