prelude - th technology · apex 5 interactive reports … deep dive developer and user team...

125
TH Technology APEX 5 Interactive Reports … Deep Dive Prelude …

Upload: others

Post on 22-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Prelude hellip

TH Technology

ENJOY

TH Technology

Karen Cannell

kcannellthtechnologycom

APEX Interactive Reports

DEEP DIVE

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About Me hellip

Karen Cannell ~ Consultant TH Technology

MechanicalSW Engineer - Analyzed designed

developed converted upgraded enhanced legacy amp

database applications for 25+ years

Building APEX applications for government medical

engineering industries since HTMLDB

Leveraging the Oracle 10g11g 12c suite of tools

Oracle Ace Associate

Editor Technical Journal

Send ODTUG Technical Journal Content

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

We Have Books hellip

Expert Oracle Application Express APress

2015 Report Printing

Beginning Application Express

42 APress 2013

Agile Oracle Application Express

APress 2012

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About You hellip

New to APEX

APEX Experience

APEX Versions

IR Habits

IR Customizations

New Stuff or Old

APEX5 Ready

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 2: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

ENJOY

TH Technology

Karen Cannell

kcannellthtechnologycom

APEX Interactive Reports

DEEP DIVE

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About Me hellip

Karen Cannell ~ Consultant TH Technology

MechanicalSW Engineer - Analyzed designed

developed converted upgraded enhanced legacy amp

database applications for 25+ years

Building APEX applications for government medical

engineering industries since HTMLDB

Leveraging the Oracle 10g11g 12c suite of tools

Oracle Ace Associate

Editor Technical Journal

Send ODTUG Technical Journal Content

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

We Have Books hellip

Expert Oracle Application Express APress

2015 Report Printing

Beginning Application Express

42 APress 2013

Agile Oracle Application Express

APress 2012

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About You hellip

New to APEX

APEX Experience

APEX Versions

IR Habits

IR Customizations

New Stuff or Old

APEX5 Ready

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 3: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

Karen Cannell

kcannellthtechnologycom

APEX Interactive Reports

DEEP DIVE

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About Me hellip

Karen Cannell ~ Consultant TH Technology

MechanicalSW Engineer - Analyzed designed

developed converted upgraded enhanced legacy amp

database applications for 25+ years

Building APEX applications for government medical

engineering industries since HTMLDB

Leveraging the Oracle 10g11g 12c suite of tools

Oracle Ace Associate

Editor Technical Journal

Send ODTUG Technical Journal Content

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

We Have Books hellip

Expert Oracle Application Express APress

2015 Report Printing

Beginning Application Express

42 APress 2013

Agile Oracle Application Express

APress 2012

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About You hellip

New to APEX

APEX Experience

APEX Versions

IR Habits

IR Customizations

New Stuff or Old

APEX5 Ready

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 4: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About Me hellip

Karen Cannell ~ Consultant TH Technology

MechanicalSW Engineer - Analyzed designed

developed converted upgraded enhanced legacy amp

database applications for 25+ years

Building APEX applications for government medical

engineering industries since HTMLDB

Leveraging the Oracle 10g11g 12c suite of tools

Oracle Ace Associate

Editor Technical Journal

Send ODTUG Technical Journal Content

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

We Have Books hellip

Expert Oracle Application Express APress

2015 Report Printing

Beginning Application Express

42 APress 2013

Agile Oracle Application Express

APress 2012

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About You hellip

New to APEX

APEX Experience

APEX Versions

IR Habits

IR Customizations

New Stuff or Old

APEX5 Ready

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 5: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About Me hellip

Karen Cannell ~ Consultant TH Technology

MechanicalSW Engineer - Analyzed designed

developed converted upgraded enhanced legacy amp

database applications for 25+ years

Building APEX applications for government medical

engineering industries since HTMLDB

Leveraging the Oracle 10g11g 12c suite of tools

Oracle Ace Associate

Editor Technical Journal

Send ODTUG Technical Journal Content

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

We Have Books hellip

Expert Oracle Application Express APress

2015 Report Printing

Beginning Application Express

42 APress 2013

Agile Oracle Application Express

