- SNUG - PeopleSoft... Stephen Wills Applied Technology Sales Consultant ... examining the...
Transcript of - SNUG - PeopleSoft... Stephen Wills Applied Technology Sales Consultant ... examining the...
<Insert Picture Here>
Stephen Wills
Applied Technology Sales Consultant
PeopleSoft Advanced Reporting Tips & TechniquesSouthern New England User Group Meeting, October 17th, 2008
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
“I upgraded my application from 8.3 to 8.9. Now my query
includes additional security joins and this is impacting
performance. What if I don’t want the additional security
joins?”
PS/Query Security Joins
• When you join two different records with the same query security record, join the security record once for optimization
• But when you need to join the same record twice the security join needs to be applied twice
GSC Resolution 200973569
• Prior to 8.44 PS/Query only joined the security record one time. This could cause incorrect results in certain situations.
SELECT A.DEPTID, C.NAME, B.NAME
FROM PS_JOB A, PS_FAST_EMPGL_VW2 A1, PS_NAMES B, PS_PERS_SRCH_QRY1 B1, PS_NAMES C
WHERE A.EMPLID = A1.EMPLID
AND A.EMPL_RCD = A1.EMPL_RCD
AND A1.ROWSECCLASS = 'ALLPANLS'
AND B.EMPLID = B1.EMPLID
AND B1.ROWSECCLASS = 'ALLPANLS'
AND C.EMPLID = B1.EMPLID
AND ( A.EFFDT =
(SELECT MAX(A_ED.EFFDT) FROM PS_JOB A_ED
WHERE A.EMPLID = A_ED.EMPLID
AND A.EMPL_RCD = A_ED.EMPL_RCD
AND A_ED.EFFDT <= SYSDATE)
AND A.EFFSEQ =
(SELECT MAX(A_ES.EFFSEQ) FROM PS_JOB A_ES
WHERE A.EMPLID = A_ES.EMPLID
AND A.EMPL_RCD = A_ES.EMPL_RCD
AND A.EFFDT = A_ES.EFFDT)
AND A.EMPLID = B.EMPLID
AND … …
C.EMPLID = B1.EMPLID
would only return rows of data when the
emplid is also equal to supervisor id.
C.EMPLID = B1.EMPLID
would only return rows of data when the
emplid is also equal to supervisor id.
The correct SQL should be
PS_PERS_SRCH_QRY1 C1 and C.EMPLID = C1.EMPLID
The correct SQL should be
PS_PERS_SRCH_QRY1 C1 and C.EMPLID = C1.EMPLID
PS/Query Security Joins
• The 8.44 correction introduced in a change in behavior for prior existing PS/Queries and although technically correct, performed slower
• If you do not want multiple inclusion of the security join:
INSERT INTO PSVERSION (OBJECTTYPENAME,VERSION) VALUES ('QRYSELFJ',1)
• The existence of 'QRYSELFJ' in PSVERSION table is checked by PS/Query (as of PT8.47)
• Alternative for situations where you need to include the same field multiple times include • Expressions
• Views
Monitoring QueriesQuery Administration Utility
• PeopleTools > Utilities > Administration > Query Monitor
• Administrative Information and Enable/Disable Query
• Ability to Kill Long Running Queries on Executing Tab
• Ability to Enable/Disable Stats for Test vs Production
Monitoring QueriesQuery Administration Classes
• Query Classes provide many methods and properties for
examining the QueryStatistics via PeopleCode API
• AvgExecTime
• AvgNumRows
• ExecCount
• LastExecDtTm
• Delete
• View real-time and historical performance data using
Performance Monitor
• Perf Mon Event 355
“Is there a difference in performance among the
different supported data sources for XML
Publisher for PeopleSoft?”
Reports
Checks
Labels
Invoices
XML File
Optimal Data Source for XML Publisher for PeopleSoft
• Supported Data Sources
• PSQuery
• RowSet
• XmlDoc
• XML File
TranslationTranslation
LayoutLayout
Data SourceData Source
• Relational based data sources, such as PSQuery and RowSet, will involve processing to align relational with XML structure
• The processing required may impact performance of production reporting, however…
• A batch program such as SQR or Application Engine can preprocess a relational data source to XML
Reports
Checks
Labels
Invoices
XML FileOptimal Data Source for XML Publisher for PeopleSoft
• … it is often possible to preprocess the relational data source to
prepare XML File for use at report time
TranslationTranslation
LayoutLayout
Data SourceData Source
• Example: HCM 9.0 North American Payroll XML Publisher Reports
• PeopleTools researching a generic Query to XML File capability
• Then use XML File as the Data Source
Generating XML
• Add a Return statement to method CleanOutput() of the
PSXP_RPTDEFNMANAGER:ReportDefn Application Class
• Files placed in %PS_SERDIR%\files\XMLP\Data and
%PS_SERDIR%\files\XMLP\RptInst directories
Generating XML
• Create an xdodebug.cfg file and place it under
[PS_HOME]\JRE\Lib (where your active JRE is installed)
• The file should include the following two entries:
LogLevel=STATEMENT
LogDir=c:\temp or any appropriate temp directory
• Run your XMLP report
An xdo.log file (and related xml, xsl, translation and template
files) will be written to the specified LogDir.
Schema & Sample Files
• Both Schema and Sample files are required for PDF
mapping
• Schema file is required for bursting
• Schema and Sample files are auto generated only
for PS/Query data source
• For non-PS/Query data sources
• User must generate schema using an external tool such as
XML Spy, Visual Studio etc.
• Sample files can be created using notepad, a representative
clone of your actual data file, etc.
Generating Schema with Excel 2003+
• Have your XML data or sample file ready
• ‘File | Open’ in Excel 2003+. ‘Open XML’ dialog box pops up.
Select either ‘As an XML List’ or ‘Use the XML Source task
pane’
• Click OK. Ignore the following warning message coming from
Excel
• Click OK
Generating Schema with Excel 2003+
• The XML Source window will
appear on the right
• Open VBA,Tools/Macro/Visual
Basic Editor (Alt+F11). Type in the
following:
Generating Schema with Excel 2003+
• Click “Enter”
• the XML schema string appears
• Copy this string into any text editor (ie Notepad, etc)
• Add the following string at the top of the file:
• <?xml version="1.0" ?>
• Save the file with an ‘xsd’ extension
• Schema can now be uploaded to the XMLP Data Source.
• There are several websites like
http://tools.decisionsoft.com/xmlpp.html that will format
your xml data or schema files for free
XML Publisher ReportingChoosing a Template
xOutput Formulas
xHigher performance on very large reports (hundreds of mega bytes)
xxPDF Output
xHTML, Excel and potential other output formats
xSub-templates
xRuntime parameters
xTranslation files
x
x
x
RTF
Flexible Field-data mapping (XPath vs. simple name matching)
Charts
xPixel perfect positioning (using Adobe)
xExisting PDF Template (government forms)
Custom/dynamic output
PDFFeature
RTF Sub-templates
• Can include image, text, XSL templates, etc.
• Usually used for logos, headers, footers, etc.
• Each primary template can import multiple sub-templates
Header_Std_lower.rtf
RTF Sub-templates
• Add to Content
Library
• Sub-
templates
files stored in
database
• No
definitional
link to
primary
template
RTF Sub-templates
• Imported from primary template using Sub-Template ID
(<?import:psxmlp://STDHEADER?>)
Retrieved at runtime by core engine using psxmlp protocol
(Java to PeopleCode call)
Within in
PIA
Test/preview using file system import
<?import:file:///c:/temp/Header_Std_lower.rtf?>
Within
Template
Builder
Runtime Parameters
• Can be added to any template
• Delivered set through the ReportDefnclass
• Can programmatically add via XML PeopleCode API
• Need to be declared before use
BurstingReport by Burst Key
Bursting by EmplID
emplid: 1002emplid: 1000 emplid: 1001
DeptId: 02DeptId: 01
Bursting by Deptld
emplid: 1002
emplid: 1003
emplid: 1000
emplid: 1001
Use for Security & for Distribution
<PayChecks>
<PayCheck>
<EmpId>1000</Empld>
<DeptId>01</DeptId>
<Salary>1000</Salary>
</PayCheck>
<PayCheck>
<EmpId>1001</Empld>
<DeptId>01</DeptId>
<Salary>1000</Salary>
</PayCheck>
<PayCheck>
<EmpId>1002</Empld>
<DeptId>02</DeptId>
<Salary>1000</Salary>
</PayCheck>
</PayChecks>
CountryState: USNYCountryState: USCA
Bursting by Country by Region
emplid: 1000emplid: 1001emplid: 1002
emplid: 1003emplid: 1004emplid: 1005
• Single burst field
BurstingComposite Key Bursting with XML Publisher
• Create composite key in data source
e.g. Use Query expression to concatenate
employé 1012
employé 1011
employé 1010
Emplid 1002
Emplid 1001
Emplid 1000 EmplID 1003
EmplID 1004
EmplID 1005
CountryRegion: USCA CountryRegion:CABC PaysRégion:CAQB
Bursting templates/translation
• ‘Template controlled
by’ does not have to
match ‘burst by’
• Default Template ID
specified on Run
Control
• Could include one
template per data
value
• Multiple languages per
template
COUNTRY_REGION
COUNTRY_REGION
W2
T4
T4
Recipient Time Zones
• Report template must be of type “RTF” or “XSL”
• Ensure user time zone is one of the standard 3 character
delivered time zone codes ( “PST”, “EST”, etc.)
• XML Publisher does not recognize custom time zones and will
revert to the “GMT” time zone
• Include the offset from GMT for each date-time element
• 2008-07-27T12:48:00.000+02:00
• Appropriate abstract format mask must be used in the
template in order to display the time zone
• <?format-date:DATE_TIME_FIELD;'SHORT_TIME_TZ'?>
“When Query Access List Cache is
enabled, Crystal Reports & Queries seem
to run slower for User Id’s that have a
large number of roles assigned”
Query Access List Cache
• Open the SQL definition PSQRYACCLISTFASTSQL in App Designer (pside.exe), and replace the following SQL
SELECT DISTINCT C.RECNAME , C.RECDESCR FROM PSROLECLASS A , PSROLEUSER B , PSQRYACCLSTRECS C , PSVERSION D WHERE A.ROLENAME = B.ROLENAME AND C.CLASSID = A.CLASSID AND C.VERSION = D.VERSION AND D.OBJECTTYPENAME = 'QAL' AND B.ROLEUSER = '%s'
WITH
SELECT DISTINCT A.RECNAME ,A.RECDESCR FROM PSQRYACCLSTRECS A,PSVERSION B WHERE A.VERSION = B.VERSION AND B.OBJECTTYPENAME = 'QAL' AND A.CLASSID IN (SELECT C.CLASSID FROM PSROLECLASS C, PSROLEUSER D WHERE C.ROLENAME = D.ROLENAME AND D.ROLEUSER = '%s')
“We always seem to have some users who jump on
the latest version of Office before we can upgrade
our servers and others who keep using older
versions long after our servers are upgraded. Any
suggestions for us regarding Office 2007?”
PS/nVisionOffice 2007
• PS/nVision is now certified with Office 2007
• Recommendation is (as in the past) to use the same version of
Office for all PS/nVision environments:
• Report Batch Server
• User Browser Workstation
• Report Designer Client Workstation
• Different versions of Office in the mix have often worked in the
past but a workaround will be required in certain instances
PS/nVisionOffice 2007
• Office 2007 will save nVision
reports as .xlsx
Process Process
SchedulerScheduler
ReportReport
RepositoryRepository
Web Server
Crystal ReportCrystal Report
COBOLCOBOL
Application EngineApplication Engine
SQRSQR
XML PublisherXML Publisher
nVisionnVision
Batch ServerApp Server
Report Server
Report Designer
Report User
• Designers using
Office 2007 need to
rename or save as
.xls before running
the report in an
environment using
Office 2003.
• End users need to save as .xls
before using Office 2003 to
open a report generated with
Office 2007
May require
explicit
saveas .xls
May require
explicit
saveas .xls
XML PublisherOffice 2007
• PT bundles the BIP Template Builder • While Customers can download Template Builder the bundled version is the Certified, Recommended Version
• Offcycle certifications may create an interim gap in time
• For e.g. the recent certification of Office 2007 • Customers will want to download the version 10.1.3.3 of the Template Builder from the Oracle website.
• Or be on a Tools Patch of 8.49.07 and 8.48.16 or high (which updates the PT bundle)
•
“PeopleTools provides several reporting tools.
When would I use nVision vs. XML Publisher vs.
Crystal Reports?”
REPORTING NEED EXECUTIONDATA ORGANIZATION PLATFORMSFORMATTING
Report Development
nVISION
XML
PUBLISHER
CRYSTAL
REPORTS
PS/QUERY
SQR
Forms Based (PDF, Word, etc)
����
Pixel Precision Formatting
����
MICR
����
����
Graphics/Logos
����
����
����
����
Charting
����
����
����
����
Simple Tabular
����
����
����
����
����
SubReport
����
����
Matrixed
����
Financials, Ledger, Trees
����
Reporting w/Logic /Processing
����
Scheduled/ On Demand
����
����
����
����
����
Ad-Hoc
����
Bursting
����
����
Drill Down
����
����
Windows Batch Server
����
����
����
����
����
Unix/Linux Batch Server
����
����
����
����
390 Batch Server
����
Excel Integration
����
����
Which
Reporting
Tool?
BOE
Server
����
“When using multiple schedulers in multiple OSs,
for load balancing, how can I assign AE process to
execute in a particular OS?”
Scheduling Scenario
• System setting - Unix is the primary OS and system load is set to ‘Assign To Server In Any O/S’
• A Master Scheduler
• Customer has 4 schedulers - 2 on NT and 2 on UNIX• Each is set up as ‘use for load balancing’ & ‘redistribute to same OS’ and a Master Scheduler is booted
• They want all AE processes to run on Unix - except 3• The 3 exceptions have been hard coded to run on a particular NT scheduler
• But… sometimes the remaining AE processes are getting picked up by NT schedulers
• Why? Is there any way to specify that these AE processes run only on the Unix Schedulers?”
Process Category
• Define 2 Process Categories for AE processes (AE_NT
and AE_UNIX)
• Process Scheduler -> System Settings -> Process Category Admin
tab
• Assign the 3 AE processes you always want to run on NT
to process category AE_NT
• Assign the rest to process category AE_UNIX
• NT server definitions - set ‘max concurrent’ AE_NT > 0
and AE_UNIX = 0
• Unix server definitions - set ‘max concurrent’ AE_NT = 0
and AE_UNIX > 0
“When running an AE process to Window (output),
did you know you can have more than just the run
status displayed in popups?”
User Defined Progress
• Add the following PeopleCode
to display a customized status
message in popup window
• import PT_PRCS:API:*;
• Local PrcsApi &api = create
PrcsApi();
• &nret =
&api.notifyToWindow(QE_AE
STATUS_AET.PROCESS_IN
STANCE, "Executing
initialization steps…");
Links in Report results
Example
• Upon completion of process TREEMAINT, user may either
(1) Go to View result of an audit, (2) Go to Repair Tree
page.
• You can setup these links for navigation from the process
result page via Process Definition URL Links page.
Links in Report results
• URL Keys page is used to supply key values needed to pull
up the appropriate data in the page
• Values can be in the format of meta-variables or inline bind
variables
Links in Report results
• On completion of process request, user clicks to view request/report
details from process monitor (or via notification email …etc)
• User will find URL link(s) associated with the generated instance
Links in Report results
• User can then click the link to navigate directly to the page
with the appropriate keys populated
• (ie. Process Instance and Run Control ID in this example)
Collaborative work on PeopleSoft Trees
• On the PeopleTools Options page, select the ‘Use Tree
Update Reservation’
Check Out Tree
• Tree opened in Read Only
• ‘Check Out Tree’ to reserve/lock for update
• Tree or branch can be reserved/locked by Owner ID and
Timestamp
Release Tree
• Reservation released when user selects ‘Release Tree’,
closes the tree or when ‘Max Tree Inactivity Period’ is
reached
• timestamp on LAST_ACTIVITY_TIME field updated whenever
owner performs any action on tree - including navigation
Accessing a Reserved Tree
• If tree is currently checked out, user will be notified of the
User Id of the person holding the reservation
PDF Full Path Mapping – 8.50
• Enable mapping PDF form fields to XML
elements positioned under any level in the
data source XML structure.
• No schema required. Only sample xml file
is needed
<Paychecks>
<PayCheck>
<EmpNo>00001</EmpNo>
<Company>
<Address>1 Company st. CA 00001</Address>
<Description>Company Info</Description>
</Company>
<Employee>
<Address>1 Employee st. CA 00001</Address>
<Description>Employee Info</Description>
<Salary>50000</Salary>
<Vacation>12</Vacation>
......
</Employee>
</PayCheck>
<PayCheck>
......
......
</PayCheck>
</PayChecks>
Emailing ReportsLooking Ahead
• Query Report Scheduler supports email now.
• Email actual report file as attachment.
• Multiple levels of validation
“Every time I run my report it outputs the exact
same filename. In fact, it overwrites the existing
file.”
Prevent File OverwriteToday
• Specify only the folder name when writing to a file
• Report name is system generated
• Each run of the report overwrites previous report
with that name
• The workaround is to specify a different folder
Descriptive Report NamesLooking Ahead
• Report output names (and file names) are now
customizable using a name template
• Plain text intermixed with output parameters:
• %BTV%: Burst value (bursting mode only)
• %ASD%: As of Date
• %RID%: Report ID
• %Field% (any candidate burst field under highest repeating element)
• ie %EMPLID%
Descriptive Report Names
• Can be set on the Output page
• Or programmatically using ReportFileName property on the
ReportDefn class.
• If set, it will override UseBurstValueAsOutputFileName property
“I have a PS/Query that uses ‘in tree’ criteria.
Problem is I need to select a different set of nodes
just about every time I run it”
Report Retention DaysLooking Ahead
• Maximum retention days setting allowed has changed
from 999 to 9999 days
• Set the default retention at four levels
• Process Type Definition
• Process Definition
• Job Definition
• Schedule JobSet Definition
Job Definition Default
• Takes precedence over system setting
• Used to enforce the same retention days for all
processes within a job
Override at Schedule time
• Process Request / Scheduler JobSet UI (Distribution Link)
• With output type of web/window
Generic Run Control Looking Ahead
• Register parameters
• Once “Generic Run Control Page” option is enabled
on process definition, users can “Schedule” process
Reporting ConsoleLooking Ahead
• Single location/launch pad for reporting activities
• Run, schedule, monitor, view process requests
• Create ad-hoc reports
• Share and email report instance
• Manager process and report definitions
• Admin functions
• Manage process and report definitions
The preceding is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.