Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 29

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 32

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 138

Strict Standards: Non-static method JRequest::clean() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 33

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/environment/request.php on line 463

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/environment/request.php on line 464

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/environment/request.php on line 465

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/environment/request.php on line 466

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/environment/request.php on line 467

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/environment/request.php on line 468

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 35

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 38

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 39

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 138

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 46

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 47

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 50

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 53

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 54

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/loader.php on line 71

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 57

Strict Standards: Non-static method JLoader::register() should not be called statically in /home/content/19/13966119/html/adivanew/libraries/joomla/import.php on line 58

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/libraries/joomla/session/session.php on line 423

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/libraries/joomla/session/session.php on line 426

Warning: Cannot modify header information - headers already sent by (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/templates/ja_kyanite_ii/libs/ja.template.helper.php on line 119

Warning: Cannot modify header information - headers already sent by (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/templates/ja_kyanite_ii/libs/mobile_device_detect.php on line 113

Warning: Cannot modify header information - headers already sent by (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/templates/ja_kyanite_ii/libs/mobile_device_detect.php on line 114

Warning: Cannot modify header information - headers already sent by (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/templates/ja_kyanite_ii/libs/mobile_device_detect.php on line 113

Warning: Cannot modify header information - headers already sent by (output started at /home/content/19/13966119/html/adivanew/libraries/joomla/import.php:29) in /home/content/19/13966119/html/adivanew/templates/ja_kyanite_ii/libs/mobile_device_detect.php on line 114
In a RTF Template how to display measures as rows in a table
You are here: BI Publisher In a RTF Template how to display measures as rows in a table

Warning: Creating default object from empty value in /home/content/19/13966119/html/adivanew/components/com_k2/models/item.php on line 226

Warning: Creating default object from empty value in /home/content/19/13966119/html/adivanew/components/com_k2/models/item.php on line 614

In a RTF Template how to display measures as rows in a table

Written by  Anil
Rate this item
(1 Vote)

As we display the measures as columns in a table, we can also modify this display structure in output to display these measure columns as rows.


Consider below XML

<GROUP_PERCENTAGE>

    <PERCENTAGE>

                <DEPARTMENT>CSE</DEPARTMENT>

                <CRETERIA>PASSPERCENTAGE</CRETERIA>

                <MALE>70</MALE>

                <FEMALE>30</FEMALE>

   </PERCENTAGE>

      <PERCENTAGE>

                <DEPARTMENT>IT</DEPARTMENT>

                <CRETERIA>PASSPERCENTAGE</CRETERIA>

                <MALE>65</MALE>

                <FEMALE>35</FEMALE>

   </PERCENTAGE>

        <PERCENTAGE>

                <DEPARTMENT>ECE</DEPARTMENT>

                <CRETERIA>PASSPERCENTAGE</CRETERIA>

                <MALE>55</MALE>

                <FEMALE>45</FEMALE>

   </PERCENTAGE>

     <PERCENTAGE>

                <DEPARTMENT>EEE</DEPARTMENT>

                <CRETERIA>PASSPERCENTAGE</CRETERIA>

                <MALE>75</MALE>

                <FEMALE>25</FEMALE>

   </PERCENTAGE>

   <PERCENTAGE>

                <DEPARTMENT>CSE</DEPARTMENT>

                <CRETERIA>FAILPERCENTAGE</CRETERIA>

                <MALE>30</MALE>

                <FEMALE>70</FEMALE>

   </PERCENTAGE>

 <PERCENTAGE>

                <DEPARTMENT>IT</DEPARTMENT>

                <CRETERIA>FAILPERCENTAGE</CRETERIA>

                <MALE>35</MALE>

                <FEMALE>65</FEMALE>

   </PERCENTAGE>

<PERCENTAGE>

                <DEPARTMENT>ECE</DEPARTMENT>

                <CRETERIA>FAILPERCENTAGE</CRETERIA>

                <MALE>45</MALE>

                <FEMALE>55</FEMALE>

   </PERCENTAGE>

<PERCENTAGE>

               <DEPARTMENT>EEE</DEPARTMENT>

               <CRETERIA>FAILPERCENTAGE</CRETERIA>

               <MALE>25</MALE>

               <FEMALE>75</FEMALE>

  </PERCENTAGE>

</GROUP_PERCENTAGE>

In general, when we build an RTF template for the above xml and the output is as below 

 

In order to display measures as rows in a table structure for easy analysis we should change the fields of table structure as below:

 

The above one is the table structure to display the measures as rows in a table.Now you can observe the below output

 

Below are the form fields where we modified them for displaying in the above way

 

For :                <?for-each-group@column:PERCENTAGE;CRETERIA?>

To group the data by CRETERIA; and the @column context command to create a table column for each group (CRETERIA).

 CRETERIA:    <?CRETERIA?>

Placeholder for the CRETERIA element.

 End:                <?end for-each-group?>

Closes the for-each-group loop.

 Department:  <?for-each-group:PERCENTAGE;./DEPARTMENT?><?variable@incontext:G1;current-group()?><?DEPARTMENT?>

Begins the group to create a table row for each DEPARTMENT.

 MALE:            <?for-each-group@cell://PERCENTAGE;./CRETERIA?><?sum ($G1[(./CRETERIA=current()/CRETERIA)]/MALE)?><?end for-each-group?>

To group the data by CRETERIA; and the @cell context command to create a table cell for each group (CRETERIA).

Sums the sales for the current group (CRETERIA).

 FEMALE:       <?for-each-group@cell://PERCENTAGE;./CRETERIA?><?sum ($G1[(./CRETERIA=current()/CRETERIA)]/FEMALE)?><?end for-each-group?>

To group the data by CRETERIA; and the @cell context command to create a table cell for each group (CRETERIA).

Sums the sales for the current group (CRETERIA).

 

"If you found this article useful, please rate the same"

If you need any assistance in BI Publisher implementation or RTF Template design, we can

help you out. please send your query to   This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Read 15606 times

1 comment

  • Comment Link shoma b Friday, 19 October 2012 09:16 posted by shoma b

    i want to display the rows dynamically in RTF template. As per the requirment the table will have 3 columns which will display the data value. If there are 10 data values then each row will display 3 values in 3 columns and the next value should be displayed in a new row. kindly provide any information on the same.

    Report

Leave a comment

Make sure you enter the (*) required information where indicated.
Basic HTML code is allowed.