Adding Program Units and Hyperlinks Adding a New Query and Using the Result in a New Header Section

Customizing Reports with XML 22-11 group group name=G_EMPLOYEES dataItem=EMPLOYEE_ID dataItem=FIRST_NAME dataItem=LAST_NAME dataItem=JOB_ID dataItem=MANAGER_ID dataItem=HIRE_DATE dataItem=SALARY dataItem=COMMISSION_PCT group dataSource data report

22.3.4 Creating Cross-Product Matrix Groups

Cross-product groups allow you to define a matrix of any number of groups in the data model. The dimension groups in a cross product may exist in the same data source or may be combined from different data sources to create a matrix. In support of this flexibility, the crossProduct tag is placed within the data tag after all the data sources and groups have been created. The data type definition for the crossProduct element is: ELEMENT crossProduct xmlSettings|displayInfo|dimension|formula|summary|placeholder|comment ATTLIST crossProduct name CDDATA IMPLIED mailText CDDATA IMPLIED The following example demonstrates the creation of a single-query matrix. report name=anyname DTDVersion=9.0.2.0.0 data dataSource name=Q_1 select select from employees select group name=G_DEPARTMENTS dataItem name=DEPARTMENT_ID group group name=G_JOB_ID dataItem name=JOB_ID group group name=G_MANAGER_ID dataItem name=MANAGER_ID group group name=G_EMPLOYEE_ID dataItem name=EMPLOYEE_ID dataItem name=FIRST_NAME dataItem name=LAST_NAME dataItem name=HIRE_DATE dataItem name=SALARY dataItem name=COMMISSION_PCT group dataSource crossProduct name=G_Matrix dimension group name=G_DEPARTMENTS dimension 22-12 Publishing Reports to the Web with Oracle Reports Services dimension group name=G_JOB_ID dimension dimension group name=G_MANAGER_ID dimension crossProduct data report

22.3.5 Creating Formulas, Summaries, and Placeholders at Any Level

You can place formulas, summaries, and placeholders at any level within the data model. Additionally, you have complete control over all the attributes for each of these objects. The following example demonstrates the creation of a report-level summary whose source is based on a group-level formula column. report name=anyname DTDVersion=9.0.2.0.0 data dataSource name=Q_1 select select from employees select group name=G_EMPLOYEES dataItem=EMPLOYEE_ID dataItem name=EMPLOYEE_ID dataItem name=FIRST_NAME dataItem name=LAST_NAME dataItem name=HIRE_DATE dataItem name=SALARY dataItem name=COMMISSION_PCT dataItem name=DEPARTMENT_ID formula name=CF_REMUNERATION source=cf_1formula datatype=number width=20 precision=10 group dataSource summary name=CS_REPORT_LEVEL_SUMMARY function=sum width=20 precision=10 reset=report compute=report data programUnits function name=cf_1formula returnType=number textSource [CDATA[ function CF_1Formula return Number is begin return :salary + nvl:commission_pct,0; end; ]] textSource function programUnits report

22.3.6 Creating Parameters

In Oracle Reports XML, the parameter element is placed between open and close data tags. The data type definition for the parameter element is: ELEMENT parameter comment?|listOfValues?