How to: |
Reference: |
A helper application or plug-in is a desktop program used by a browser to open a file with a format other than standard HTML. An example of a helper application is Adobe® Acrobat® Reader, which opens a PDF file.
When a web server sends a special type of file to a browser, it includes MIME (Multipurpose Internet Mail Extensions) information, indicating the file format. WebFOCUS determines which helper application to run based on MIME type. You must associate the content (MIME) type of a file with a helper application using Windows Explorer.
The Add New File Type dialog box opens.
WebFOCUS supports the following MIME types.
MIME Type |
Application |
File Extension |
---|---|---|
application/postscript |
GhostView |
.PS |
application/x-prn |
Printer (using PCL printer driver) |
.PRN |
application/x-dif |
Microsoft Excel® or other spreadsheet |
.DIF |
application/x-doc |
Microsoft Word |
.DOC |
application/x-xls application/vnd.ms-excl |
Microsoft Excel |
.XLS, .E97, .WK1, .XHT |
application/pdf |
Adobe Acrobat Reader |
|
text/plain |
Microsoft Notepad or other text editor |
.WP or .HTS |
text/html |
Native browser format |
.HTML |
text/htm |
Native browser format |
.HTM |
image/gif |
Native browser format |
.GIF |
image/jpeg |
Native browser format |
.JPG, .JPEG |
XML |
Native browser format |
.XML |
ON TABLE PCHOLD FORMAT fmt
where:
Is the file format for the data.
For details on formats and complete syntax, see the Creating Reports With WebFOCUS Language manual.
Caution: Keep in mind that a valid format for browser display in a helper application requires a supported MIME type.
The following are examples of displaying a report in an Excel spreadsheet and offering a choice of display formats.
Displaying a Report in an Excel 2000 Spreadsheet
The following is an example of displaying a report in an Excel 2000 spreadsheet.
TABLE FILE GGORDER SUM QUANTITY BY PCD WHERE PCD IS 'B141' OR 'B142' OR 'F101' OR 'F102' ON TABLE PCHOLD FORMAT EXL2K END
Offering a Choice of Display Formats
The following is an example of offering a choice of display formats.
TABLE FILE CENTQA ON TABLE SET PAGE-NUM OFF SUM CNT.PROBNUM AS 'Total Number,of Problems' SUM CNT.PROBNUM AS 'Problem by,Product' BY PLANT NOPRINT BY PRODNAME WHERE PLANT EQ '&PLANT' HEADING CENTER "QA Report for &PLANT" ON TABLE PCHOLD FORMAT &FMT END
<HTML>
<HEAD>
<TITLE>Multiple Display Formats</TITLE>
</HEAD>
<BODY BGCOLOR="#E3E3E3">
<FONT FACE="Arial">
<CENTER>
<FONT SIZE="+1">Welcome to the QA Database</FONT>
<HR WIDTH="45%" NOSHADE>
</CENTER>
<FORM ACTION="/ibi_apps/WFServlet" METHOD="get">
<INPUT NAME="IBIF_ex" VALUE="qastatus" TYPE="hidden">
<P>
Select a plant to generate a report on product problems:
</P>
<SELECT NAME="PLANT">
<OPTION>BOS
<OPTION>DAL
<OPTION>LA
<OPTION>ORL
<OPTION>SEA
<OPTION>STL
</SELECT>
<P>
<HR>
a. <TABLE CELLPADDING="2">
<TR>
<TD CLASS="LABEL">Select a display format:</TD>
<TD><INPUT TYPE="RADIO" NAME="FMT" VALUE="HTML" CHECKED>HTML</TD>
<TD><INPUT TYPE="RADIO" NAME="FMT" VALUE="PDF">PDF</TD>
<TD><INPUT TYPE="RADIO" NAME="FMT" VALUE="EXL2K">Excel 2000</TD>
</TR>
</TABLE>
<P>
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Submit">
<INPUT TYPE="RESET" NAME="RESET" VALUE="Reset">
</FORM>
</BODY>
</HTML>
WebFOCUS returns the data to the browser in PDF. The browser calls the helper application, Adobe Acrobat Reader, and displays the report:
WebFOCUS | |
Feedback |