Troy,

        I think you just blew away my paradigm (Is that a synonym for
socks?).  Your
html presentation is way cool and (from the looks of it) way easy.  I
think I need to
learn more of this.

        There are a couple of syntax items to change.  But the output
works anyway
showing how forgiving the process is.

Change widht to width
write '[th bgcolor=green  widht=300>Table Name[/th>'

Put a close quote after >  as in write'[/tr>'
write '[/tr>

The final line needs to say:
OUTPUT SCREEN

Launch t.htm works like a charm, or like a champ, or like R:Base ...

I modified your initial recommendation to:
OUTPUT t1.htm;SELECT * FROM sys_Tables HTML 'system tables';OUTPUT
SCREEN

Launch t1.htm is the perfect way to browse (pun) that table.
Even the quick report is not that quick. 

        Having fun.
                
        Randy Peterson

PS.  I suppose you can put the statements you have next to the 'write' 
commands in page or report header and footer sections in a report.  
Put the select statement data between the html text code on the detail
line, and voila?

Troy Sosamon wrote:

> ok,
>
> Bernie got me going on this, and made me try some new stuff.  Some of the
> code I posted earlier was not quite right, but this code will work in any
> version of r:base and demonstrates how to easily build an HTML file with
> lots of stuff.  While the HTML flag on select is convient, don't let it
> limit what you can do.  You need to replace [ with <.  This code has
> actually been tested.
>
> out t.htm
> write '[html>'
> write '[body>'
> write '[H1>This is my test HTML report[/h1>'
> write '[h3>Generated on', .#date, .#time, '[/h3>'
> write 'This builds file t.thm [br>'
> write '[br>'
> write '[table border=2 bgcolor=silver>'
> write '[tr>'
> write '[th bgcolor=yellow width=100>Table ID[/th>'

> write '[th bgcolor=green  widht=300>Table Name[/th>'

write '[th bgcolor=green  width=300>Table Name[/th>'

> write '[/tr>

write'[/tr>'

> set headings off; set lines 0
> select '[tr>[td>', sys_table_id,  +
>        '[/td>[td>', sys_table_name,   +
>        '[/td>[/tr>' +
>        from sys_tables where limit = 10
>
> write '[/table>'
> write '[br>'
> write 'This is the end of my report.  Finished at', .#date, .#time, '[br>'
> write '[/body>'
> write '[/html>'

OUTPUT SCREEN

> Have fun,
>
> Troy

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to