Positioning Objects
When HTML procedures are activated:
-
HTML output is generated without the <PRE> and </PRE> tags.
-
All position qualifiers in the SQR program are ignored, and program output and HTML tags are placed in the output file in the order in which they are generated, regardless of their position qualifiers.
-
The text that is printed in a BEGIN-HEADING section does not appear at the top of a page.
Because no positioning is done, text in the heading appears at the bottom.
-
White space, such as spaces between PRINT commands, is removed.
Thus, you must use the HTML procedures to format the report.
The following code example does not use the HTML procedures to format the output:
print 'Report summary:' (1,1)
print 'Amount billed:' (3,1)
print #amount_amount (3,20)
print 'Total billed:' (4,1)
print #total_amount (4,20)In this case, all of the text appears on the same line and with no spaces between the data.
With the HTML procedures for line breaks and a table, you can format the output properly.
The following code example uses the html_br procedure to separate the first two lines of text. The html_table, html_tr, html_td, and html_table_end procedures display the totals in a tabular format. An empty string is passed to each procedure as it is called. This empty string is required if no other argument is passed.
print 'Report summary:' (1,1)
do html_br(2,'')
do html_table('')
do html_tr('')
do html_td('WIDTH=300')
print 'Amount billed:' (3,1)
do html_td('')
print #amount_amount (3,20)
do html_tr('')
do html_td('WIDTH=300')
print 'Total billed:' (4,1)
do html_td('')
print #total_amount (4,20)
do html_table_end