0816-0820

Previous Table of Contents Next

Page 816

Starting the Module Data Diagrammer

The best way to open an existing module is by selecting the module in the repository and opening the Module Data Diagrammer from the Tools menu option. This will open the module that you are currently on.

NOTE
If the modules were generated using the Application Design Wizard, they will be marked with the Candidate Flag set to true. The Module Data Diagrammer will not open the module until this flag has been reset to null and saved in the RON. The module will include the table and column usage previously set in the business function. However, the relationships will not exist. To learn how to establish the relationships, continue reading.

If, however, you want to open a new diagram separately, select the Module Data Diagrammer from the Designer/2000 screen. Across the screen you will see a set of icons specifically used to design a diagram. (See Figure 33.2.) On the top of the screen are a pull-down menu and a toolbar of icons. All of the functions that these icons perform can also be found on the menu bar under Edit, View, Utilities, and Tools. Whether you choose to use the icons or the menu is a matter of personal preference.

Figure 33.2.
The Module Data
Diagrammer with
diagram toolbar buttons .


Creating a Diagram

Initially, you can create a new diagram by either choosing New from the File menu or pressing the New Diagram icon. Figure 33.3 shows the New Diagram dialog box with the Module type and several selections.

Page 817

NOTE
When you choose this icon or any icon from the Designer/2000 toolset, help is always available. You can see the help message appear in the balloon to the right of the icon when you move your cursor to an icon, without pressing the mouse button. You can also get help by pressing the Context Help icon and then selecting anything on your screen (either an icon or an element). Finally, you can search for help on any topic from the Help menu.
Using Tables for Screen Modules

To add a table for a screen module, select the table icon from the toolbar and drag the cursor onto the page palette.

To add, edit, or view the table usage for an object, double-click within the boundaries of the object. This action will result in a tab form screen that enables you to change table details, table layout, and table text.

Figure 33.3.
Creating a new
diagram.

In the Table Details tab (see Figure 33.4), you can edit the allowable actions that are on the screen: Insert, Delete, Query, Update, and Other. These usages are the default for the entire table. Next, you can change the Alias, Block Title, and Comment.

In the Table Layout tab (see Figure 33.5), you can select the number of rows to be displayed, Overflow Style, measurements of the canvas, and window. You can also tell the generator to generate the maximum number of rows possible and indicate whether the window is scrollable.

NOTE
Overflow styles tell the generator what to do with columns that will not fit in a single row. Available options are overflow area below, overflow area right, spread table, and wrap line. These settings, along with the context usage and item group , allow the user to achieve 100 percent generation.

Page 818

Figure 33.4.
Use the Table Details
tab to set the alias and
other details.



Figure 33.5. The Table Layout tab
affects the diagram's
appearance.


In the Table Text tab (see Figure 33.6), you can type any WHERE clause, notes, and help text that you want for online help on the screen you are designing. The WHERE clause can limit the records returned in a lookup table based on a rule of the module being generated.

For example, if you only wanted the user to be allowed to choose from a set of active records, you could restrict the WHERE clause by indicating where (table_name>.active = `A'). It is not necessary to type the WHERE. This might not always be a good thing because the WHERE clause is not only used in the lookup list of values code generated but also the post-query trigger that would not allow records to be displayed when an active flag is set to inactive, even though the record itself is still active.

Page 819

Figure 33.6.
Use the Table Text tab
for notes and limiting
returned records.



Editing Table Usage for a Report

To edit a table usage for a report, double-click the item. You will then see the Detailed Usages for Report Module tabbed dialog box. Under the Table Details tab (see Figure 33.7), you can edit the title and alias to be displayed, add comments, and choose the layout style. You can also choose the maximum number of records that can appear on a page. You can also edit the Column Details and Column Text for reports in this dialog box.

Figure 33.7.
The Table Details tab
for a report.


The Table Text tab in this dialog box enables you to put in any additional notes and any WHERE clause. The WHERE clause limits the referenced table based on a rule for the module.

Page 820

TIP
Wait to edit the table usage until after you have added column usage. That way you only have to edit the screen once.
Creating Relationships

After you have added more than one table to a diagram, you will want to create the relationships between the tables. If the relationship is between two base tables, select the relationship icon and click and drag the cursor from one table to the other. If a relationship exists, a straight bold relationship line will be created between the two tables. If the relationship is from a base table to a lookup table, drag the lookup table to the right side of the base table and release it. Occasionally, this takes several tries; however, if after several tries the horizontal relationship line still doesn't exist, check to make sure the relationship exists.

CAUTION
Sometimes the diagrammer will not accept the relationship as valid, even though the foreign key does exist in the table definition. The best way to handle this problem is to return to the Repository Object Navigator and verify that the foreign key exists under the Tables node for the base table in your diagram. Also check the key components node under the Foreign Key constraint to verify that the columns exist in the foreign key.

Finally, a toolbar icon enables the generator to generate defaults links. This will create all possible relationships between the tables you have selected. This may not always produce the desired effect.

Editing the Column Usages for Modules

If you select an existing module, the columns will appear on the screen. If you are creating a new column usage, select the table in which you want to add columns and select the Column icon. A pop-up list will appear that enables you to select the columns needed for the module, or choose Select All if all columns are to be used.

The columns will appear on your screen or report the sequence they appear in in the table. To change the sequence of the columns, select the one to be moved and drag it up or down to the position at which you want it to be.

After you have added the column usages, you can edit them by double-clicking within the boundaries of the table box. If the cursor is positioned on a particular column, the edit screen (which you also used for Table Details in the preceding section) will open to that column on the Column Details tab.

Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net