excelxsltxslt-groupingbi-publisherexcel-template

How to make a field (column value) span multiple rows in Excel Templates to be used in Oracle BI Pub Reports?


I am creating an Excel Template for BI Pub Reports,
Sample XML is generated using Oracle BI Pub Data Model.

My Data Model is like this :-
Data Model Fields
My sample XML is here:-

<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Oracle BI Publisher 12.2.1.4.0 -Dataengine, datamodel:__agars00_Swe_Reports_subaru_mar_dm_xdm -->
-<DATA_DS>
<P_CURRENT_DATE>03-Jan-22</P_CURRENT_DATE>
<P_MESSAGE>(SALES/ADJ)</P_MESSAGE>
<P_R12_END>December 2021</P_R12_END>
<P_R12_BEGIN>January 2021</P_R12_BEGIN>
<P_TERRITORY>TERRITORY 102</P_TERRITORY>
<P_REGION>1</P_REGION>
<P_DEALER_NAME>JIM PATTISON</P_DEALER_NAME>
<P_DEALER_CODE>1007</P_DEALER_CODE>
-<G_1>
<SORTID>3693</SORTID>
<REGION>1</REGION>
<TERRITORY>TERRITORY 102</TERRITORY>
<DEALER_CODE>1007</DEALER_CODE>
<DEALER_NAME>JIM PATTISON</DEALER_NAME>
<SEGMENT>Total Compact Car</SEGMENT>
<SUB_SEGMENT>Corolla</SUB_SEGMENT>
<MTD>0</MTD>
<MLY>0</MLY>
<CURR12>2</CURR12>
<PER_CURR12>0.8</PER_CURR12>
<PREV12>2</PREV12>
<PER_PREV12>0.2</PER_PREV12>
<CYTD>2</CYTD>
<PYTD>2</PYTD>
</G_1>
-<G_1>
<SORTID>3694</SORTID>
<REGION>1</REGION>
<TERRITORY>TERRITORY 102</TERRITORY>
<DEALER_CODE>1007</DEALER_CODE>
<DEALER_NAME>JIM PATTISON</DEALER_NAME>
<SEGMENT>Total Compact Car</SEGMENT>
<SUB_SEGMENT>Cruze</SUB_SEGMENT>
<MTD>0</MTD>
<MLY>0</MLY>
<CURR12>0</CURR12>
<PREV12>0</PREV12>
<PER_PREV12>0.1</PER_PREV12>
<PER_VAR_R12>-10</PER_VAR_R12>
<CYTD>0</CYTD>
<PYTD>1</PYTD>
</G_1>
</DATA_DS>


Expected Output is like this:- enter image description here
first column that shows "Total ___ CARS" spans all the rows with same type of cars.
I created a Repeating Group on whole row
enter image description here
XDO_METADATA sheet looks like this:-
enter image description here
but my output is showing like this:- enter image description here

HOW CAN I add spanning of first column values here????


Solution

  • So, I was not able to find a Excel Template solution for this. I had to alter my generated reports using Python (merging cells by opening Excel apps through scripting)