BI Report, Business Intelligence Report,, For Loop, Oracle Fusion, Rich Text Format

How To Develop an RTF Template

First step to develop a good RTF template is to develop a good data model. When i say good data model, it means be crystal clear in the relationship of the various fields to be displayed in the report e.g. parent- child relationship, fields which will determine the behavior of the template e.g. hiding certain sections of the report at the run time.

My experience says that at least 80% reports will be simple tabular report or report with a header and children e.g PO print report with PO header data in top section of the report and Line information in lower section.

For sake of simplicity ( to be true: to avoid the data breach & keep it simple), i created an XML like below:

XML

Alright, very basic operation we must be able to do in any type of coding is to do the looping. Again, there can be at least 2 types of looping. First to loop through based on the data ( XML in this case). Or to loop through it finite number of times. Lets see the syntax of the data based looping:

Syntax:

<?for-each:G_1?> Your text here…<?end for-each?>

if you look closely at the XML and the code syntax here, the top most node name is G_1. So this code snippet loops through all the records in G_1 node. So if the code looks like below:

Basic For Loop

This is how output will be:

Basic For Loop Output

And if the output needs to be printed for both PO header and PO Line, a sample code can look like this:

Parent Chld For Loop

Corresponding output will be:

Parent Chld For Loop Output

Look closely at the code and see how the looping is done for parent- child records. And corresponding output. Now take a closer look at output. You will see that output is spanned through 2 pages. well, trick lies in command: <?split-by-page-break:?>

By the way, Here ( India) or Here ( Other Geographies) are few UNCONVENTIONAL tricks which I have learnt to improve the performance of BI reports or SQL queries. Try them only when nothing else works.. kind of SOS...
https://www.amazon.in/gp/product/B093CC1CLD?ie=UTF8&tag=oraclebytes-21&camp=3638&linkCode=xm2&creativeASIN=B093CC1CLD

Related Posts:
RTF Template- Looping Finite Number Of Times
RTF Number Formatting With Examples
RTF Date Formatting With Example
OTBI Report Creation in Oracle Fusion

Feedback:
Hope the article helped you. If it did, please rate the post. In case it didn’t, do leave a comment to let us know what did we miss.

Reference:
support.oracle.com

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?