Creating Visual Discovery Output Files

How to:

Reference:

Visual Discovery creates graphs using a tab-delimited data file as input. The first record of the data file contains the column titles for the data values. The next record can contain the Visual Discovery field formats. If this record is not present, Visual Discovery attempts to determine the formats of the data fields by reading the first 50 records from the data file, a process that is not guaranteed to create accurate representations of the WebFOCUS formats.

The FORMAT VISDIS option creates a tab-delimited output file with the extension .txt in which the first record has the column titles and the second record contains Visual Discovery formats based on the field formats of the data. A .fex with PCHOLD FORMAT VISDIS can also be created and used the same way as the .txt file.


Top of page

x
Reference: Format Conversions for FORMAT VISDIS

FOCUS Format

Visual Discovery Format

Integer

I

Decimal/Packed

R

Alphanumeric

S

Date format (smart date)

D%format%format%format (for example, D%Y%m%d). If the year is not a four-digit year, the format returned is S.

Other

S



x
Procedure: How to Create a Visual Discovery Output File From Report Painter
  1. Open Developer Studio.
  2. If necessary, create a new project for the report.
  3. Add the necessary Master File to your project.
  4. Create a new procedure and open Report Painter.
  5. Add fields to your report.
  6. From the Report menu, select Output.
  7. From the Output Format drop-down list, expand the Unstyled formats folder and select Tab delimited text file for Visual Discovery (VISDIS).
  8. From the Destination drop-down list, select one of the following options:
    1. Save file to create a .txt output file.

      In the Name field, specify the destination path and name for the file, using the Browse (...) button to navigate the path. This option saves the output as a text file to a physical location on the disk.

    2. Web browser to create a .fex with PCHOLD FORMAT VISDIS output file.

      This option saves the output as a .fex, which uses live data. Only .fex files that have been saved with PCHOLD FORMAT VISDIS can be used as data for Visual Discovery controls.

  9. Click Apply.
  10. Click OK to exit the Report Options dialog box.
  11. Save your work and click Run.

    A new browser window opens with information similar to the following, where 581 is the total number of rows in the data source, and 5 is the total number of rows in the Visual Discovery file:

    0 NUMBER OF RECORDS IN TABLE=         581  LINES=      5

Top of page

x
Syntax: How to Create a Visual Discovery Output File Using WebFOCUS Language
[ON TABLE] HOLD [AS filename] FORMAT VISDIS
[ON TABLE] PCHOLD [AS filename] FORMAT VISDIS
[ON TABLE] SAVE FILENAME 'application_name/filename.txt' FORMAT VISDIS

where:

HOLD

Creates the results in memory, but does not save them to a text file unless you specify the Dialogue Manager command, APP HOLD application_name, in the report request.

For details on HOLD, see the topics on saving and reusing report output in the Creating Reporting Applications With Developer Studio manual.

PCHOLD

Presents the results as output to a browser. When accessed by Visual Discovery, the procedure is initialized by the ActiveX control using the URL of the procedure. The ActiveX control then interprets the output. Visual Discovery uses a live data pool and does not require a physical output file.

SAVE

Creates a physical output file for use when the Visual Discovery page points to a static data pool.

filename

Is the name of the output file.

Note: A Master File is not created for format VISDIS.



Example: Creating a Visual Discovery Output File Using WebFOCUS Language

Using the CENTURYSALES data source, the following request creates a Visual Discovery output file named AUDIOSYSTEMSSALES.TXT, which is stored in the Visual_Discovery application folder in Developer Studio.

TABLE FILE CENTURYSALES
SUM
     QUANTITY
     LINEPRICE AS 'Revenue'
BY PRODUCTCATEGORY
BY PRODUCTNAME
WHERE SALESREP EQ 'Web';
WHERE PRODUCTCATEGORY EQ 'Audio Systems';
ON TABLE SAVE FILENAME
'VISUAL_DISCOVERY/AUDIOSYSTEMSSALES.TXT'
 FORMAT VISDIS
END

The following file is created. For clarity, the tab characters in the file are displayed as a greater than sign (>) surrounded by blanks. Note that the first record has the column titles and the second has the Visual Discovery formats.

Product Category > Product Name > Quantity > Revenue
S > S > I > R
Audio Systems > Home Theater 5.1 System > 2087 > 4171913.00
Audio Systems > Home Theater 7.1 THX System > 243 > 728757.00
Audio Systems > Home Theater Surround System > 703 > 702297.00
Audio Systems > Micro 5.1 System > 857 > 427643.00
Audio Systems > Micro HiFi Stereo System > 2096 > 836304.00

WebFOCUS