This clause sends the SELECT command output into HTML format.
The rows and columns that each clause selects produce an intermediate result table that exists only in temporary memory. One after another, the clauses restrict the rows or columns included in the intermediate result table. After R:BASE has processed all the clauses and any UNION operators, the intermediate result table becomes the final result table.
Options
=backcolor
Specifies the background color for the data in the column.
colname
Specifies a column name. The column name is limited to 128 characters.
=forecolor
Specifies the text color for the data in the column. If you only specify one color, it is used as the background color.
=h =w
Specifies height and width parameters. To assign the same justification for both data and the header, the keywords LEFT, RIGHT, and CENTER can be used. For width, the range is from 0-255 pixels. 0 is no width specification. The height is the addition of the following values, one value from each item:
data justification: |
0=default, 1=left, 2=center, 3=right |
heading justification: |
0=default, 4=left, 8=center, 12=right |
vertical alignment: |
0=default, 16=top, 32=middle, 48=bottom |
HTML format flag: |
0=no, 64=yes |
HTML
Converts the data to HTML code.
=NOSCROLL
Specifies a NOWRAP tag is added to prevent word-wrapping in the table cell.
'title'
Specifies the text that appears in the caption at the top of the Web Browser window. Adding 'title' creates the beginning and ending table tag as well as putting the text you enter in the caption. Without 'title', a partial HTML file with the selected data in table row format is generated.
About the SELECT...HTML Command
The SELECT...HTML command is a modification of the SELECT command to output data in HTML format. If a title is specified, a full HTML file will be generated. Otherwise, a partial HTML file with the selected data in table row format will be generated.
Available Colors:
•Black
•Blue
•Green
•Cyan
•Red
•Magenta
•Brown
•Gray
•Light Black
•Light Blue
•Light Green
•Light Cyan
•Light Red
•Light Magenta
•Yellow
•White
Examples:
Example 01:
--Selects "Print Option" data into HTML output with the beginning and ending table tag
OUTPUT PrintOptions.htm
SELECT Option=150=CENTER=BLACK=BROWN, DisplayName=200=CENTER=BLACK=BROWN FROM PrintOptions HTML 'Print Options'
OUTPUT SCREEN
Example 02:
--Selects "Customer" data into HTML output using alias names and with just row data. The CustID column is left justified, while the Company column lists the heading as center justified and the data left justified.
OUTPUT Customers.htm
WRITE '<HTML>'
WRITE '<TITLE>Customers</TITLE>'
WRITE '<TABLE BORDER=1>'
SELECT CustID=CENTER=100=BLACK=GRAY AS `Customer ID`,Company=9=0=BLACK=GRAY AS `Company Name` FROM Customer HTML
WRITE '</TABLE>'
WRITE '</HTML>'
OUTPUT SCREEN