Introduction
In one of the previous article (Creating a Password Protected PDF Output In Oracle Fusion Cloud Application ) we have seen how we can created confidential reports / letters (Appointment Letter, Experience Certificate, Employment Certificate, Compensation Letter etc) in Oracle HCM Cloud Application.
Also, in one of the previous article (Running Parameterized Reports From Navigator Menu and Springboard Icon In Oracle Fusion HCM Cloud ) we have seen how to run a report from navigator menu or springboard icon.
Now, say if we want to have a password protected pdf report to be displayed / downloaded by a simple click on Springboard Icon then we would need to make use of both the above features.
We would try to demonstrate the same in this article here.
Worked Out Example
For this example we would need to perform the following steps:
-
Create a Password Protected PDF Report
-
Create a Page Entry under a Group (say “Compensation Related Reports” )
-
Verify that the Report gets displayed when we click on the Page Entry ( It would ask for password to open the PDF) and once the correct password is entered data should be displayed.
Create Password Protected PDF Report
We would use the following SQL (we have used our own data instead of fetching the details from database to keep the SQL simple, but one can very well fetch the details from database too)
SQL |
SELECT FT.* FROM ( SELECT T1.*, T1.NID||T1.DOB password FROM (SELECT 1 as EmployeeNumber, 'Alfred Thomas' as EmployeeName, 10000 as AnnualSalaryinUSD, 10 as BonusPercentage, 'QY7865W' NID, 10151972 DOB FROM dual ) T1 UNION SELECT T2.*, T2.NID||T2.DOB password FROM (SELECT 2 as EmployeeNumber, 'Barack Alfonso' as EmployeeName, 20000 as AnnualSalaryinUSD, 20 as BonusPercentage, 'SW864E' NID, 11171995 DOB FROM dual ) T2 UNION SELECT T3.*, T3.NID||T3.DOB password FROM (SELECT 3 as EmployeeNumber, 'Chris Matthew' as EmployeeName, 30000 as AnnualSalaryinUSD, 30 as BonusPercentage, 'GT603J' NID, 12241987 DOB FROM dual ) T3 UNION SELECT T4.*, T4.NID||T4.DOB password FROM (SELECT 4 as EmployeeNumber, 'Derek Laker' as EmployeeName, 40000 as AnnualSalaryinUSD, 40 as BonusPercentage, 'JK273T' NID, 10291998 DOB FROM dual ) T4 ) FT WHERE FT.EmployeeNumber = :p_employeenumber |
The Data Model Diagram will appear as below:
Next we will need to create a RTF Template . (The RTF Template will look as below):
In order to ensure that the user is prompted for a password we would need to have the following properties defined under Info->Properties-> Advanced Properties ->Custom
Name |
Value |
Type |
xdo-pdf-security |
true |
Text |
xdo-pdf-open-password |
{/DATA_DS/G_1/PASSWORD} |
Text |
Now when we upload this RTF template to the data model we would be able to create the Report (lets call it Rewards Letter). Once we try to run the Report it will ask us for an input employee number ( we will pass 1 for now) and once we do so it would ask for a password. The password for opening the PDF for this record (person number 1) is combination of its NID (National Identifier) along with the person’s date of birth in MMDDYYYY format.
Creating Page Entry
We would need to create a Group and a Page Entry. For this we would need to Create a Sandbox and activate it (sandbox).
Navigation is Navigator -> Configuration->Structure->Create Group
Details for the same are in below table
Compensation Related Reports (Group) |
|
Attribute Name |
Attribute Value |
*Name |
Compensation Related Reports |
Icon |
<Choose Any Icon> |
Show on Navigator |
Yes |
We would also need to create a page Entry. Details in Table below
Reward Letter (Page Entry) |
|
Attribute Name |
Attribute Value |
*Name |
Reward Letter |
*Icon |
<Any Icon> |
Group |
Compensation Related Reports |
Show on Navigator |
Yes |
Show on Springboard |
Yes |
Link Type |
Static URL |
Secure Destination |
Unchecked |
*Destination |
<Link of the Custom Report> |
Once we populate the values we can save the page entry details and publish the sandbox.
Verification
Now that all the setup is complete and the sandbox is published we should be able to see an icon titled “Reward Letter” under “Compensation Related Reports” on the Springboard.
Next we should click on the “Reward Letter” link and should take us to the Report Screen where we need to provide a user input (Employee Number). Once we provide the employee number another dialog box will open which will ask for the password for the pdf document.
And once we provide the password we should be able to see the report. (Reward Letter for this example)
When we click on submit, we would be able to see the details.