LoadCustomReport Method
Description
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 measurement routine. 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