We can create BI publisher report either through date template as data definition or oracle reports/plsql procedure as data definition .
Data Template -
This method involves, writing required queries in xml file and attaching the same to data definition as Data template , Later we can create a layout template as we wish to display on the screen .
Data template required to have following tags,
Parameters - > you can include parameter details here , if your reports accept input parameter from user before running the report . These parameter name should match token name mentioned in concurrent program parameter . ( concurrent program should be based on XDOTEXE executable )
DataQuery - > Data Query tag can have multiple sql statements tag . if requirement is to use one sql statement then open one sqlstatement tag and mention your queries in that tag, Make sure to wrap them between <![CDATA[ and ]]> tags. This is to inform Parsing engine to not process detail between these tags and pass them to Oracle.
Data Structure - > if we want to group values fetched from data query before passing them to layout engine , we can do that in this tag . Create a new group in this data structure and create a element for each column that our query uses .
Below is the same data template for extracting vendor id and vendor name for the given vendor number .
once above step is completed , we can create layout template by using MS word (install desktop bi publisher addon)
common issues faced while developing BI report ->
Make sure to give same code to link data definition and layout template if you are using data template approach .
If you are using oracle report/plsql procedure based approach , given program short name as code while creating data definition .
while creating valueset that is dependent on table, make sure that schema name is not given in table name field and give field value large enough accommodate all values that you are selecting from the table . This needs to followed on assigning that value set to concurrent program parameter .
if you face any trouble in displaying number in bi publisher report, use below to enforce number .
<fo:bidi-override direction="ltr" unicode-bidi="bidi-override"><?vendor_id?></fo:b idi-override>
Data Template -
This method involves, writing required queries in xml file and attaching the same to data definition as Data template , Later we can create a layout template as we wish to display on the screen .
Data template required to have following tags,
Parameters - > you can include parameter details here , if your reports accept input parameter from user before running the report . These parameter name should match token name mentioned in concurrent program parameter . ( concurrent program should be based on XDOTEXE executable )
DataQuery - > Data Query tag can have multiple sql statements tag . if requirement is to use one sql statement then open one sqlstatement tag and mention your queries in that tag, Make sure to wrap them between <![CDATA[ and ]]> tags. This is to inform Parsing engine to not process detail between these tags and pass them to Oracle.
Data Structure - > if we want to group values fetched from data query before passing them to layout engine , we can do that in this tag . Create a new group in this data structure and create a element for each column that our query uses .
Below is the same data template for extracting vendor id and vendor name for the given vendor number .
<?xml version="1.0" encoding="UTF-8"?>
<dataTemplate name="VendorDT" description="Vendor Details" version="1.0">
<parameters>
<parameter name="p_vendor_no" datatype="number"/>
</parameters>
<dataQuery>
<sqlStatement name="VenDet">
<![CDATA[ SELECT vendor_name,vendor_id FROM po_vendors
WHERE segment1 = :p_vendor_no ]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="VenDet_GN" source="VenDet">
<element name="vendor_id" value="vendor_id"/>
<element name="vendor_name" value="vendor_name"/>
</group>
</dataStructure>
</dataTemplate>
once above step is completed , we can create layout template by using MS word (install desktop bi publisher addon)
common issues faced while developing BI report ->
Make sure to give same code to link data definition and layout template if you are using data template approach .
If you are using oracle report/plsql procedure based approach , given program short name as code while creating data definition .
while creating valueset that is dependent on table, make sure that schema name is not given in table name field and give field value large enough accommodate all values that you are selecting from the table . This needs to followed on assigning that value set to concurrent program parameter .
if you face any trouble in displaying number in bi publisher report, use below to enforce number .
<fo:bidi-override direction="ltr" unicode-bidi="bidi-override"><?vendor_id?></fo:b idi-override>