Creating the Example

This section describes how to create the example shown in Figure A6 Example Drill Across Report on page 633.

Report development

To create the reports in the example:

1.   Using report designer create the main report and name it Customer_information.

2.   The Customer_information report does not have any parameters.

3.   Create a child report, and name it order_details_and_suppliers.

4.   The order_details_and_suppliers is a parameterized report with Company_Name defined as a parameter.

5.   Create a second child report, and name it Supplier_list with Country_V as a parameter.

JSP Development

To run the drill across reports in JSP you must have:

•   The XML file to define parent and child report relation.

•   The JSP files to run the reports.

Create the following XML file:

<?xml version="1.0" encoding="UTF-8"?>

<drillAcross>

<drillReport name=" Customer_information.rpt">

<from column="CompanyName

<to type="report" name= order_details_and_suppliers.par"

   fileOwner="netcool" target="top">

<parameter name="Company_Name " value=" CompanyName "

</to>

</from>

<from column="CITY">      

<to type="link" name="City.jsp" target="top">

   <parameter name=”City_V" value="CITY" />

       </to>

</from>

<from column="Country">

<to type="report" name=" Supplier_list.par" fileOwner="netcool" target="top">

    <parameter name="Country_V " value="Country" />

</to>

</from>

</drillReport>

</drillAcross>

The same XML code is shown below with descriptions of each line.

<?xml version="1.0" encoding="UTF-8"?> -- xml version

<drillAcross> -- drill across start tag

<drillReport name="Customer_information.rpt"> -- parent report name

<from column="CompanyName"> -- Column name to drill for report 1

<to type="report" name="order_details_and_suppliers.par"

       (Run report)             (Report 1 name)

fileOwner="netcool" target="top"> -- to run the report in the same browser TOP of

(Owner of the report) parent report

<parameter name="Company_Name" value="CompanyName" />

             (The parameter to JSP Page) (The column name from report 1)

</to>

</from>

<from column="CITY">         -- Column name to run the link(JSP/HTML)

<to type="link" name="City.jsp" target="top">

(To run link)    (The link to file name)

   <parameter name=”City_V" value="CITY" />

(The parameter to JSP Page) (The column name from report 1)

</to> (Follow the same for Report 2)

</from>

<from column="Country">

<to type="report" name=" Supplier_list.par" fileOwner="netcool" target="top">

    <parameter name="Country_V " value="Country" />

</to>

</from>

</drillReport>

</drillAcross>