BI Publisher - 水平显示数据 [英] BI Publisher - Display Data Horizontally
问题描述
我有以下数据模型:
<SALE_LIST>
<SALE>
<YEAR>2010</YEAR>
<ITEM>100001</ITEM>
<AMOUNT>1,199.00</AMOUNT>
</SALE>
<SALE>
<YEAR>2010</YEAR>
<ITEM>100002</ITEM>
<AMOUNT>1,200.00</AMOUNT>
</SALE>
<SALE>
<YEAR>2012</YEAR>
<ITEM>100001</ITEM>
<AMOUNT>1,899.00</AMOUNT>
</SALE>
<SALE>
<YEAR>2012</YEAR>
<ITEM>100003</ITEM>
<AMOUNT>1,649.00</AMOUNT>
</SALE>
<SALE>
<YEAR>2013</YEAR>
<ITEM>100004</ITEM>
<AMOUNT>2,199.00</AMOUNT>
</SALE>
<SALE>
<YEAR>2013</YEAR>
<ITEM>100005</ITEM>
<AMOUNT>3,199.00</AMOUNT>
</SALE>
</SALE_LIST>
在rtf模板中,使用for-each
显示所有YEAR
:
In rtf template, using for-each
to display all YEAR
:
<?for-each:SALE?>
<?YEAR?>
<?end for-each?>
通常情况下,结果会垂直显示,如下所示:
Normally, the result will be displayed vertically, like this:
2010
2010
2012
2012
2013
2013
如何水平显示结果,像这样:2010
2010
2012
2012
2013
2013
>
推荐答案
<?for-each@inlines:SALE?>
<?YEAR?>
<?end for-each?>
如果您想打印水平表格列中的值,您将需要动态列.您将不得不使用:
If you want to print the values in horizontal table columns, you will need dynamic columns. You will have to use:
<?split–column–header:name?>
<?split–column–data:name?>
如果您在 Windows 系统上安装了 BIP Word 插件,您将拥有 Oracle 提供的示例模板.转到您的 BI Publisher Desktop 文件夹,并检查示例文件夹.在我的系统上,位置是:
If you have installed BIP Word addon on your windows system, you will have the sample templates provided by Oracle. Go down to you BI Publisher Desktop folder, and check the samples folder. On my system, the location is:
C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\samples\RTF templates\Advanced\Dynamic Columns
那里会有一个 Dynamic Data Columns.doc
文件,它清楚地解释了如何做到这一点.
There will be a Dynamic Data Columns.doc
file there, which explains neatly how to do this.
这篇关于BI Publisher - 水平显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!