Adding custom grids

Custom grids allow you display the results of a SQL query in an embedded TMW Operations data grid. This grid has many of the same features as existing grids, including column naming, resizing, repositioning, and conditional formatting.

image32

You can also add hyperlinks to custom grid columns. These hyperlinks allow you to open a report or execute a hyperlink command based on the information in your custom grid. For more information, see Adding hyperlinks to a custom grid column.

Custom grids are not limited to displaying only data in your TMWSuite database. You can use the SQL query to retrieve information from any database on the same database server.

Depending on your database and network configuration, you may need to create user accounts for the target database that match the account names in TMW Operations.

Creating a custom grid

Custom grids allow you display the results of a SQL query in an embedded TMW Operations data grid. This grid has many of the same features as existing grids, including column naming, resizing, repositioning, and conditional formatting.

image32

To create a new custom grid:

  1. Toggle into QuickDesigner mode.

  2. Right-click in the appropriate location for the new item and select Add New Item.
    The Add New Item window opens.

  3. Select the Advanced tab.

  4. Select Grid in the Link Type drop-down list.
    The Command section changes to include the SQL Command field.

    image33

  5. Type the SQL query in the SQL Command field. Enclose the query in single quotation marks.

  6. If you want to base the information retrieved by the query on the contents of the grid’s host window:

    1. Add any desired data parameters.

      Warning: Once you are finished adding a custom grid, you cannot modify the data parameters. Be sure that all data parameters are correct before continuing to the next step.

    2. Reference the parameters in the query using the format @ParameterName, where ParameterName is the entry in the parameter’s Name field.

      The parameter below is named OrderNumber.

      image5

      Reference it in the query using @OrderNumber.

      image34

  7. Click OK to add the grid.
    If there are any problems with the SQL query, the system will display an error message.

Adding hyperlinks to a custom grid column

Once you have created a custom grid, you can convert each entry in a grid column into a hyperlink. This hyperlink can open a report, program, or webpage based on the data in the selected row.

For example, if your grid displays a list of orders and their origin and destination locations, you can make each destination location a link. Clicking on the link would open a report showing all orders to that destination.

image35

You can only add hyperlinks to custom grids. You cannot add hyperlinks to existing grids.

To add a hyperlink to a custom grid column:

  1. Do one of the following:

    • Position your cursor over the column and press CTRL+A.

    • Right-click on the column header and select Design HyperLink.

    The Design Grid Hyperlink window opens.

    + image36

  2. Add a hyperlink or report using the procedure described in these sections:

To modify or remove a column’s hyperlinks:

  1. Right-click on the column header and select Design HyperLink.
    The Design Grid Hyperlink window opens.

    image37

  2. Do one of the following: