Code Search for Developers
 
 
  

birt-12-5.html from BIRT at Krugle


Show birt-12-5.html syntax highlighted

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="GENERATOR" content="Quadralay WebWorks Publisher 2003 for FrameMaker 8.0.7.2249" />
    <meta name="TEMPLATEBASE" content="Dynamic-HTML-Eclipse-20060620" />
    <meta name="LASTUPDATED" content="06/23/06 16:57:46" />
    <title>How to create a data-set parameter </title>
    <link rel="StyleSheet" href="document.css" type="text/css" media="all" />
    <link rel="StyleSheet" href="catalog.css" type="text/css" media="all" />
<link rel="contents" title="Table of Contents" href="TOC.html" />
<link rel="first" title="First" href="TOC.html" />
<link rel="last" title="Last" href="birt-24-1.html" />
<link rel="previous" title="Previous" href="birt-12-4.html" />
<link rel="next" title="Next" href="birt-12-6.html" />

  </head>

  <body>
    <table id="SummaryNotReq1" border="0" align="right" cellpadding="4" cellspacing="0">
      <tr>
        <td>
<a accesskey="4" href="birt-12-4.html"><img id="LongDescNotReq1" src="images/prev.gif" border="0" alt="Previous Topic" /></a><a accesskey="5" href="birt-12-6.html"><img id="LongDescNotReq2" src="images/next.gif" border="0" alt="Next Topic" /></a>
        </td>
      </tr>
    </table>
<br />
<br />
<!-- AC_CONTENT -->
<a name="wp140491"> </a><h4 class="pHeading4">
How to create a data-set parameter 
</h4>
<a name="wp251082"> </a><p class="pBody">
This procedure assumes that you have already inserted a parameter marker in the SQL query.
</p>
<a name="wp251084"> </a><p class="pBody">
If you create multiple data-set parameters, create them in the order in which their corresponding parameter markers appear in the WHERE clause. 
</p>
<div class="pSmartList1"><ol type="1" class="pSmartList1">
<a name="wp140501"> </a><div class="pSmartList1"><li>In the data explorer, choose the data set for which you want to create parameters. Edit Data Set displays the query for the data set.</li></div>
<a name="wp227306"> </a><div class="pSmartList1"><li>Choose Parameters. Edit Data Set displays default parameter information in the first row.</li></div>
<a name="wp141938"> </a><div class="pSmartList1"><li>Create a data-set parameter by specifying the following required values:</li></div>
<div class="pSmartList2"><ol type="1" class="pSmartList2">
<a name="wp259120"> </a><div class="pSmartList2"><li>In the first row, in Name, type a name for the parameter. It is good practice to prefix the name you select with DSP for data-set parameter to to help distinguish the parameter from other parameter types, such as report parameters. For example, a data-set parameter used to filter quantityinstock might be named DSP_quantityinstock.</li></div>
<a name="wp141939"> </a><div class="pSmartList2"><li>In Data type, select a data type for the parameter.</li></div>
<a name="wp140505"> </a><div class="pSmartList2"><li>In Direction, choose Input. This value means that the parameter is an input parameter. </li></div>
<a name="wp140506"> </a><div class="pSmartList2"><li>Select Default value and a button appears at the right of the empty field</li></div>
<a name="wp259636"> </a><div class="pSmartList2"><li>Choose the ellipsis (...) button at the right. Expression Builder appears.</li></div>
</ol></div>
<a name="wp181643"> </a><div class="pSmartList1"><li>Bind the data-set parameter to the appropriate report parameter by selecting the report parameter as the data-set's default value:</li></div>
<div class="pSmartList2"><ol type="1" class="pSmartList2">
<a name="wp259156"> </a><div class="pSmartList2"><li>Under Category choose Report Parameters, then choose All under Sub-Category. The report parameters that you created appear, as shown in <a href="birt-12-5.html#wp259260">Figure 12-3</a>.</li></div>
<a name="wp259258"> </a><p class="pBodyRelative">
<img src="images/binding_dataset_parm.gif" height="267" width="461" id="wp259361" border="0" hspace="0" vspace="2"/>
</p>
<a name="wp259260"> </a><div class="pFigTitle">
Figure 12-3	 Binding a data-set parameter to a report parameter

</div>
<a name="wp259666"> </a><div class="pSmartList2"><li>Double-click on the appropriate report parameter. The report parameter appears in the expression area.</li></div>
<a name="wp259667"> </a><div class="pSmartList2"><li>Choose OK.</li></div>
</ol></div>
<a name="wp259664"> </a><div class="pSmartList1"><li>Repeat steps <a href="birt-12-5.html#wp141938">3</a> and 4 to create additional data-set parameters for any other parameter markers that you inserted in your SQL query. </li></div>
<a name="wp140525"> </a><div class="pSmartList1"><li>Assuming you have entered a Default value for your report parameter(s), you can choose Preview Results to verify that the query returns rows that match your WHERE condition.</li></div>
<a name="wp259959"> </a><div class="pSmartList1"><a href="birt-12-5.html#wp250541">Figure 12-4</a> shows the results of the previous example where a default value of 999 was entered for the report parameter RP_quantityinstock. It shows all rows for products in stock with a quantity of less than 999.</div>
<a name="wp259963"> </a><p class="pBodyRelative">
<img src="images/dsparameterresults.gif" height="219" width="427" id="wp259961" border="0" hspace="0" vspace="2"/>
</p>
<a name="wp250541"> </a><div class="pFigTitle">
Figure 12-4	 Preview Results, with rows that match the WHERE condition

