0

I am trying to create an Oracle BI Publisher chart with multiple series, but I'm not sure how to structure my xml in order to get the multiple series. My xml is:

<?xml version="1.0" ?>
<report>
   <rowd>
      <cddiv>Self</cddiv>
      <rowdx>
         <cdtxt>Time</cdtxt>
         <cdval>120</cdval>
      </rowdx>
      <rowdx>
         <cdtxt>Interest</cdtxt>
         <cdval>200</cdval>
      </rowdx>
   </rowd>
   <rowd>
      <cddiv>All excluding self</cddiv>
      <rowdx>
         <cdtxt>Time</cdtxt>
         <cdval>110</cdval>
      </rowdx>
      <rowdx>
         <cdtxt>Interest</cdtxt>
         <cdval>190</cdval>
      </rowdx>
   </rowd>
</report>

Where I set cdtxt as the Labels, cdval as the Values and cddiv as the Series on the chart wizard in Word. However this brings back a blank chart. Does anyone have an example of what the xml should be for multiple series or can anyone correct mine?

Superdooperhero
  • 7,584
  • 19
  • 83
  • 138

1 Answers1

0

Turns out the answer is:

<?xml version="1.0" ?>
<report>
 <tque>
  <tcla>2006</tcla>
  <Self>4.3</Self>
  <Excl>4</Excl>
 </tque>
 <tque>
  <tcla>2007</tcla>
  <Self>4.2</Self>
  <Excl>4</Excl>
 </tque>
 <tque>
  <tcla>2008</tcla>
  <Self>4.1</Self>
  <Excl>3</Excl>
 </tque>
</report>

chart:
<Graph graphType="BAR_HORIZ_CLUST" stylePath="/oracle/dss/graph/styles/frankie.xml">
  <LegendArea visible="true" />
  <Y1Axis axisMinAutoScaled="false" axisMinValue="0" axisMaxAutoScaled="false" axisMaxValue="5" majorTickStepAutomatic="false" majorTickStep="1" />
  <MarkerText visible="true" markerTextPlace="MTP_INSIDE_MAX">
    <GraphFont style="FS_BOLD" bold="true" fontColor="#ffffff" size="20"/>
    <Y1ViewFormat>
      <ViewFormat numberType="NUMTYPE_GENERAL" numberTypeUsed="true" decimalDigit="1" decimalDigitUsed="true"/>
    </Y1ViewFormat>
  </MarkerText>
  <LocalGridData colCount="{count(xdoxslt:group(.//tque, 'tcla'))}" rowCount="2">
  <RowLabels>
   <Label>Self</Label>
   <Label>All excl. Self</Label>
  </RowLabels>
  <ColLabels>
   <xsl:for-each-group select=".//tque" group-by="tcla" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <Label>
   <xsl:value-of select="current-group()/tcla" />
 </Label>
 </xsl:for-each-group>
 </ColLabels>
 <DataValues>
 <RowData>
 <xsl:for-each-group select=".//tque" group-by="tcla" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <Cell>
 <xsl:value-of select="sum(current-group()/Self)" />
 </Cell>
 </xsl:for-each-group>
 </RowData>
 <RowData>
 <xsl:for-each-group select=".//tque" group-by="tcla" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <Cell>
 <xsl:value-of select="sum(current-group()/Excl)" />
 </Cell>
 </xsl:for-each-group>
 </RowData>
 </DataValues>
 </LocalGridData>
 <PlotArea fillColor="#e3e3e3" borderColor="#000000" />
</Graph>
Superdooperhero
  • 7,584
  • 19
  • 83
  • 138