pages tips and tricks

20
Pages Tips and Tricks Rick Sands

Upload: mccdonal

Post on 04-Aug-2015

51 views

Category:

Economy & Finance


0 download

TRANSCRIPT

Page 1: Pages tips and tricks

Pages Tips and Tricks

Rick Sands

Page 2: Pages tips and tricks

Pages Tips & Tricks

• Query Text• User Defined Parameters• Column Selection• No Data Values• Component Deletion• Auto-Archiving• Account Settings• Auto-downgrade• Sub-models

Page 3: Pages tips and tricks

Query Text

• Text passed into a query is normally converted to a quote-delimited string

…where portfolio_code=‘4003’

Page 4: Pages tips and tricks

Query Text

• Sometimes, you just want to pass in a literal string that you want inserted into the query

• Typically, it’s the name of a database column

Select sp.cost_base,sp.Market_….

Page 5: Pages tips and tricks

User Defined Parameters

• Common way to allow users to override defaults• Can be based on static lists or query-based• Results can be string, string list, boolean, numeric• Examples:

– Override benchmark– Starting market value for portfolio + start date– Show lots– Select report columns

• Define as part of document definition

Page 6: Pages tips and tricks

User Defined Parameters

• Example: list of columns to show on report

Page 7: Pages tips and tricks

Column Selection

• Allow users to select columns• Makes use of xReports plus

– Query text– User defined parameters

• Define xReport with all possible columns• At run-time, xReport will skip over ‘missing’

columns• Complete example (sample business unit +

sample database) including documentation on Groupsite

Page 8: Pages tips and tricks

No Data Values

• Instead of having a query fail because there is no data, have a soft landing

• Define a ‘no data’ value that is easy to detect• Raise a user-friendly warning, drop the

component, or otherwise handle ‘softly’

Page 9: Pages tips and tricks

No Data Values

If tot_si = 0 then DeletesectionEndif

Page 10: Pages tips and tricks

Component Deletion

• Use business logic to remove components that don’t make sense given the data

• Example: remove duration-banding report if acct has no fixed income securities

ExecQuery CountFI(portcode;PGAsOfDate) into FISecCount

If FISecCount=0 then DeleteSection endif

Page 11: Pages tips and tricks

Auto-Archiving

• Clean up the status list• Move ‘old’ statuses + files to an archive• Searchable archive

• Enable and configure at document level• Override at job level• Run automatically or ad-hoc

Page 12: Pages tips and tricks

Account Settings

• Define commonly used options for an account• Numbers, strings• Input as text box, drop down, etc.• Examples:

– Account manager– Date report due on– Freeform comment

• Define on account source form• Use anywhere you can access account details

Page 13: Pages tips and tricks

Account Settings

• Use account settings in account groups!• Example; all accounts with due date=3 days

1. Create setting

2. Define setting

3. Create group based on setting

• Select accounts, schedule accounts,…

Page 14: Pages tips and tricks
Page 15: Pages tips and tricks
Page 16: Pages tips and tricks
Page 17: Pages tips and tricks

Auto Downgrade

• Make sure small ad-hoc requests are always at the front of the queue

• If a ‘normal’ job has >N accounts, downgrade the priority

• Ad-hoc jobs (<N accts) therefore have higher priority

• Set default under Business Unit Settings • Override by user/group

Page 18: Pages tips and tricks

Sub-Models

• Frequent requirement in Pages implementations• Relationship includes multiple accounts• Need to report at aggregate level as well as at

individual account level

• Two Pages tricks:• QueryLoop• ExecFile

Page 19: Pages tips and tricks

Sub-Models

• Query Loop calls a query and returns a recordset that lists off all sub-portfolios

• ExecFile calls a sub-model document that is just like a model document, but is called over and over again from a model document

Page 20: Pages tips and tricks

Sub-Models

Create a report for the master (total) portfolio

Loop for each sub portfolio

Get basic info for sub portfolio into variables

Run a ‘sub’ model document for each subportfolio (accessing variables set above)