</div>
<a name="wp259587"> </a><div class="pSmartList1"><li>To save the data-set parameters, choose OK.</li></div>
<a name="wp143415"> </a><div class="pSmartList1"><li>Test the parameters to verify that the query is updated with user-specified values and that the report shows the results you expect:</li></div>
<div class="pSmartList2"><ol type="1" class="pSmartList2">
<a name="wp143455"> </a><div class="pSmartList2"><li>Choose Preview.</li></div>
<a name="wp259966"> </a><div class="pSmartList2"><li>If Enter Parameters does not appear, choose Show Report Parameters.</li></div>
<a name="wp143459"> </a><div class="pSmartList2">Enter Parameters displays all the report parameters that you created. <a href="birt-12-5.html#wp250701">Figure 12-5</a> shows the simple report parameter RP_quantityinstock.</div>
<a name="wp143464"> </a><p class="pBodyRelative">
<img src="images/enter_quantityinstock_parm.gif" height="133" width="354" id="wp260026" border="0" hspace="0" vspace="2"/>
</p>
<a name="wp250701"> </a><div class="pFigTitle">
Figure 12-5	 Enter Parameters

</div>
<a name="wp143460"> </a><div class="pSmartList2"><li>Specify values for the parameters, then choose OK.</li></div>
</ol></div>
</ol></div>
<a name="wp143546"> </a><p class="pBody">
If you completed all the tasks that were described earlier in this chapter, the WHERE clause of your query is updated with the specified values, and the report displays the rows that match the WHERE clause.
</p>
<!-- /AC_CONTENT -->
<!--
    <blockquote>
    <  !--BeginHiddenExpansion Dollar_BP80PageASP_Content; EndHiddenExpansion--  >
    </blockquote>
<br />
-->
<br />
<a href="../notices.html">
  <img src="images/ac-copyright.gif" width="296" height="14" border="0" alt="(c) Copyright Actuate Corporation 2006" /><br />
</a>
<br />
<!--
    <hr />
    <table id="SummaryNotReq2" align="right" border="0" cellspacing="0" cellpadding="4">
      <tr>
        <td align="right">

          <span style="font-size: 10px">
          <img src="images/actuate_logo.gif" width="186" height="42" border="0" alt="(c) Copyright Actuate Corporation 2005" /><br />
          <span style="font-size: 14px ; font-weight: bold; font-family: Arial, Helvetica, sans-serif">
            Actuate Corporation<br />
          </span>
          
        Actuate Corporation<br />
        <a href="http://www.actuate.com">http://www.actuate.com</a><br />
        <a href="mailto:info@actuate.com">info@actuate.com</a>

        <br />
        </span>
        </td>
      </tr>
    </table>
-->
    <table id="SummaryNotReq3"  border="0" align="left" cellpadding="4" cellspacing="0">
      <tr>
        <td>
<a accesskey="4" href="birt-12-4.html"><img id="LongDescNotReq3" src="images/prev.gif" border="0" alt="Previous Topic" /></a><a accesskey="5" href="birt-12-6.html"><img id="LongDescNotReq4" src="images/next.gif" border="0" alt="Next Topic" /></a>
        </td>
      </tr>
    </table>

</body>
</html>




See more files for this project here

BIRT

BIRT is an open source, Eclipse-based reporting system that integrates with your application to produce compelling reports for both web and PDF.

Project homepage: http://www.eclipse.org/birt/phoenix/
Programming language(s): Java,XML
License: gpl2

  images/
  scripts/
  TOC.html
  birt-01-1.html
  birt-01-2.html
  birt-02-1.html
  birt-02-2.html
  birt-02-3.html
  birt-02-4.html
  birt-02-5.html
  birt-02-6.html
  birt-02-7.html
  birt-03-01.html
  birt-03-02.html
  birt-03-03.html
  birt-03-04.html
  birt-03-05.html
  birt-03-06.html
  birt-03-07.html
  birt-03-08.html
  birt-03-09.html
  birt-03-10.html
  birt-03-11.html
  birt-04-1.html
  birt-04-2.html
  birt-05-1.html
  birt-05-2.html
  birt-05-3.html
  birt-05-4.html
  birt-05-5.html
  birt-05-6.html
  birt-05-7.html
  birt-06-1.html
  birt-06-2.html
  birt-07-01.html
  birt-07-02.html
  birt-07-03.html
  birt-07-04.html
  birt-07-05.html
  birt-07-06.html
  birt-07-07.html
  birt-07-08.html
  birt-07-09.html
  birt-07-10.html
  birt-07-11.html
  birt-07-12.html
  birt-07-13.html
  birt-07-14.html
  birt-08-1.html
  birt-08-2.html
  birt-09-1.html
  birt-09-2.html
  birt-10-1.html
  birt-11-1.html
  birt-11-2.html
  birt-11-3.html
  birt-11-4.html
  birt-11-5.html
  birt-12-1.html
  birt-12-2.html
  birt-12-3.html
  birt-12-4.html
  birt-12-5.html
  birt-12-6.html
  birt-13-1.html
  birt-13-2.html
  birt-14-1.html
  birt-14-2.html
  birt-15-1.html
  birt-15-2.html
  birt-15-3.html
  birt-15-4.html
  birt-15-5.html
  birt-16-01.html
  birt-16-02.html
  birt-16-03.html
  birt-16-04.html
  birt-16-05.html
  birt-16-06.html
  birt-16-07.html
  birt-16-08.html
  birt-16-09.html
  birt-16-10.html
  birt-16-11.html
  birt-16-12.html
  birt-16-13.html
  birt-16-14.html
  birt-17-1.html
  birt-17-2.html
  birt-17-3.html
  birt-17-4.html
  birt-18-1.html
  birt-18-2.html
  birt-18-3.html
  birt-18-4.html
  birt-18-5.html
  birt-18-6.html
  birt-19-1.html
  birt-19-2.html
  birt-19-3.html
  birt-19-4.html