Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\TDPAX\td_blddptdet.htm
<!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=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Adding a Conditional Department Details Report</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T18:17:40Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Adding a Conditional Department Details Report" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E11946-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface.htm" title="Home" type="text/html" /> <link rel="up" href="build_app.htm" title="Building Your Application" type="text/html" /> <link rel="up" href="td_blddptdet.htm" title="Adding a Conditional Depart..." type="text/html" /> <link rel="prev" href="td_bldcolval.htm" title="Previous" type="text/html" /> <link rel="next" href="td_bldcmpnme.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="build_app.htm" title="Building Your Application">Building Your Application</a> > Adding a Conditional Depart...</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="td_bldcolval.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="td_bldcmpnme.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BCEIFAJD" name="BCEIFAJD"></a></p> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h1><a name="TDPAX04011|how to add a conditional Department details report"></a>Adding a Conditional <a id="sthref273" name="sthref273"></a><a id="sthref274" name="sthref274"></a>Department Details Report</h1> <p>In this exercise, you add a report as a region that displays department details. You also create a condition so that the report displays department information only if you select a department. If you select <span class="bold">No Department Assigned</span>, the Department Details report does not appear.</p> <a id="sthref275" name="sthref275"></a> <p class="subhead2">Topics:</p> <ul> <li> <p><a href="#BCEGFDEA">Creating the Report and Condition</a></p> </li> <li> <p><a href="#BCEFCCEG">Turning Off Pagination</a></p> </li> </ul> <a id="BCEGFDEA" name="BCEGFDEA"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h2>Creating the <a id="sthref276" name="sthref276"></a><a id="sthref277" name="sthref277"></a>Report and Condition</h2> <p>First, create the report and set it to conditionally display.</p> <p>To create the report and condition:</p> <ol> <li> <p>Navigate to the Page Definition for page 3, Employees.</p> </li> <li> <p>Under Regions, click the <span class="bold">Create</span> icon.</p> </li> <li> <p>For Region:</p> <ol> <li> <p>Identify the type of region to add to this page - Select <span class="bold">Report</span> and click <span class="bold">Next</span>.</p> </li> <li> <p>Report Implementation - Accept the default, <span class="bold">SQL Report</span>, and click <span class="bold">Next</span>.</p> </li> </ol> </li> <li> <p>For Display Attributes:</p> <ol> <li> <p>Title - Enter <code>Department Details</code>.</p> </li> <li> <p>Region Template - Select <span class="bold">No Template</span>.</p> </li> <li> <p>Sequence - Enter <code>7</code>.</p> </li> <li> <p>Accept the remaining defaults and click <span class="bold">Next</span>.</p> </li> </ol> </li> <li> <p>For Source:</p> <ol> <li> <p>Enter the following query:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT count(e2.employee_id) "Number of Employees:", substr(e.first_name,1,1)||'. '|| e.last_name "Manager Name:", c.country_name "Location:" FROM oehr_departments d, oehr_employees e, oehr_locations l, oehr_countries c, oehr_employees e2 WHERE d.manager_id = e.employee_id AND d.location_id = l.location_id AND d.department_id = e2.department_id AND l.country_id = c.country_id AND nvl(d.department_id,'-1') = nvl(:P3_DEPARTMENT_ID,'-1') GROUP BY substr(e.first_name,1,1)||'. '||e.last_name, c.country_name </pre></li> <li> <p>Click <span class="bold">Next</span>.</p> </li> </ol> <p>Next, you create a condition that does not display department details when the user selects the <span class="bold">No Department Assigned</span> option.</p> </li> <li> <p>For Report Attributes:</p> <ol> <li> <p>Report Template - Select <span class="bold">default: vertical report, look 1 (include null columns)</span>.</p> <p>This selection displays the list vertically.</p> </li> <li> <p>Accept the remaining defaults and click <span class="bold">Next</span>.</p> </li> </ol> </li> <li> <p>For Conditional Display:</p> <ol> <li> <p>Condition Type - Select <span class="bold">Value of Item in Expression 1 != Expression 2</span>.</p> <p>Note the exclamation point (!) included after Expression 1 in the option to select.</p> </li> <li> <p>Expression 1 - Enter:</p> <pre xml:space="preserve" class="oac_no_warn"> P3_DEPARTMENT_ID </pre></li> <li> <p>Expression 2 - Enter:</p> <p><code>-1</code></p> </li> <li> <p>Click <span class="bold">Create Region</span>.</p> </li> </ol> </li> </ol> </div> <!-- class="sect2" --> <a id="BCEFCCEG" name="BCEFCCEG"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h2>Turning Off Pagination</h2> <p>Next, turn off pagination for the Department Details report, because only one record (the department details report) displays at a time. If pagination is on, the region that displays the department details includes the information <span class="italic">row 1 - 1</span>.</p> <p>To turn off pagination:</p> <ol> <li> <p>Under Regions, click <span class="bold">Report</span> (next to Department Details).</p> </li> <li> <p>Scroll down to Layout and Pagination.</p> </li> <li> <p>For Pagination Scheme, select <span class="bold">- No Pagination Selected</span>.</p> </li> <li> <p>Click <span class="bold">Apply Changes</span>.</p> </li> <li> <p>Run the page.</p> </li> <li> <p>From the Department list, select <span class="bold">No Department Assigned</span>.</p> <img src="img/bldapp_nodptassgn.gif" alt="Description of bldapp_nodptassgn.gif follows" title="Description of bldapp_nodptassgn.gif follows" longdesc="img_text/bldapp_nodptassgn.htm" /><br /> <a id="sthref278" name="sthref278" href="img_text/bldapp_nodptassgn.htm">Description of the illustration bldapp_nodptassgn.gif</a><br /> <br /> <p>Employee Kimberely Grant appears. This employee is not currently assigned to a department. Therefore, no department details appear. The <span class="italic">1 - 1</span> you see on this form is part of the Employees report, not part of the Department Details region you just edited.</p> </li> <li> <p>From the Department list, select <span class="bold">Marketing</span>.</p> <img src="img/bldapp_dptdetail.gif" alt="Description of bldapp_dptdetail.gif follows" title="Description of bldapp_dptdetail.gif follows" longdesc="img_text/bldapp_dptdetail.htm" /><br /> <a id="sthref279" name="sthref279" href="img_text/bldapp_dptdetail.htm">Description of the illustration bldapp_dptdetail.gif</a><br /> <br /> <p>Note the details under Department.</p> </li> </ol> </div> <!-- class="sect2" --></div> <!-- class="sect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="td_bldcolval.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="td_bldcmpnme.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de