APress 2012

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About You hellip

New to APEX

APEX Experience

APEX Versions

IR Habits

IR Customizations

New Stuff or Old

APEX5 Ready

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 6: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

We Have Books hellip

Expert Oracle Application Express APress

2015 Report Printing

Beginning Application Express

42 APress 2013

Agile Oracle Application Express

APress 2012

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About You hellip

New to APEX

APEX Experience

APEX Versions

IR Habits

IR Customizations

New Stuff or Old

APEX5 Ready

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 7: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

About You hellip

New to APEX

APEX Experience

APEX Versions

IR Habits

IR Customizations

New Stuff or Old

APEX5 Ready

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 8: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NOTE TO EARLY SLIDE DOWNLOADERS

Many of these slides HAVE CHANGED as

APEX 5 is Live and I find more neat stuff to

add for you every day

Please download the updated slides from the

Kscope15 site or email

kcannellthtechnologycom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 9: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 5 IR New Features

Inside and Out

Caveats

Limitations and Workarounds

Changes

IR CSS and JS Changes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 10: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR 30-second Intro

Introduced in APEX 31

Instead of Classic Reports One ndashWay Upgrade

Search Bar

Activity Menu

SelectFilterAggregateHighlightChartBreakSort

ComputeFlashbackDownloadSave Report

Group By Pivot

User Control Developer Effort

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 11: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer and User Team

ldquothough APEX IR give the end user great

power to format and arrange reports to their

needs the developer needs to be aware

of end user needs to prepare and deliver

the appropriate APEX IR query to support

themrdquo

For maximum value

Know Your Users

Know What Your Users Do

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 12: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda

APEX 50 New Features

Inside and Out

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 13: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features

Appearance Usability and Accessibility

Accessible

Menus Updated Font Icons

Modal Dialogs

Action Menu

Group By Enhancements column Limit increase

Pivot

Subscription ndash End is now End Date

Manage Saved Reports and Subscriptions at

Application Level

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 14: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 New Features contrsquod

ldquoMultiple Interactive Reportsrdquo

More than One IR Per Page

to do this one hellip

Things Have Changed

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 15: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things Look Different hellip

Page Designer

Usability Appearance Accessibility

Menus

Modal Dialogs

Icons

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 16: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer ndash Where to Find IR Things

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 17: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu

APEX 42

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 18: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Column Heading Menu on Click

APEX 5

Accessible

by Tab

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 19: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer - Report Attributes

Selective End User Features

Per Report

Per Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 20: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Page Designer - Report Attributes

Property Editor - Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 21: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

lt= APEX 42 Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 22: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ Action Menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 23: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Modal Dialogs

Pulldown Dialogs are now Modal

ldquoImproved Usabilityrdquo

Better Appearance

Improved Accessibility

Column Headings

Click vs Mouseover

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 24: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Things ARE Different hellip

Action Menu Enhancements

GROUP BY

PIVOT

New CSS Classes IDrsquos

New JavaScript jQuery

Letrsquos Look at New Features First hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 25: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

GROUP BY

Up to 8 Columns (up from 3)

APEX 3 ndash Build Your Own

APEX 4 - 3 Column Group By

APEX 5 ndash 8 Column Group By

GROUP BY is Single View Fixed Report

Other IR Features Disabled

GROUP BY or Main Report or Chart or Pivot

Download Behavior

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 26: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot

Old Way

Pivot via SQL Statement

Diff Approach for Known Columns vs Unknown

Columns

Tedious At Best

New Way

Point ndash Click ndash Save - Run

Demo

Limitations

Download Behavior

Other IR Options Disabled

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 27: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Traditional Pivot Query

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END) jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END) feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END) mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END) apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END) may_costs

MAX ( CASE WHEN miy = 06 THEN sum_costs ELSE NULL END) jun_costs

MAX ( CASE WHEN miy = 07 THEN sum_costs ELSE NULL END) jul_costs

MAX ( CASE WHEN miy = 08 THEN sum_costs ELSE NULL END) aug_costs

MAX ( CASE WHEN miy = 09 THEN sum_costs ELSE NULL END) sep_costs

