Help/Systems SEQUEL Software PowerTech Skybot Software
Data Access & Analysis For System i

October 2009

Creating ViewPoint shortcuts

Launching a ViewPoint view, table, report, or script from a desktop icon is one of the easiest ways to use ViewPoint. For any PC user familiar with Windows, creating a shortcut is generally a straightforward task. However, it can become complicated when command line switches are needed to direct output or to specify variables. For example, you might want to create an icon on the desktop that, when double-clicked, runs a SEQUEL view and automatically saves the results to an EXCEL spreadsheet with a specific name in a specific folder. ViewPoint now provides a wizard that makes it easy to create ViewPoint shortcuts by prompting for the output option and its required properties.

First, select a view for the shortcut to reference by clicking on its name in the Existing tab or the Recent tab of the ViewPoint Object Display.

There are two ways to access the shortcut wizard:

  • Select File > Create Shortcut from the ViewPoint menu bar.
  • Right-click your selected view and then choose Create Shortcut from the resulting context menu (as shown on above).

When the Shortcut Options window (shown below) displays, you can choose from seven options:

  • Display
  • Print to System i output queue
  • Print to a PC printer
  • Create a System i physical file
  • Create a PC file
  • E-mail the view results
  • Open the view in design mode.

Only one output option can be selected at a time.

When you click an option, additional parameters (along with associated help text) display at the bottom of the window. Complete the information, click OK, and you’ll be prompted to save the ViewPoint icon on the desktop. Note: The icon displays as a ViewPoint file, with the extension .vpt.

This example created a desktop icon named CUSTLIST.vpt which, when double-clicked, automatically runs the CUSTLIST view and saves CUSTLIST.xls to the desktop.

Contributed by Steven Smith, Techical Consultant

Creating Windows shortcuts to display ViewPoint results

Windows users who are very comfortable creating shortcuts in Windows may prefer to enter ViewPoint command line switches directly in a Windows shortcut, rather than using the ViewPoint shortcut wizard explained in the previous article.

Simply create your Windows shortcut, select ‘Properties’ and use the SEQUEL command switches explained below.

Note: To create the shortcut you need to know the path to ViewPoint.exe. It is:

\Program Files\SEQUEL ViewPoint\ViewPoint.exe.

Therefore, the target command string always begins:

C:\Program Files\SEQUEL ViewPoint\ViewPoint.exe

At this point, you can complete the command string with the command switches that accomplish your final goal.

Examples

Send results for the view CUSTLIST as an HTML file named test.htm to an e-mail recipient.

C:\Program Files\SEQUEL ViewPoint\ViewPoint.exe

/v:your system name/sequelex/custlist

/e:anyone@yourcompany.com

/d:test.htm

Create an Excel spreadsheet named test.xls on the desktop from the view CUSTLIST.

C:\Program Files\SEQUEL ViewPoint\ViewPoint.exe

/v:your system name/sequelex/custlist

/d: C:\Documents and Settings\%userprofile%\Desktop\CUSTLIST.XLS

Pass the value of 101100 for the variable &cusno and then display the view CUSTLISTP.

C:\Program Files\SEQUEL ViewPoint\ViewPoint.exe

/v:your system name/sequelex/custlistp /setvar((&cusno 101100))

Using ViewPoint Command Switches in a Visual Basic Program

SEQUEL commands also can be incorporated into Visual Basic programs to make it especially easy to retrieve System i data. In the example below, DDCUSNO is the name of a prompted SEQUEL view in the SEQUELEX library.

  • Create a new Visual Basic project.
  • On the form, place a command button named cmdDDCUSNO.
  • Place the following code in the cmdDDCUSNO click event:

Private Sub cmdDDCUSNO_Click()

'Display view DDCUSNO passing 10 as the value for the prompted

variable &REGON Shell ("C:\Program files\SEQUEL ViewPoint\ViewPoint.exe

/v:system/sequelex/ddcusno /setvar((&regon 10))")

End Sub

Contributed by Steve Smith, Technical Consultant

Need Help?

Talk to Us
In the U.S. and Canada, call 1-800-328-1000 and ask for Sales.
Elsewhere in the world, contact your local international office.