GenerateHTMLString 

Syntax:             BSTR  GenerateHTMLString( BOOL bIsMailResult,

           BOOL bDescription,

           BOOL bSQL,

           BOOL bLogo,

           LPCTSTR lpszHrefSite,

           LPCTSTR lpszHrefText,

           LPCTSTR lpszText);

Return Value:    BSTR string object, which represents the query result as HTML, formatted text.

Parameters:

                        bIsMailResult    If TRUE an extra Empty line is appended at the start and end of ELS-QB component generated output, so that the user may enter e-mail message before and after it.

                        bDescription      If TRUE a section with the “Description”  header will be included into ELS-QB component generated output.                        

bSQL              If TRUE a section with the “SQL Command” header will be included into ELS-QB component generated output below which the SQL command text must be included.

bLogo              If TRUE ELS-QB component generated output will include ELS – LOGO as a footnote.

                        lpszHrefSite    Pointer to a string representing URL address of hyperlink reference included in the ELS – LOGO.

                        lpszHrefText    Pointer to a string representing the text of hyperlink reference included in the ELS – LOGO.

                        lpszText          Pointer to a string representing additional text information to be included in ELS – LOGO.

Remarks:

                        Call this method to obtain the contents of Result tab grid of  ELS-QB component in HTML format.

Example:

This sample code shows how to generate the result of query as HTML stringwithin  ELS-QB control.

void COffice_QBView::OnCommandOutputresultashtml()

{

// A string containing some URL address the end user

// would like to create a link to from generated HTML

// output, e.g.     

CString strURL = _T(“www.microsoft.com”);

// A string containing the text of hyperlink

// reference, e.g.

CString strURLText = _T(“www.microsoft.com”);

// A string of Additional information to be included

// in the generated output, may be some Copywrite

// informtion, e.g.

CString strText = _T(“Copyright © 2001 Microsoft, Inc.”);

CString strHTMLText;

strHTMLText = m_QBCtrl.GenerateHTMLString(FALSE,TRUE,TRUE,TRUE,                                                      strURL,strURLText,strText);

  if (strText.IsEmpty())

        return;

// Do something with generated HTML string

...................

...................

 }