ProvideHTML (IOlapAddIn Interface)

Analysis Services Programming

Analysis Services Programming

ProvideHTML (IOlapAddIn Interface)

The ProvideHTML method of the IOlapAddin interface provides the URL for the HTML pane in Analysis Manager when the user selects a new node in the tree pane.

Syntax

Sub ProvideHTML(CurrentNode As OlapTreeNode, CurrentURL As String)

CurrentNode

The OlapTreeNode that is currently selected

CurrentURL

The source URL

Remarks

The CurrentURL variable initially contains the URL for the HTML file that is currently displayed. If there is no need to display a different HTML file, the method can exit. Otherwise, set the CurrentURL parameter to the URL for Analysis Manager to display.

Example

The following example uses this method to display the contents of a URL if the parent node's caption is Sample Forms:

Private Sub IOlapAddIn_ProvideHTML(CurrentNode As DSSAddInsManager.OlapTreeNode, CurrentURL As String)
  On Error GoTo IOlapAddIn_ProvideHTML_Err
  
  'Check to see whether the provided node is owned by another add-in
  If CurrentNode.OwnerAddInName <> ThisAddInName Then
    'Work with node owned by another add-in
    Exit Sub
  End If
'This add-in owns the node
  
  'Assume that the files form1.htm and form2.htm exist
  If CurrentNode.Caption = "Sample Forms" Then
    CurrentURL = App.Path & "\form1.htm"
  Else
    CurrentURL = App.Path & "\form2.htm"
  End If
  
  Exit Sub
IOlapAddIn_ProvideHTML_Err:
  Debug.Print Err.Number, Err.Description, Err.Source
  Debug.Assert False
  MsgBox "ProvideHTML method failed."
  Err.Clear
  Exit Sub
End Sub

See Also

IOlapAddIn Interface