Guys
Continuum is the COM interface to Great Plains. It allows other applications and development tools to communicate with Great Plains. This is what the Integration Manager standard adaptors use to drive the user interface of Great Plains.
To use this code you must have VBA or at least the customisation site license registered.
Here is an example of the code (including getting the Named Printer for Custom Reports).
'Dim CompilerApp As New Dynamics.Application
Dim CompilerApp As Object
Dim CompilerMessage As String
Dim CompilerError As Integer
Dim Commands As String
' Create link without having reference marked
Set CompilerApp = CreateObject("Dynamics.Application")
Commands = ""
' Get Named Printers settings
Commands = Commands & "local 'Printer Settings' NamedPrinter; " & vbCrLf
Commands = Commands & "NamedPrinter = ST_Set_To_Default_Printer(8, ST_SY_CUSTOM); " & vbCrLf
' Run the report with optional restriction, index and legends
Commands = Commands & "run report with name ""Custom Report Name Here"" " & vbCrLf
'Commands = Commands & " with restriction 'Field Name' of table Table_Name > 0 " & vbCrLf
'Commands = Commands & " by number 1" & vbCrLf
'Commands = Commands & " legends ""Test Legend"" " & vbCrLf
' Swap comments on line below to send report direct to printer instead of screen
Commands = Commands & " destination true, false " & vbCrLf
'Commands = Commands & " destination false, true " & vbCrLf
Commands = Commands & " printer NamedPrinter " & vbCrLf
Commands = Commands & " in dictionary 0; " & vbCrLf
'MsgBox Commands
' Execute SanScript
CompilerError = CompilerApp.ExecuteSanscript(Commands, CompilerMessage)
If CompilerError <> 0 Then
MsgBox CompilerMessage
End If
Please note that this code uses the Continuum library which is not supported for use with VBA by MBS Support.
I can actually send you a package of this if you want it. Please email me. My alias is dmusgrav at microsoft.com.
David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific
Microsoft Business Solutions
Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.