How to incorporate graphics and/or sound in an Easytrieve generated HTML report.
search cancel

How to incorporate graphics and/or sound in an Easytrieve generated HTML report.

book

Article ID: 56260

calendar_today

Updated On:

Products

Easytrieve Report Generator

Issue/Introduction

Easytrieve Plus release 6.3 introduced the ability to generate HTML reports through the Extended Reporting Facility. Many clients are now taking advantage of this feature by creating internet-ready reports. Some are now incorporating animated graphics and sound in their reports to make them interesting and unique.

Easytrieve Plus Extended Reporting Facility lets you output HTML reports that are ready for immediate use within a standard HTML web browser. Easytrieve programs only need minor modifications to become HTML-enabled. These changes include the addition of extended reporting font labels to print fields and minor adjustments to the FILE and REPORT statements. Before reviewing the following example, you should review Chapter 8 of the Easytrieve Plus Extended Reporting Facility Guide for general information on creating HTML reports using Easytrieve Plus.

To create Easytrieve Plus HTML output which incorporates a variety of media, such as graphics, animated graphics, and sound, you use standard HTML tags placed appropriately in the extended reporting printer definition. In the following example, we've incorporated sound (guitarw.wav), an animated letter C (C.GIF), and an animated letter A (A.GIF). Additionally, we've specified the length of the sound (LOOP="100"), the size of the letters, and have also included a bitmap containing the Computer Associates logo (CA_LOGO_.BMP). The height and width of each of the graphics is also identified. The overall location of the graphics and sequence in which the graphics appear is determined by the order in which they are specified within the FILE-HEADER. A background (BACK.JPG) for the report is also specified.

 

Environment

Easytrieve Plus Report Generator, release 6.3

Resolution

Sample HTML Report Definition