MAX ( CASE WHEN miy = 10 THEN sum_costs ELSE NULL END) oct_costs

MAX ( CASE WHEN miy = 11 THEN sum_costs ELSE NULL END) nov_costs

MAX ( CASE WHEN miy = 12 THEN sum_costs ELSE NULL END) dec_costs

MAX ( CASE WHEN miy = 00 THEN sum_costs ELSE NULL END) unk_costs

MAX( sum_costs) yr_costs

FROM

( SELECT hellip

FROM hellip

WHERE

GROUP BY ROLLUP ( hellip )

)

WHERE hellip

GROUP BY agency area_code year

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 28: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

SELECT

agency

area_code

year

MAX ( CASE WHEN miy = 01 THEN sum_costs ELSE NULL END)

jan_costs

MAX ( CASE WHEN miy = 02 THEN sum_costs ELSE NULL END)

feb_costs

MAX ( CASE WHEN miy = 03 THEN sum_costs ELSE NULL END)

mar_costs

MAX ( CASE WHEN miy = 04 THEN sum_costs ELSE NULL END)

apr_costs

MAX ( CASE WHEN miy = 05 THEN sum_costs ELSE NULL END)

may_costs

hellip hellip

Known Columns Only

Traditional Pivot Query

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 29: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Tables ndash Known Columns

Known Columns and Column Names

ex Project by Status

Budget by Month vs

Unknown Columns and Column Names

ex Project by Year

Status by Project

ltDatagt by Year

Standard APEX IR Needs Column Names

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 30: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Queries

Traditional SQL

MAX ( CASE or DECODE hellip) )

CASE to filter values into columns

MAX to flatten the results

Need Known Columns

11g PIVOT and UNPIVOT

PIVOT

PIVOT hellip XML

httpwwworaclecomtechnologypubarticlesoracle-

database-11g-top-features11g-pivothtml

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 31: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pivot Query Options contrsquod

PIVOT PLSQL Package - Kyte

In Expert One on One

Dynamic SQL Pivoting - AMIS Solution

TYPE TYPE BODY

Pipelined Table Function

httptechnologyamisnlblog1207dynamic-sql-

pivoting-stealing-antons-thunder

Traditional PIVOT Query Options

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 32: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PIVOT - The APEX 5 Easy Way

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 33: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash Pre APEX 50

ldquoEndrdquo is a Repeat Count

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 34: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription ndash APEX 50 +

ldquoEndrdquo is a true End Date

Action Menu New Enhanced Actions

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 35: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Subscription Download Email

Do You Really Want Users

Emailing Data

Consider

EMail Filters

Tracking

Limit Report Data

Disable Subscription

Disable Download Email

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 36: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Manage at Application Level

Administration for Saved Reports

Subscriptions Now at Application Level

Used to Be Each Interactive Report Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 37: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Heading Attribute

Page ndash Aligns Multiple IR Headers Together w Top

of Page

Region ndash ldquoSticksrdquo win Region Scroll

None ndash Headers Scroll off the page

Universal Theme Only

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 38: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Floating Column Headers

Yeah

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 39: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multiple Interactive Reports

ldquoAny Numberrdquo of IR Per Page

Thank you hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 40: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refresher Course

Underused IR Features

IR_ltCOLUMN_NAMEgt

CIR ndash Clear IR (clear all)

RIR ndash Reset IR ( to default settings)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 41: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ_ltcolumn_aliasgt Equals

IR _ltcolumn_aliasgt Equals

IRLT_ltcolumn_aliasgt lt

IRLTE_ltcolumn_aliasgt lt=

IRGT_ltcolumn_aliasgt gt

IRGTE_ltcolumn_aliasgt gt=

IRLIKE_ltcolumn_aliasgt vSQL LIKE

IRN_ltcolumn_aliasgt NULL

IRNN_ltcolumn_aliasgt v NOT NULL

IRC_ltcolumn_aliasgt Contains

IRNC_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 42: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 ndash IR_COLUMN

Single IR On the Page

Reference IR Column Name

IR_COLUMN_NAME

Create and use IR filter options

