Reports


Appendix A. Report Utilities

This appendix describes utilities that are useful in developing and running reports. Utilities are listed in alphabetical order; descriptions are organized into the following components, as applicable:

In addition, the following utilities are also used with reports:

To get a command-line description of a utility's available arguments and command options, type the utility's name with the -h switch. For example:

dev2bin -h

This yields the following output:

DEV2BIN 5.5 - Converts Panther report device file to binary
Copyright (C) Prolifics, 1985 - 2016

Usage: dev2bin -e <device file>

-e<str> Use specified extension for output file (default 'bin')

dev2bin

Compiles a device configuration file for report output

dev2bin [-e ext] filename

-e ext
Specify the extension for the device binary file. If the -e option is omitted, the resulting file is named filename.bin.

filename
Name of the device configuration file. If the name does not include an extension, dev2bin looks first for filename.dev. If that file cannot be opened, it attempts to open filename (with no extension).

Description

dev2bin produces a device binary file from the device configuration file identified by filename. The output of dev2bin is a binary file named filename.bin or filename.ext if the -e option is specified.

A report accesses a device configuration file it by specifying it as an invocation option.

Device configuration files specify formatting options for reports generated in ASCII text format. For more information on these formatting options, refer to Appendix C, "Report Device Configuration Files."


rwrun

Runs a report

rwrun filename[!reportname] [ (arg[, ... ] )] [ option ]...

filename
Name of report file. Panther looks for the file in the application's memory-resident list, then in all open libraries. For remote report processing, the report file must be in a server or common library.

reportname
Name of a report definition in filename to invoke. If reportname is omitted, Panther uses the first report definition in the file.

arg
One or more arguments to the report. Each argument must be a valid JPL expression–either a string within quotation marks, a number, or the name of a Panther variable to evaluate when the report is run. In order to process these arguments, the following conditions must be true:

option
Specify one or more invocation options–for example, to specify the desired driver, output destination, and page orientation. For a description of invocation options, refer to "Setting Invocation Options."

Description

rwrun invokes Panther's report generation facility to execute the specified report. The following requirements apply when using rwrun:

Remote Processing and Client Authentication

If rwrun specifies the remote option, the utility connects to the application middleware through a call to client_init. This call supplies no arguments for client authentication. If an application requires authentication such as an application password, attempts to run the report remotely with rwrun will fail. In this case, modify rwmain.c to include a call to client_init that supplies the necessary arguments. This source module is part of the Panther distribution; it contains a comment block with sample code that shows how to call client_init.

Example

The following example runs the custinfo.rpt report for customer ID 11 and writes the report to the file custinfo.txt.

rwrun custinfo.rpt \(11\) output=custinfo.txt