Friday, April 5, 2019

Fusion: How To Exclude the BI Report’s Schedule Frequency From Holidays

BI Report scheduling frequency can be skipped based on the localized public holidays or weekends using by report triggers.

Pre-Requisites
Public holidays need to be captured in the Fusion Cloud applications’ Calendar Events.

Step 1: Calendar Events

Navigation: Setup and Maintenance > Manage Calendar Events



Step 2: SQL for Calendar Events

SELECT NAME,
       TO_CHAR(START_DATE_TIME, 'MM/DD/YYYY') START_DATE,
       TO_CHAR(END_DATE_TIME, 'MM/DD/YYYY') END_DATE,
       SHORT_CODE
  FROM PER_CALENDAR_EVENTS_VL
 WHERE CATEGORY = 'PH'
 ORDER BY START_DATE



Step 3: Add Event Triggers in Data Model

Schedule Triggers

A schedule trigger fires when a report job is scheduled to run. Schedule triggers are of type SQL Query. When a report job is scheduled to run, the schedule trigger executes the SQL statement defined for the trigger. If data is returned, then the report job is submitted. If data is not returned from the trigger SQL query, the report job is skipped.


SQL Query

SELECT 'TRUE' FROM DUAL
WHERE NOT EXISTS
(
-- Public Holidays
SELECT 'HOLIDAY' HOLIDAY
  FROM PER_CALENDAR_EVENTS_VL
 WHERE 1=1
   AND CATEGORY = 'PH'
   AND TO_CHAR(:P_RUN_DATE,  'MM/DD/YYYY') BETWEEN TO_CHAR(START_DATE_TIME, 'MM/DD/YYYY') AND TO_CHAR(END_DATE_TIME, 'MM/DD/YYYY')
 UNION 
-- Weekends  
SELECT 'HOLIDAY' 
  FROM DUAL 
 WHERE TO_CHAR(:P_RUN_DATE, 'D') IN (1,7)
)

The above query will exclude the weekends and public holidays.

Documents Reference

1. Fusion Global HR: How To Setup Calendar Events By Locations (Doc ID 1917689.1)
2. Adding Triggers: Guide


Saturday, March 9, 2019

Fusion: How To Create Password Protected BI Publisher Report

Goal
How to create password protected BI publisher report outputs (pdf).


Solution
There are two types of password protected outputs (pdf) can be Created in the Fusion Cloud applications.
1. Static Password
2. Dynamic Password


1. Static Password
The below options required to update in the cloud application BI catalog services.
Navigation: Tools → Reports and Analytics → Browse Catalog


Navigate to appropriate report template folders and Click “Edit” the Template (which needed the password protection functionality) → Click “Properties” button.



Properties
Value
Enable PDF Security
True
Open Document Password



 Save the changes and Run the job.

The Report output will prompt the user to enter the password when open the output.


2. Dynamic Password

1. Create the Data Model (include/identify the field/value for password)
(ex, Supplier Number, Employee Number with DOB) 

(ex)
/DATA_DS/G_1/PASSWORD (Any customized/default password group)
/DATA_DS/G_1/SEGMENT1 (Supplier Number – Default Password, for supplier related reports)

2. Define RTF Template with the Custom Properties.
Navigation: RTF Template → File → Info → Properties → Advanced Properties → Custom

Add the below mentioned two custom properties.

Properties
Value
Type
xdo-pdf-security
true
Text
xdo-pdf-open-password
/DATA_DS/G_1/SEGMENT1
Text


Click “OK” and Save the Template.

Upload the template to BI catalog, Run the report and check the report output.

The Report output will prompt the user to enter the password when open the output.


Documents Reference

Oracle Support Documents

1. How To Set Password Protection For BI Publisher Report (Doc ID 2117187.1)
2. How To Password Protect PDF Documents At Runtime? (Doc ID 1355332.1)

Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher

Setting Report Processing and Output Document Properties → PDF Security Properties
https://docs.oracle.com/middleware/12212/bip/BIPRD/GUID-300980F2-CC27-4DA5-9420-2D607CF132BF.htm#BIPRD2995

Limitations

The offered solution applicable for PDF outputs only and Oracle is working on EXCEL outputs.
Enh 26197461 - ER: PASSWORD PROTECTION FOR EXCEL FILES SENT THROUGH ORACLE BI PUBLISHER