Infosys’ blog on industry solutions, trends, business process transformation and global implementation in Oracle.

« Cross Pollination of Solutions across Industry Verticals | Main | From Assisted-Care to Self-Care »

To dynamically insert blank rows in RTF template

To Dynamically insert blank rows in RTF template

1)      Why we require Dynamic Blank rows in RTF template?
Few business requirements demand fixed BIP report tabular layout irrespective of number of rows displayed per page. For example if a query returns 32 rows and BIP layout per page is fixed to show 10 rows , report would span across 4 pages. The layout of the report should be intact though there are 2 rows to be shown on the last page. Row filler concept can be used to fill the table in RTF with blank lines dynamically.

2)      Steps to insert Blank rows in the template

·         Create a variable at Table header to select all the rows from the Group element.

·         Write a logic in the End for each tag to fix how many number of records that should come in each page.

·         Add an Extra Blank Row in the table for Row filler functionality

·         Write a logic to find how many number of blank rows need to be inserted in the table based on the number of rows in the group element

·         Write a logic to put a straight line at the end of the each page when data is floating to next page.

 

o   Create a variable at Table header to select all the rows from the Group element.

 Variable Creation 1.JPG

In the above screenshot, we have created a variable "rowlimit" to select all the records from the group element with below formulae.

<xsl:variable xdofo:ctx="incontext" name="inner_group" select=".//G_1"/>

From this formula, we can get the total number records that we need to display in the report.

o   Write a logic in the End for each tag to fix how many number of records that should come in each page.

Based on the requirement, if we need to show only 10 lines in each page then below formulae will help to fulfill the requirement.

<?if:position() mod 17=0?><xsl:attribute name="break-before">page</xsl:attribute> <?end if?><?end for-each?>

Fixed_Rows_To_Print 2.JPG


o   Add an Extra Blank Row in the table for Row filler functionality

In order to use the Row filler functionality we need to insert an extra blank row in the table as below.


Row Filler 3.JPG

 

o   Write a logic to find how many number of blank rows need to be inserted in the table based on the number of rows in the group element

Here comes the main part of the logic to find how many number of records to be inserted in the table based on the total number of records available in the group element.

Considering earlier scenario, we have 32 number of records in the group element and only 10 rows to be printed on each page. Below formula can be used to calculate how many blank records needs to be printed on last page.

<?for-each:xdoxslt:foreach_number($_XDOCTX,1,10 - (count($inner_group) mod 10),1)?>


No.of Dynamic Rows 4.JPG

 

From above formula, $inner_group is total records present in the Group element. Considering the earlier scenario, last page only 2 rows to printed from 10 rows, remaining 7 blank rows has be inserted by the above formula.

o   Write a logic to put a straight line at the end of the each page when data is floating to next page.

Additional requirement to turn Cell Boarders On and Off when data is floating to second page, then below formula can be used.

<?attribute@incontext:border-bottom;'0.01pt solid #000000'?>

From above 0.01pt is the thickness of the line, the more you increase the value the more thickness of line increase.

To achieve this create a variable in the Row filler section (Extra blank row) and use the above formula.

Cells Boarder 5.JPG


The cell boarders shall appear in the report as below.


Cell Boarder ON 6.JPG

 

 

 

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

เว็บพนันบอล m88 sitemap 888 slot sbobet555 line gclubslot w88loto m88 pantip 1XBET.COM GclubSlotsOnline
www.findw88.com| www.itjie.com/hotpo/iomom| www.bLondeapproved.com| www.itjie.com/bbstxnz.html| www.365discountmeds.net| www.itjie.com/hottw/519.html| www.dfwl.org| www.forw88th.com| www.cn-connectors.com| www.sportspolitika.com| www.prow88th.com| www.hotelw88.com| www.mendabody.net| www.itjie.com/bbscd/qzqh.html| www.coLepaintinginc.com| www.jiudianzhaopin.com/viphlagd.html| www.jiudianzhaopin.com/vipbf/11r7n| www.calendari2014.com| www.w88center.com| www.monclerssale.com| www.wrightswindows.com| www.jiudianzhaopin.com/vipbf/11r7n| www.eatcleanremix.com| www.simonkirkeofficial.com| www.jiudianzhaopin.com/vipaaosu.html| www.jiudianzhaopin.com/bbbbf/04uw0/| www.jiudianzhaopin.com/vipjt91x.html| www.az-sunnah.com| www.jiudianzhaopin.com/bbbqw/575.html| www.itjie.com/bbsku/jrpbj| www.jameylynnloves.com| www.agenvimaxpills.com| www.bostonvoicedata.com| www.jiudianzhaopin.com/vipzd3pl.html| www.oakleysociety.com| www.puddleduckparts.com| www.systematic-course.com| www.impressivejewel.com| www.sheldonharvey.com| www.walkformemovie.com| www.sheapeterson.com| www.heyitsnollie.com|