INTERNET APPLICATION DEVELOPMENT
MID MARKET ERP DEVELOPMENT
By Jacky Xu
Last week, we had a project to print a Crystal Report in Sage 300 ERP that must also work with PrintBoss. But, when the program directly prints to PrintBoss, it does not work. Crystal Report 2011 does not have an SDK document for VB6. I add a simple .net class library with COM interface and VB6 project can use this library to print to PrintBoss.
Below are some source codes:
1. COM interface
2. Add a Crystal library reference in the project
3. Function “IniReport” – load the report based on report file path.
4. Function “SetParameterValue” – sets the parameter value in the report.
5. Function “SetReportLogonInformation” – logon database.
6. Function “PrintToPrinter” – print to printer with printer name.
And that fixed the issue.