[ Home ] [ Features ] [ Products ] [ FAQ's ] [ Screens ] [ Support ] [ Downloads ] [ About ] [ Discussion ]


the software that grows with you

 

V32Tb2Html()

Converts a browser to a .htm file.

Syntax

V32Tb2Html( <oBrowse>, <cFileHtm>, [cTitle], [cColorBg], [cColorTab], [cColorText] )

Arguments

oBrowse A browser object created with TbrowseNew() or TBrowseDB() classes.. Vouch32 will consider the oColumn:block to retrieve the data. So any kind of browser can be sumitted to this function for convertion into a database file.  
cFileHtm A fully qualified file name with drive, path and extension to hold the resulting records.
cTitle Character string to specify table title. Default is null string means no title will be displayed over the html table.
cColorBg Hex notated color attribute string for the backgound. Default is '#FFFFC0'.
cColorTab Hex notated color attribute string for the table cells. Default is '#FFFF80'.
cColorText Hex notated color attribute string for the title and table text. Default is '#0000FF'.

Returns

Logical whether dhtml file has been created or not.

Description

A handy function to convert a browser data into a .htm file. Only the columns which are visible will be considered for inculsion. As this function does not take into account the underlying data structure, so every kind of browser becomes eleigible for HTML conversion

Column data is the result of eval( oColumn:block ), Only Charcter, Numeric, Date, and Logical data will be considered. Empty data will be converted to non-breaking spaces. Numeric will be aligned to the right and all others to the left. Dates will be converted to DtoC() and logicals as 'Yes' or 'No'.

For color attributes look for Vouch32.ch where around 110 colors are defined with tangible names.

Please note that the oBrowse:GoTop() will be issued at the completion of the process. So record pointer will not be at the place where it had been prior to issue the command. You can always press <ESC> to abort the process, but then the resulted databse will still retain the records upto the point <ESC> is pressed. 

Usage

lEnd := .f.

While !lEnd
      oBrowse:ForceStable()

       nKey = InKey( 0 )

       do case
       case nKey == K_ESC
            lEnd = .t.

       case nKey == K_ENTER
            lEnd := .t.

       case nKey == K_DOWN
            oBrowse:Down()

       case nKey == K_UP
             oBrowse:Up()

       case nKey == K_F10
              if V32Tb2Html( oBrowse,  cFileHtm  )
                  //   Take some action 
              endif

       endcase 
End

Tips

 

[ Home ][ Features ] [ Products ][ About Us ][ FAQ's ][ Screen Shots ][ Downloads ][ Support ][ Discussion ]
.

Vouch is a Trademark of Pritpal Bedi
All other Trade Marks are the property of their respective owners.
Copyright 1993-2011 Pritpal Bedi. All rights reserved.
Hit Counter  
You are Visitor # since 14 May 2002