IR_ COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 43: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR ndash IR[STATIC_ID]_COLUMN

Multiple IRs On the Page

Reference IR [Static ID]Column Name

IR[STATIC_ID] _COLUMN_NAME

Create and use IR filter options

IR[STATIC_ID]_COLUMN_NAME

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 44: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign IR STATIC_ID

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 45: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 46: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Not Easy To Find in Page Designer hellip

Click on Target hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 47: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Assign Column Link Attributes

Link Target

is a Modal

Popup

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 48: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Reference IR Columns and Filter Values

IREQ[STATIC_ID]_ltcolumn_aliasgt Equals

IR[STATIC_ID]_ltcolumn_aliasgt Equals

IRLT[STATIC_ID]_ltcolumn_aliasgt lt

IRLTE[STATIC_ID]_ltcolumn_aliasgt lt=

IRGT[STATIC_ID]_ltcolumn_aliasgt gt

IRGTE[STATIC_ID]_ltcolumn_aliasgt gt=

IRLIKE[STATIC_ID]_ltcolumn_aliasgt SQL LIKE

IRN[STATIC_ID]_ltcolumn_aliasgt NULL

IRNN[STATIC_ID]_ltcolumn_aliasgt NOT NULL

IRC[STATIC_ID]_ltcolumn_aliasgt Contains

IRNC[STATIC_ID]_ltcolumn_aliasgt Not Contains

No BETWEEN IN NOT IN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 49: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Developer Features ndash CIR and RIR

To Clear or Reset ONE or a specific IR on a

page

CIR[STATIC_ID] and RIR[STATIC_ID]

Do Not Work

Use IR[STATIC_ID] in REQUEST to Indicate

IR to CIR or RIR

fp=MYAPP100ampSESSIONIR[STATIC_ID]NOCIR

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 50: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Multi IR Demo ndash ldquoThe Dashboardrdquo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 51: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Using IREQ[STATIC_ID]_COLUMN to

LinkJumpDrill Between IRs on the Same

Page hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 52: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Imagine hellip

Passing IREQ[STATIC_ID]_COLUMN to

Control a Set of IRs on the Same Page

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 53: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Use The Right Tool

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 54: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Caveats

Limitations hellip How To Deal w Them

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 55: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations

One Size Fits All Features

Minor amp Less-Known Limitations

Still have 32K row limit

Charts 1000 element limit

Filters Commas SYSDATE Bugs wGTE Links

Aggregates Not BI

Chart Group By Pivot

Are ldquoSingle Viewrdquo

Other IR Functions Disabled or Limited on these Views

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 56: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Too Much

ldquoOne-Size-Fits-Allrdquo

Really

Developer Can EnableDisable

per IR (as of APEX 5)

per Column

Developer Can Add Condition on Link Column

Conditional Pages

Pre APEX 5 Need multiple IRs on

multiple pages for more complex

authorizations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 57: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Too Much

Use The Settings

Declaratively Turn Off Features

Disable Control Summary (Settings)

displaynone

On a-IRR-controlPanel or specific a-IRR-ltelementgt

Provide Manually-created RESET or CLEAR

buttons

(Future) API or Declarative Setting

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 58: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR Not Enough

Extend the Toolbar (Widget)

Outside the Toolbox

Provide Manually-created Custom Buttons

Provide Custom Actions

Plugins

Whatever You Can Code hellip

Unless You Use Standard API

Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 59: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

32K Row Limit

Search Bar All-Column Not DATE-Savvy

Aggregate Behavior

IR is NOT BI Savvy

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 60: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Dynamic DATE filter

SYSDATE as Filter Value

Use ldquoIs in the lastrdquo w large value - User

Build a Specific URL Filter and Link Column - Dev

Build SQL Report to look like a Menu

Ex Bonus Eligible Date

Build Derived Column ndash Dev

Ex CASE WHEN ltconditiongt THEN

lsquoYesrsquo

ELSE

lsquoNorsquo

END overdue

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 61: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Aggregate Behavior ndash Not BI

Original Report Display

Region West

State County City Population

CA Orange County Irvine 100

CA Orange County Orange 200

