2015-09-07 105 views
0

我正在尝试创建具有多个系列的Oracle BI Publisher图表,但我不确定如何构建我的xml以获取多个系列。我的XML是:具有多个系列的Oracle BI Publisher图表

<?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> 

我在哪里设置cdtxt作为标签,cdval的价值观和cddiv作为系列在图表向导在Word中。但是这会带回空白图表。有没有人有一个例子,应该为多个系列的XML或任何人都可以纠正我的?

回答

0

原来答案是:

<?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>