Hi Dara,

Right, I haven't tried to do a large html report so my
method may be cumbersome, other MapBasic users will no
doubt read this and suggest a more refined way of
doing this--I hope this get's your feet pointing in
the right way.

Firstly: You need to create a *.DEF file, e.g:
'----DEF FILE FOR HTML
Define HTMLHello
"<html><body><p>Hello</p></body></html>"

This sets the word HTMLhello to <html..../html> which
in effect writes the word hello on the screen.

Then in your actual MB program...put this:
'-----This is the MB file
' It includes HTMLHello.DEF                             
Include "MapBasic.def"
Include "HTMLHello.def"

Declare Sub Main

Sub Main

Open File "H:\Html\Hello.html" For Output As #1
Print #1, HTMLHello 'prints the DEFINE htmlhello from
the DEF file
Close File #1
End Sub

This is VERY simple, but I'm sure you can extend this
argument to incorporate large reports. Please note
though, the use of the DEF file means you will spend a
lot of time coding html code into it...this will only
help you when your MB program has to use it. It will
keep it simple and neat (which is a bonus!)...Remember
as well, that creating tables means you'll have to
create html code that can absorb variables (you need
to define a table that will adapt to the
num_of_columns/num_of_rows you have...this will be
fairly challenging, but by setting up DEF correctly,
this won't be much of a hassle. I haven't put 2 much
effort into html reports (yet) because of other
"stuff"--I will no doubt get a crack at doing
something far more complex soon enough--when that
happens, I'll let you know...

Is this okay? Do u need more advanced examples? If so,
I am going on holiday now until the 1st week of
Jan...so I won't have a pc (yippee!!) to help out...

Good luck
Ben


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to