CA Los Angeles Hollywood 300

CA Los Angeles Universal City 400

Sum 1000

Actual APEX IR Result

Region West

State County Population

CA Orange County 100

CA Orange County 200

CA Los Angeles 300

CA Los Angeles 400

Sum 1000

Intended Result Region West

State County Population

CA Orange County 300

CA Los Angeles 700

Sum 1000

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 62: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Charts

Chart or Data Set (or Group By or Pivot)

Charting Limits

1000 elements Vert Horiz Line 2D Pie

Aggregate then chart

Chart Labels

Vertical Bart Chart may not Display All Labels

Chart Education

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 63: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

Search Columns

Search Drop Down ndash Max is 1000 Columns

Report Attributes List ndash Max 100 Columns

Volume of Data Returned

~ 85K Rows

THINK hellip what do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 64: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Limitations ndash Developers amp Users

APEX IR is NOT MS Excel

Arrow UpDown RightLeft Navigation

Freeze Columns Freeze Headers

WYSIWYG Printing

Download Data Set

RETRAINING MAY BE REQUIRED

ELSE Plug-Ins

What do users really need

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 65: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Agenda Changes

CSS and JS Changes

Appearance

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 66: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50

Remember hellip 2014

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 67: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 2015

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 68: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 50 IR 2015

Changes hellip

differentt bowie image

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 69: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

CSS Changes

Different Classes

Different Ids

apexir_ltelementgt ids replaced by

a-irr-lthellipgt classes and

STATIC_ID_lthellipgt ids

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 70: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 71: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 72: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example - CSS

Dynamic Action ndash APEX 42

Custom jQuery w CSS References

var rows = $(tableapexir_WORKSHEET_DATA tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=FLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 73: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

STATIC_ID on Column

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 74: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Refactor Example ndash APEX 50

Dynamic Action ndash APEX 50 Style

var rows = $(tablea-IRR-table tbody trgt(0))

rowseach(function(idx)

var Flags = $(this)children(td[headers=lsquoFLAGS])text()

if( Flags == Outlier)

$(this)children(td)css(background-colorFCF067)

)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 75: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

JavaScript Changes

New Code Base

jQuery UI Widget Factory

widgetinteractivereportjs

No Inline Event Handlers

No gReport

No APIs

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 76: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

widgetinteractiveReportjs

Same Name

Different Contents

jQuery UI Widget Factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 77: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

What

No gReport

No Inline Event Handlers

All Private Methods

No Supported APIs (yet)

APIs are Planned for APEX 51

Exactly What TBD

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 78: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 Search Icon

gReportdialog2

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 79: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 42 IR Toolbar Go Button

gReportsearch(lsquoSEARCHrsquo)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 80: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 Toolbar Go Button

No gReport

No Visible CallEvent

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 81: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

50 Changes - Impact on Existing Code

Appearance

CSS (less of a problem due to Universal Theme)

PLSQL

Collection Logic References

JavaScript

Custom Code References

Dynamic Actions

Whatever was Done Non-Standard Will

Need Refactoring

Usability Appearance Accessibility

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 82: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported vs UnSupported

Anything that Uses Standard API hellipis

Supported

ex apexrefresh for IR refreshes

apexeventtrigger( IRStaticID apexrefresh )

Anything Else hellip

gReportsearch - Not Supported

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 83: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Supported RIR and CIR Alts

APEX_IRRESET_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

and APEX_IRCLEAR_REPORT(

p_page_id IN NUMBER

p_region_id IN NUMBER

p_report_id IN NUMBER DEFAULT NULL)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 84: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Safe Harbor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 85: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Understanding the IR Widgets

APEX 50 Interactive Report Customization

John Snyders

httphardlikesoftwarecomweblog20150512a

pex-5-0-interactive-report-customization

jQuery UI How to Use the Widget Factory

httpslearnjquerycomjquery-uiwidget-

factoryhow-to-use-the-widget-factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 86: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Widgets 101

Widget Options

$(selector)widgetName(option)

GetSet Widget Option

$(selector)widgetName(optionldquordquooptionnamerdquo) $(selector)widgetName(optionldquordquooptionnamerdquo100)

Widget Method

Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 87: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Naming

IR Widget

Append _ir to IR Static ID

DEPT_IR_ir

Menu Widget

Append _actions_menu to IR Static Id

DEPT_IR_actions_menu

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 88: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Refresh an IR

$(DEMO_IR_irldquo)interactiveReport(refresh)

Get the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPage)

