Setting Attributes with HTML Procedures

Use the SQR HTML procedures html_set_head_tags and html_set_body_attributes to define a title and background image for a report. To use these procedures, the SQR program must include the html.inc file. You must also run the program by using the -PRINTER:HT command-line flag.

These procedures must be called at the start of the program. For example:

do html_set_head_tags('<TITLE>Monthly Report</TITLE>')
do html_set_body_attributes('BACKGROUND="/images/mylogo.gif"')

The first line of this code example displays the Monthly Report title. Specifically, the entire '<TITLE>Monthly Report</TITLE>' sequence is passed as an argument to the html_set_head_tags procedure. The argument is enclosed in single quotes.

The second line displays the mylogo.gif background image for the web page. Again, an argument is passed to the procedure. The entire argument is enclosed in single quotes, and the file name and path are enclosed in double quotes.

Together, these two lines of code generate the following HTML output:

<HTML><HEAD><TITLE>Monthly Report</TITLE></HEAD>
<BODY BACKGROUND="/images/mylogo.gif">