Impromptu Administration Guide  7.5.0
Properties >

PublishHTML Property

Syntax

ReportDocument.PublishHTML

Applies To

ReportDocument Object

Description

Returns an object that is an HTML representation of a Report Document object.

Discussion

Use PublishHTML with the Publish method create an HTML version of a Report Document object. PublishHTML returns an object which Publish then outputs to a series of files in a directory. The report can be viewed using a browser.

Type

Object

Access

Read

Example

This example opens the Annual Product Sales report and publishes it as HTML. The Publish method places the HTML files into the folder called tmp and all the files have the prefix myfiles.

Sub Main()
  Dim objImpApp as Object
  Dim objHTML as Object
  Dim objImpRep as Object
  Set objImpApp = CreateObject("CognosImpromptu.Application")
  objImpApp.OpenCatalog "c:\Program Files\Cognos\<rendition_id>\"
& _
  "samples\Impromptu\Reports\Great Outdoors Sales Data.cat"
_
  ,"Creator"
  Set objImpRep = objImpApp.OpenReport("c:\Program Files\"
& _
  "Cognos\<rendition_id>\samples\Impromptu\Reports\"
& _
   "Annual Product Sales.imr")
  Set objHTML = objImpRep.PublishHTML
  objHTML.Publish "c:\tmp","myfiles"
  Set objImpRep = Nothing
  Set objHTML = Nothing
  Set objImpApp = Nothing
End Sub