PC-Dmis 2010 MR3 Object Library | Send comments on this topic. | See Object Hierarchy Chart
LoadCustomReport Method
See Also

Collapse All Expand All

NameOrNumber
  This required Variant value specifies the custom report to load into the Report window. This can be either the custom report name or the index number.

# Description

Loads the specified custom report into the report window This method loads the specified custom report into the Report window.

# Syntax

Visual Basic

    Public Function LoadCustomReport( _
       ByVal NameOrNumber As Variant _
    ) As Long

# Parameters

NameOrNumber
  This required Variant value specifies the custom report to load into the Report window. This can be either the custom report name or the index number.

# Return Type

Long value. This returns -1 (or True) if the function succeeds and 0 (or False) if it does not.

# Remarks

If you use an index value, a 0 in NameOrNumber represents the first custom report.

# Example

Sub Main

Dim App As Object

Dim PartProg As Object

Dim RepWin As Object

Set App = CreateObject("Pcdlrn.Application")

Set PartProg = App.ActivePartProgram

Set RepWin = PartProg.ReportWindow

intResponse = InputBox("Type an index value to load the associated custom report for this part program. PC-DMIS will return its name.")

MsgBox "PC-DMIS attempting to load the report index: " & intResponse & " (" & RepWin.GetCustomReportName(intResponse) & ")"

Dim lngRetVal As Long

' Loads the custom report based on the entered number

lngRetVal = RepWin.LoadCustomReport(intResponse)

RepWin.RefreshReport

End Sub

# See Also

ReportWindow Object

© Wilcox Associates, Inc. All Rights Reserved.

© 2010 All Rights Reserved.