Set the Current Rows Per Page $(DEMO_IR_ir)interactiveReport(option

currentRowsPerPagerdquo 50)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 89: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Knowing the Names hellip

Open Download Dialog

$(DEMO_IR_actions_menu)menu(find

irDownload)action()

hellip find the irDownload object of the DEMO_IR

interactive report actions menu and call its action

method

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 90: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR Possible APIs

For APEX 51 ndash Discussion of APIs to Close

the gReport Gap

gReport ndashLike Options

Public IR Widget Methods

Setting for OpenClose Settings

Wait for APEX 51 to

UpgradeRefactor

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 91: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Note

In earlier APEX versions there was less

declarative JavaScript capability and therefore

more developer customizations

As APEX advances and incorporates more

declarative JavaScript it is more important to

stay within the standard APIs when making

customizations to avoid difficulties when

upgrading

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 92: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appearance

Pre APEX 50

Default Appearance is Blah

Customization via CSS (Hard Customized)

APEX 50

Appearance is Better

Customization is Easy

Template Options

Template Styles

Universal Theme ThemeRoller

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 93: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 CSS Anatomy of an IR

Search Bar apex_finderbar

Control Panel apexir_CONTROL_PANEL

Worksheet apexir_WORKSHEET

Column Search apexir_columnsearch

All in apex_ltversiongtcss See hellipimagescssuncompressed for readable version

Do Not Modify the Original

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 94: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

apexir_WORKSHEET_DATA

tableapexir_WORKSHEET_DATAborder0px

ffffff solid

tableapexir_WORKSHEET_DATA tfoot tr

tdbackgroundefefef

tableapexir_WORKSHEET_DATA th

background4e4e4e

font-weightbold

colorffffff

border-top1px ccc solid

border-bottom1px aaa solid

font-size11px

white-spacenowrap

vertical-aligncenter

letter-spacing1

background-imageurl(wsreport_bggif)

background-repeatrepeat-x

tableapexir_WORKSHEET_DATA td

backgroundefefef

border-top1px fff solid

border-bottom1px ccc solid

font-size8pt

padding3px 9px

empty-cellsshow important

tableapexir_WORKSHEET_DATA th div

colorffffff

font-size11px

letter-spacing1

text-decorationunderline

cursorpointer

margin3px 9px

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 95: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Custom Appearance Pre APEX 5

Copy IR CSS into a New File my_custom_IRcss

Place Custom CSS File after apex__css

Change as Little as Possible

Web Developer Edit CSS for Visual Feedback

Try Out Your Settings

Test Test Test

Test in all SupportedUsed Browsers

Test in End User Browsers Common User Browser Settings often Different than Developer Settings

TEST TEST TEST

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 96: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5+ CSS Anatomy of an IR

Search Bar hellip

Control Panel

Worksheet ahellip

Column Search

Use Template Options

CreateUpload Template Styles

No Need for All That Custom CSS

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 97: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 5 IR ldquoCheat Sheetrdquo

apexir_ hellip Ids STATIC_ID_ hellip

apex_ classes a-IRR-hellip

APEX 5 Adds a Few More

JavaScript widget is revamped

widgetinteractiveReportminjs

The name is the same hellip not much else

No Supported Equivalents (for now)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 98: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 99: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Customizations Demo

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 100: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Recap

APEX 50 IR Changes

New Features

New CSS

New JavaScript

Caveats

Limitations amp Workarounds

Changes

CSS and jQuery Widget

APIs Coming for APEX 51 (We Hope)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 101: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Resources

Manually Refreshing APEX Components httpdocsoraclecomcdE59726_01doc50e39147extend_app002ht

mHTMDB30267

APEX 50 Interactive Report Customization

John Snyders httphardlikesoftwarecomweblog20150512apex-5-0-interactive-

