Working With HTML Reports

In this section:


Top of page

x
Preserving Leading and Internal Blanks in Report Output

How to:

By default, HTML browsers and Excel remove leading and trailing blanks from text and compress multiple internal blanks to a single blank.

If you want to preserve leading and internal blanks in HTML and EXL2K report output, you can issue the SET SHOWBLANKS=ON command.

Even if you issue this command, trailing blanks will not be preserved except in heading, subheading, footing, and subfooting lines that use the default heading or footing alignment.



x
Syntax: How to Preserve Leading and Internal Blanks in HTML and EXL2K Reports

In a FOCEXEC, on the command line, or in a profile use the following syntax

SET SHOWBLANKS = {OFF|ON}

In a request, use the following syntax

ON TABLE SET SHOWBLANKS {OFF|ON}

where:

OFF

Removes leading blanks and compresses internal blanks in HTML and EXL2K report output.

ON

Preserves leading and internal blanks in HTML and EXL2K report output. Also preserves trailing blanks in heading, subheading, footing, and subfooting lines that use the default heading or footing alignment.



Example: Preserving Leading and Internal Blanks in HTML and EXL2K Report Output

The following request creates a virtual field that adds leading blanks to the value ACTION and both leading and internal blanks to the values TRAIN/EX and SCI/FI in the CATEGORY field. It also adds trailing blanks to the value COMEDY:

SET SHOWBLANKS = OFF
DEFINE FILE MOVIES
NEWCAT/A30 = IF CATEGORY EQ 'ACTION' THEN '  ACTION'
        ELSE IF CATEGORY EQ 'SCI/FI' THEN 'SCIENCE   FICTION'
        ELSE IF CATEGORY EQ 'TRAIN/EX' THEN '   TRANING    EXERCISE'
        ELSE IF CATEGORY EQ 'COMEDY' THEN 'COMEDY     '
        ELSE                'GENERAL';
END
TABLE FILE MOVIES
SUM CATEGORY LISTPR/D12.2 COPIES
BY NEWCAT
ON TABLE HOLD FORMAT HTML
ON TABLE SET STYLE *
GRID=OFF,$
TYPE=REPORT, FONT=COURIER NEW,$
ENDSTYLE
END

With SHOWBLANKS OFF, these additional blanks are removed:

With SHOWBLANKS ON, the additional leading and internal blanks are preserved. Note that trailing blanks are not preserved:


Top of page

x
Creating HTML Reports With Absolute Positioning

How to:

Reference:

Format DHTML provides HTML output that has most of the features normally associated with output formatted for printing such as PDF or PostScript output. You can create an HTML file (.htm) or a Web Archive file (.mht). The type of output file produced is controlled by the value of the HTMLARCHIVE parameter.

Some of the features supported by format DHTML are:



x
Syntax: How to Create Web Archive Report Output
SET HTMLARCHIVE = {ON|OFF}

where:

ON

Creates output in Web Archive format. The file type of the output file is MHT.

OFF

Creates output in HTML format The file type of the output file is HTM. OFF is the default value.



x
Syntax: How to Create a DHTML Report
[ON TABLE] HOLD [AS name] FORMAT DHTML

where:

name

Specifies the name of the output file. The extension will be HTML if SET HTMLARCHIVE is OFF or MHT if SET HTMLARCHIVE is ON.



x
Reference: Usage Notes for Format DHTML


Example: Creating a DHTML Report

The following example creates a DHTML file that has an image with absolute positioning:

SET HTMLARCHIVE = OFF
TABLE FILE GGSALES
SUM UNITS BY CATEGORY BY PRODUCT
ON TABLE SUBHEAD
"Report on Units Sold"
" "
" "
" "
" "
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD FORMAT DHTML
ON TABLE SET STYLE *
TYPE=TABHEADING,IMAGE=c:\images\GOTHAM.GIF, POSITION=(.25 .25),
 SIZE=(.5 .5), $
ENDSTYLE
END

The output shows that the look and positioning are the same as they would be for a PDF report:


Information Builders