//jobcard
//*
//* THIS COMPILES THE EXTENDED PRINTER NAMED HTML INTO
//* 'high level qualifer.LOADLIB'
//*
//EZT1 EXEC PGM=EZTPX04,REGION=512K
//STEPLIB DD DISP=SHR,DSN='your.easytrieve.CAILIB'
//SYSPRINT DD SYSOUT=A
//SYSSNAP DD SYSOUT=A
//SYSOUT DD SYSOUT=A
//SYSLIN DD UNIT=SYSDA,SPACE=(4096,(100,100)),DISP=(,PASS),
// DSN=&&SYSLIN
//SYSIN DD *
PRINTER NAME ( HTML ) -
FCB ( N ) -
DEFAULT-FONT ( 1 ) -
DEVICE ( DISK DISK ) -
RECORD ( V 206 ) -
FILE-HEADER ( -
' <HTML><HEAD>-
<TITLE>TEST TITLE</TITLE>-
<BGSOUND SRC="GUITARW.WAV" LOOP="100">-
<IMG SRC="C.GIF" HEIGHT=76 WIDTH=70>-
<IMG SRC="A.GIF" HEIGHT=76 WIDTH=70>-
<IMG SRC="CA_LOGO_.BMP" HEIGHT=76 WIDTH=145>-
</HEAD><BODY BACKGROUND="BACK.JPG" TEXT=BLUE>-
<PRE>' ) -
FILE-TRAILER ( -
' </PRE></BODY></HTML>' )
* FONT 1 = ITEM = DEFAULT
FONT NUMBER ( 1 ) WIDTH ( 1 ) HEIGHT ( 1 )
* FONT 2 = <B>ITEM</B> = BOLD
FONT NUMBER ( 2 ) WIDTH ( 1 ) HEIGHT ( 1 ) -
FUNCTION-HEADER ( 4CC26E ) -
FUNCTION-TRAILER ( 4C61C26E )
* FONT 3 = <I>ITEM</I> = ITALICS
FONT NUMBER ( 3 ) WIDTH ( 1 ) HEIGHT ( 1 ) -
FUNCTION-HEADER ( 4CC96E ) -
FUNCTION-TRAILER ( 4C61C96E )
* FONT 4 = <U>ITEM</U> = UNDERLINE
FONT NUMBER ( 4 ) WIDTH ( 1 ) HEIGHT ( 1 ) -
FUNCTION-HEADER ( 4CE46E ) -
FUNCTION-TRAILER ( 4C61E46E )
* FONT 11 = <FONT SIZE=1>ITEM</FONT>
FONT NUMBER ( 11 ) WIDTH ( .50 ) HEIGHT ( .50 ) -
FUNCTION-HEADER ( 4CC6D6D5E340E2C9E9C57EF16E ) -
FUNCTION-TRAILER ( 4C61C6D6D5E36E )
* FONT 12 = <FONT SIZE=2>ITEM</FONT>
FONT NUMBER ( 12 ) WIDTH ( .75 ) HEIGHT ( .75 ) -
FUNCTION-HEADER ( 4CC6D6D5E340E2C9E9C57EF26E ) -
FUNCTION-TRAILER ( 4C61C6D6D5E36E )
* FONT 13 = <FONT SIZE=3>ITEM</FONT>
FONT NUMBER ( 13 ) WIDTH ( 1.00 ) HEIGHT ( 1.00 ) -
FUNCTION-HEADER ( 4CC6D6D5E340E2C9E9C57EF36E ) -
FUNCTION-TRAILER ( 4C61C6D6D5E36E )
* FONT 14 = <FONT SIZE=4>ITEM</FONT>
FONT NUMBER ( 14 ) WIDTH ( 1.25 ) HEIGHT ( 1.25 ) -
FUNCTION-HEADER ( 4CC6D6D5E340E2C9E9C57EF46E ) -
FUNCTION-TRAILER ( 4C61C6D6D5E36E )
* FONT 15 = <FONT SIZE=5>ITEM</FONT>
FONT NUMBER ( 15 ) WIDTH ( 1.50 ) HEIGHT ( 1.50 ) -
FUNCTION-HEADER ( 4CC6D6D5E340E2C9E9C57EF56E ) -
FUNCTION-TRAILER ( 4C61C6D6D5E36E )
* FONT 16 = <FONT SIZE=6>ITEM</FONT>
FONT NUMBER ( 16 ) WIDTH ( 2.00 ) HEIGHT ( 2.00 ) -
FUNCTION-HEADER ( 4CC6D6D5E340E2C9E9C57EF66E ) -
FUNCTION-TRAILER ( 4C61C6D6D5E36E )
* FONT 17 = <FONT SIZE=7>ITEM</FONT>
FONT NUMBER ( 17 ) WIDTH ( 3.00 ) HEIGHT ( 3.00 ) -
FUNCTION-HEADER ( 4CC6D6D5E340E2C9E9C57EF76E ) -
FUNCTION-TRAILER ( 4C61C6D6D5E36E )
/*
//LKED EXEC PGM=IEWL
//SYSPRINT DD SYSOUT=A
//SYSLIN DD DSN=&&SYSLIN,DISP=(OLD,DELETE)
// DD *
NAME EZTPXRPT(R)
//SYSLMOD DD DISP=SHR,DSN='high level qualifer.LOADLIB'
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,5))
/*
//

You also need a standard CA-Easytrieve Plus program, such as the following, to drive the printer definition. Note that the FILE statement includes a definition for the extended reporting and HTML output and the REPORT statement contains a definition for RPTOUT.

Sample CA-Easytrieve Plus Report


//jobcard
//*
//STEP1 EXEC PGM=EZTPA00
//STEPLIB DD DSN='high level qualifier.LOADLIB',DISP=SHR
// DD DISP=SHR,DSN='your.easytrieve.CAILIB'
//PERSNL DD DISP=SHR,DSN=your.persnl.file
//RPTOUT DD DSN=your.report.HTML2,DISP=SHR
//EZTVFM DD UNIT=SYSDA,SPACE=(CYL,(3,1))
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSLIN DD DISP=(,PASS),SPACE=(TRK,(5,1)),UNIT=SYSDA,
// DSN=&&SYSLIN
//SYSUDUMP DD SYSOUT=*
//SYSSNAP DD SYSOUT=*
//SYSIN DD *
**************************************************************
*
* SIMPLE EASYTRIEVE HTML REPORT EXAMPLE #1
*
***************************************************************
* DEFINE THE EXTENDED REPORTING PRINTER AND INPUT FILE:
***************************************************************
FILE RPTOUT EXTENDED HTML
FILE PERSNL F(150)
REGION 1 1 N
NAME-LAST 17 8 A
GROSS 94 4 P 2
**** DETAIL REPORT OF BRANCHES FROM EXAMPLE #1
JOB INPUT PERSNL
PRINT
*
**** DETAIL REPORT WITH CONTROL BREAKS SEQUENCED
*
REPORT MYREPORT PRINTER RPTOUT LINESIZE 300
SEQUENCE REGION
TITLE 'EASYTRIEVE HTML REPORT'
TITLE 2 '(THE PERSONNEL FILE)'
HEADING REGION ('BRANCH ')
HEADING NAME-LAST (#2 'NAME')
HEADING GROSS (#2 'PAY')
LINE REGION #2 NAME-LAST #4 GROSS