report-customization

jQuery UI How to Use the Widget Factory httpslearnjquerycomjquery-uiwidget-factoryhow-to-use-the-widget-

factory

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 102: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

More Resources

APEX ThemeRoller How-To httpdgielisblogspotcom201502apex-50-way-to-use-theme-

rollerhtmlutm_source=feedburneramputm_medium=twitteramputm_campaign=Feed3A+DimitriGielisBlog+

28Dimitri+Gielis+Blog29

AMIS Pivot Implementation for pre APEX 5 httpstechnologyamisnl20060524dynamic-sql-pivoting-stealing-antons-thunder

APEX 5 IR Papers

httpthtechnologycomAPEX5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 103: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Share Your Knowledge

Call for ArticlesBlogsUpdatesReviewers

ODTUG Technical Journal ALWAYS Looking for Content

kcannellodtugcom

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 104: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 105: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX IR

DEEP DIVE

APEX 5 Preview

Karen Cannell kcannellthtechnologycom

Questions

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 106: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX IR

DEEP DIVE APEX 5 Preview

Karen Cannell

Thank You ~

Please fill out the evaluations

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 107: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Nostalgia hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 108: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Ch Ch Ch Ch Changes hellip

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 109: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Appendix

PDF Printing for IRs

Multiple IR on Single Page Pre-APEX 5

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 110: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print OOTB Options

Print Attributes - Generic Template Only

Same Width Columns

Basic HeaderFooter Settings

Issues

Equal Column Widths

No-Print Columns

No Highlighting Formatting

Break Columns

Pivot Chart Group By

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 111: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX IR PDF Print Problem

Need to Capture As-Is Report Query and

Configuration

One Option

APEX 41 APEX_IR_QUERY

Modified SS Version for Sorts Column Order

Modify Your Version for Your Needs

APEX 42 + APEX_IR Package (w help)

APEX 5 APEX_IR Package (w help)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 112: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Capture SQL via APEX_IR ( or Pre APEX 42

Equiv)

Report Layout

XSL-FO Named Column Template

Stylus Studio FO Designer BI Publisher Desktop Manual

This Approach for Fixed Columns Only ndash

Not True WYSIWYG

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 113: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

Create TYPE to Hold Report Structure

Create Views w Same Structure as the TYPE

Create FUNCTION to use Dynamic SQL to

Select from View based on APEX_IR_QUERY

Output Return Table Type

Parameters APP_ID Page Session IR ID

Any IR Parameters

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 114: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Query

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 115: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print

Function Returns Table Type

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 116: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

Report Layout

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 117: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Print Options

PDF Output Button

example

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 118: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 119: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output - Limitations

Named Columns

Set Column Order - Not WYSIWYG

Tedious

Future

Edit XSL-FO Template to handle Conditional

Column

Generate XSL-FO Template On The Fly

ALGEN Modification

See George Barra for original ALGEN

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 120: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

PDF Output ndash Other Options

Plugins

PLPDF

Jasper Reports

BIRT

Export to Excel Options

Nodejs output to Word Excel

Depends On Your Needs ndash

Know Your Users

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 121: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

APEX 51 SOD

ldquoPDF Printing ndash Improve the printing capabilities

utilizing the Oracle REST Data Services FOP

Supportrdquo

FOP 11Embedded in APEX REST Services

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 122: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 One IR per Page

Need for gt 1 APEX IR

IFF So Iframe

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 123: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

NN

ldquoFirstrdquo IR

on the

main page

ldquoSecondrdquo IR is

in an iframe

(really in

separate app)

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 124: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Pre APEX 5 gt 1 IR IFRAME

Create the first IR on the main page

Create then next IR in separate app

Plain Page Template

Plain Region ndash No Template

Create an HTML Region on main page

Enter Iframe reference in Region Source

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source

Page 125: Prelude - TH TECHNOLOGY · APEX 5 Interactive Reports … Deep Dive Developer and User Team “though APEX IR give the end user great power to format and arrange reports to their

TH Technology

APEX 5 Interactive Reports hellip Deep Dive

Iframe Source