2014-12-25 Created By BaoXinjian
一、摘要
BI Publisher类型有:条形图-垂直、条形图-水平、饼图、线形图。
向导生成的代码,可在图片的“设置图片格式”网站标签页内的“可选文字”里看到,我们可以做进一步修改
1. 数据
2. 插入
3. 预览
4. 工具
二、测试数据
准备测试数据,开立三张invoice,并导出为xml数据源模式
1. PDF输出测试数据
2. 测试数据XML
<?xml version="1.0" encoding="UTF-8"?><!-- Generated by Oracle Reports version 10.1.2.0.2 --><INVOICES> <LIST_G_BATCH> <G_BATCH> <BATCH_ID>11697</BATCH_ID> <BATCH_NAME>Fatture Liberi Professionisti</BATCH_NAME> <CONTROL_INVOICE_TOTAL>2692800</CONTROL_INVOICE_TOTAL> <CREATED_BY>2190</CREATED_BY> <ORG_ID>1017</ORG_ID> <LIST_G_INVOICE> <G_INVOICE> <BATCH_ID1>11697</BATCH_ID1> <INVOICE_NUM>IN201409</INVOICE_NUM> <SOURCE>Manual Invoice</SOURCE> <VENDOR_ID>598</VENDOR_ID> <VENDOR_NAME>Gavin Bao</VENDOR_NAME> <VENDOR_SITE_ID>1591</VENDOR_SITE_ID> <VENDOR_SITE_CODE>GDONALD ITA P</VENDOR_SITE_CODE> <INVOICE_AMOUNT>55</INVOICE_AMOUNT> <INVOICE_CURRENCY_CODE>ITL</INVOICE_CURRENCY_CODE> <INVOICE_DATE>12-JUN-01</INVOICE_DATE> <INVOICE_TOTAL>80</INVOICE_TOTAL> </G_INVOICE> </LIST_G_INVOICE> <LIST_G_INVOICE> <G_INVOICE> <BATCH_ID1>11697</BATCH_ID1> <INVOICE_NUM>IN201410</INVOICE_NUM> <SOURCE>Manual Invoice</SOURCE> <VENDOR_ID>598</VENDOR_ID> <VENDOR_NAME>Messi Liu</VENDOR_NAME> <VENDOR_SITE_ID>1591</VENDOR_SITE_ID> <VENDOR_SITE_CODE>GDONALD ITA P</VENDOR_SITE_CODE> <INVOICE_AMOUNT>68</INVOICE_AMOUNT> <INVOICE_CURRENCY_CODE>USA</INVOICE_CURRENCY_CODE> <INVOICE_DATE>12-JUN-01</INVOICE_DATE> <INVOICE_TOTAL>150</INVOICE_TOTAL> </G_INVOICE> </LIST_G_INVOICE> <LIST_G_INVOICE> <G_INVOICE> <BATCH_ID1>11697</BATCH_ID1> <INVOICE_NUM>IN201411</INVOICE_NUM> <SOURCE>Manual Invoice</SOURCE> <VENDOR_ID>598</VENDOR_ID> <VENDOR_NAME>Bati Wang</VENDOR_NAME> <VENDOR_SITE_ID>1591</VENDOR_SITE_ID> <VENDOR_SITE_CODE>GDONALD ITA P</VENDOR_SITE_CODE> <INVOICE_AMOUNT>101</INVOICE_AMOUNT> <INVOICE_CURRENCY_CODE>CHN</INVOICE_CURRENCY_CODE> <INVOICE_DATE>12-JUN-01</INVOICE_DATE> <INVOICE_TOTAL>200</INVOICE_TOTAL> </G_INVOICE> </LIST_G_INVOICE> <ORG_NAME>Vision Italy</ORG_NAME> <CREATED_NAME>ITALY</CREATED_NAME> </G_BATCH> </LIST_G_BATCH> <LIST_G_EMPLOYEE> <G_EMPLOYEE> <EMPLOYEE_NUM>54</EMPLOYEE_NUM> <USER_NAME>GAVIN</USER_NAME> <PARTY_TYPE>PERSON</PARTY_TYPE> <PREFIX>MR.</PREFIX> <FULL_NAME>GavinBao</FULL_NAME> </G_EMPLOYEE> </LIST_G_EMPLOYEE> <CS_INVOICE_AMOUNT>1346400</CS_INVOICE_AMOUNT> <CF_SRW>bxj_srw_get_account_description</CF_SRW> <CP_PLACEHOLDER></CP_PLACEHOLDER></INVOICES>
二、饼状图
测试BI Publisher饼状图
1. 通过向导设定数据来源
2. 数据PDF,显示饼状图
3. 查看自动产生的XML 数据定义方式
chart:<Graph stylePath="/oracle/dss/graph/styles/nautical.xml" depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20" seriesEffect="SE_AUTO_GRADIENT" graphType="PIE"><LegendArea visible="true" /><LocalGridData colCount="1" rowCount="{count(xdoxslt:group(.//G_INVOICE, 'INVOICE_NUM'))}"> <RowLabels> <xsl:for-each-group select=".//G_INVOICE" group-by="INVOICE_NUM" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:sort select="current-group()/INVOICE_NUM" /> <Label><xsl:value-of select="current-group()/INVOICE_NUM" /></Label> </xsl:for-each-group> </RowLabels> <DataValues> <xsl:for-each-group select=".//G_INVOICE" group-by="INVOICE_NUM" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:sort select="current-group()/INVOICE_NUM" /> <RowData> <Cell><xsl:value-of select="sum(current-group()/INVOICE_TOTAL)" /></Cell> </RowData></xsl:for-each-group> </DataValues></LocalGridData></Graph>
三、直方图
测试BI Publisher直方图
1. 通过向导设定数据来源
2. 数据PDF,显示直方图
四、折线图
测试BI Publisher折现
1. 通过向导设定数据来源
2. 数据PDF,显示折线图
Thanks and Regards