Result List


The result list is where the selected records will appear from a query. Like the Search Panel, the Result List is optional. In the final screen, the first record is always retrieved as soon as you load JDesignerPro. In the Result List screen you set the sorting options of your results list. The tables chosen for the Result List and their unique keys must be identical to those chosen for the Search panel for the two to work together.

The Results List screen allows you to define the elements affecting what appears in your query result list. Press the Reset button if you want to undo all your selections and changes.

Add Result List Settings:

Order List. The list of columns in the Add Result List is for you to choose the columns by which your user will be able to order the results. This is a sorting mechanism. You may want your users to have the ability to sort a result list by Last Name, First Name, Order number, State or any other column.

In the finished application, they will see a pull down list above the result list with these columns in it. When a column is chosen from the list, JDesignerPro will return to the database, run the sort and return the newly sorted list.

Style:

Type of Structure for Results. Under Style, you choose which type of result list you prefer for your form. The choices are Tree Structure and List. The Tree Structure produces a folder-based tree similar to that found in the Windows file explorer. This is a very useful method for "drilling-down" through your data. Simply by clicking through the tree you can visually query the data and find what you want. For example, three levels of the tree for a Help Desk application might be Department, Severity, then Problem. Clicking on the Problem branch would populate the screen with the problem details.

The column chosen by the user as the ordering column will always be the First Branch in the tree structure. If the user chooses to order the list by Last Name, that will appear as the first branch. Changing to Order Number for sorting will switch the tree to showing order Number as the first branch, since that is now the field on which the whole list is sorted.

If you select only one column in the list to use as an ordering column, the ordering pull-down will not appear. The list will default to the single selected column.

SQL Select. The SQL Select field under Style is for your own SQL Select statements to filter data for this form. For example, you might enter simply: State=’CA’, to limit results to a particular state. Be aware that this will become a built-in limit that the user cannot change.

Tree Definition:

Initial Branch text. This is the text that will appear at the top of the tree.

Icons. There are several icon pull-downs, each of which affects a different branch of the tree. The Initial branch Icon is just that, the icon that will appear at the top level of the tree. The First branch icon represents the first clickable branch in the tree. Additional branch icons are set by double-clicking a column in the right side of the Select branch structure area and selecting an icon for that column branch.

Initial Width of tree panel. The width of the result list in JDesignerPro is resizable. You may set the initial width here. If you have several branches in your tree you may want a wider width. The default is 130 pixels. Your users can also change the width at run-time by placing the mouse over the right edge of the panel, waiting for the double arrow to appear, and dragging it left or right.

Select the branch structure. From the left-hand list double-click the columns you want in the tree or highlight it and press the arrow buttons to move them into the right-hand list. The first branch you select here will actually be the Second data branch that is shown in the tree, since the First branch is always the column chosen for ordering. Add branches in any order you desire. Highlight each and choose a separate icon if necessary.

Unique key for branch in tree. This property allows you to set the unique key(s) for returning data from the database to populate the form. This determines how the tree will join to the detail in a Master/Detail, or Combo Layout. When you click on the last branch in the tree to get the data, the unique keys you select will be the relationship of the returned data. For example, your unique keys may be Store_id and Order_number. When the user clicks on the Order branch, the detail will be populated by the data containing those two keys.

Ordering:

Sort pull down text. This is the text tag that will appear above the pull down list for ordering the results.

Sort order. Choose Ascending or descending. The user does not have the ability to change this at run-time when you build with the wizard. You may add custom code to allow them to do so.

Make this the initial choice. Here you determine which column will be the default sort order when the application is first loaded.

General:

Display a list count. This simply let’s you choose whether a count is shown of the number of results in the list. The count will appear above the result list.

List count text. Enter the text tag you want to appear in front of the count number. The default is "Total Entries:"

Special where clause. Here you can set your own where clause to filter the data returned from a query. For example, you might want an employee to see only his/her own account information. Use this field to limit what that person sees by entering a unique criteria based on the employee_id or similar field. The text in this field must be a proper, ODBC compliant, SQL "Where" statement.

Add result List Action Summary:

  1. Single click on all the columns you wish to be available for sorting the result list.
  2. Choose whether you want a to use a tree structure to display results or a plain scrolling list.
  3. If a tree is used, choose the columns that you want to display in the tree. The sort order column will automatically be at the highest level in the tree.
  4. Choose the database columns that identify a unique entry in the tree. Typically these will be the key to your master table.
  5. Set the other properties according to your preference.
  6. Once you have setup all the parameters, press Accept.