BIP 10G - Multiple Master Details Report with data template

1 - About

BIP can create a master detail report from a flat data source (such as a database) with the standard functionality BIP 10G - (Data Set|Group|Section) but when you want to create a multiple master detail report, you have to use the data template functionality.

With the data template functionality, you can link several queries and may show in the same report for instance:

  • the order information (master)
  • the lines of the order (detail of order)
  • the multiple comments of the same order (detail of order).

3 - Example

The following example shows how to link query with the data binding technique recommended by Oracle.

3.1 - Data Template

Example of Sql Query Linking with Data binding on the HR sample schema.

<dataTemplate name="dataTemplateName" description="Template Description" 
dataSourceRef="demo" defaultPackage="employee" version="1.0">
		<sqlStatement name="Q1">
  <![CDATA[SELECT dept.department_id as DEPTNO, department_name as DNAME, as LOC FROM hr.departments dept, hr.locations loc
dept.location_id = loc.location_id]]>
		<sqlstatement name="Q2">
 <![CDATA[SELECT employee_id AS EMPNO, last_name AS ENAME, jobs.job_title as JOB
 FROM employees EMP, jobs 
where emp.job_id = jobs.job_id
and employee_id = :DEPTNO]]>
		<group name="G_DEPT" source="Q1">
			<element name="DEPT_NUMBER" value="DEPTNO" />
			<element name="DEPT_NAME" value="DNAME"/>
			<group name="G_EMP" source="Q2">
				<element name="EMPLOYEE_NUMBER" value="EMPNO" />
				<element name="NAME" value="ENAME"/>
				<element name="JOB" value="JOB" />

3.2 - Xml Output

The data engine generates date elements using:

  • the canonical ISO date format: YYYY-MM-DDTHH24:MI:SS.FF3TZH:TZM for a mapped date element,
  • and ######.## for number elements in the data template XML output.

<?xml version="1.0" encoding="UTF-8"?>
					<JOB>Administration Assistant</JOB>
					<JOB>Marketing Manager</JOB>
					<JOB>Marketing Representative</JOB>

You get then multiple data sets and you can use the BIP 10G - (Data Set|Group|Section) instruction to create your sections.

4 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap