BIP Reports - Chapter 7: Advanced RTF Layout Techniques (Global HR Examples)

 

🧠 Chapter 7: Advanced RTF Layout Techniques (Global HR Examples)


In this chapter, you'll learn how to enhance your BI Publisher RTF reports using advanced layout features such as:

Conditional logic
Totals and aggregations
Dynamic tables (for-each loops)
Barcodes and images

We'll continue with the Employee Details by Department example from the previous chapter.

1. Use Case Recap
Your RTF report shows:
Employee full name, job, position, email, phone, department, and hire date
Grouped by department

2. Conditional Formatting (IF Statements)
Use BI Publisher’s <?if:condition?>...<?end if?> syntax inside the template.
🔹 Example 1: Highlight long-tenure employees
Hired over a year ago
<?end if?>
🔹 Example 2: Show message if email is missing
You can also use Word conditional formatting + BI fields inside table cells.

3. Totals and Aggregates
To count total employees per department or overall, use BI Publisher functions.
🔹 Example: Count Employees in Each Department
Number of Employees: <?count(full_name)?>
🔹 Example: Total Employees in Report
Outside the loop:

4. Using For-Each Loops for Nested Tables
For repeating data, wrap the block in a for-each tag.
🔹 Syntax:
...repeat block...
<?end for-each?>
For our employee dataset:
<?full_name?> - <?job_name?> - <?department_name?>
<?end for-each?>

5. Adding Page Breaks by Department
To print each department on a separate page:
<?split-by-page-break:department_name?>
Place it before the group loop to break on department change.

6. Adding a Barcode (e.g., Employee ID)
Go to BI Publisher > Insert > Barcode
Choose Code128 (for alphanumeric)
Insert the field:
The barcode will now appear when rendering in PDF.
You can also apply conditional logic to only show barcodes for certain departments or roles.

7. Embedding Images (e.g., Oracle logo or dynamic employee photos)
🔹 Static Logo:
Insert using Insert > Picture in Word
🔹 Dynamic Image:
Assume image URLs or base64 values exist in a field called photo_url:
Requires the image field to contain a public image URL or base64 string.

8. Styling Tips for a Professional Layout
Use tables instead of tabs for alignment
Align numeric data right
Use section breaks between grouped data
Keep header rows on every page: Table Properties > Row > Repeat as header row

9. Summary of Features Covered
📌 Next Chapter Preview:
Chapter 8: Scheduling BI Publisher Reports
Schedule a report to run daily, weekly, or monthly
Set output format, destination (email, FTP)
Monitor schedules and outputs

<?if:xdoxslt:datediff(hire_date, current_date()) > 365?>
<?if:email_address=''?>No Email Provided<?else:?><?email_address?><?end if?>
Department: <?department_name?>
Total Employees: <?sum(count(full_name))?>

<?for-each:G_1?>

<?for-each:DATA_DS?>
<?department_name?>
  1. <?person_number?>

<?photo_url?><<?image:photo_url?>>
FeatureSyntax or Method
Conditional logic<?if:condition?>...<?end if?>
Totals/Counts<?count(field)?>, <?sum(field)?>
For-each loop<?for-each:GROUP?>...<?end for-each?>
Page breaks<?split-by-page-break:field?>
BarcodesInsert > Barcode > Code128
Dynamic images



<?image:image_url?>



No comments:

Post a Comment