A script-enabled browser is required for this page to function properly.

<data> XML tag

The <data> tag delimits the beginning and ending of the data model of the report definition.

Syntax

<data>
  content_of_data_model
</data>

Parameters /Options

Description

content_of_data_model

Examples

Data model segment

The following example shows the data model segment of an XML report definition:

<data>
  <dataSource name="q_category">
    <select>
      SELECT ic.category,
      SUM (h.sales),
      AVG (h.high_365),
      AVG (h.low_365),
      AVG (h.div),
      AVG (h.p_e)
      FROM stock_history h, indcat ic
      WHERE h.symbol=ic.symbol
      GROUP BY ic.category
    </select>
  </dataSource>
</data>

Protecting a SQL statement

The following example shows a segment of an XML report definition that uses the <![CDATA[ ]]> tag to protect a SQL statement that contains a greater than sign:

<data>
  <dataSource name="Q_1">
    <select>
      <![CDATA[
        SELECT ALL VIDEO_CATEGORY_BY_QTR.QUARTER, 
        VIDEO_CATEGORY_BY_QTR.TOTAL_PROFIT
        FROM SCOTT.VIDEO_CATEGORY_BY_QTR
        WHERE (VIDEO_CATEGORY_BY_QTR.SALES_REGION='West'
        AND VIDEO_CATEGORY_BY_QTR.TOTAL_PROFIT>2000) 
      ]]>
    </select>
  </dataSource>
</data>

See also

About XML in reports

Oracle Reports XML tags