BI Publisher - Display Data Horizontally

一个人想着一个人 提交于 2020-01-07 03:01:29

问题


I have the following data model:

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

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

How to display the result horizontally, like this: 2010 2010 2012 2012 2013 2013


回答1:


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

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

There will be a Dynamic Data Columns.doc file there, which explains neatly how to do this.



来源:https://stackoverflow.com/questions/38633191/bi-publisher-display-data-horizontally

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!