on 2024 Oct 19 3:28 PM - last edited Tuesday
Hello,
I am trying to print the SAP B1 Marketing documents on the printer that is assigned in the Report and Layout Manager but it is always sent to the default printer set in Windows using the SAP B1 SDK.
The code is as below:
// Connect to the printing services
CompanyService oCompanyService;
ReportLayoutsService oReportLayoutService;
ReportLayoutPrintParams oPrintParam;
oCompanyService = oCompany.GetCompanyService();
oReportLayoutService = oCompanyService.GetBusinessService(ServiceTypes.ReportLayoutsService);
// Setup the Report
ReportParams oReportParams = oReportLayoutService.GetDataInterface(ReportLayoutsServiceDataInterfaces.rlsdiReportParams);
oReportParams.ReportCode = "INV2";
// Get the default report layout
oPrintParam = oReportLayoutService.GetDataInterface(ReportLayoutsServiceDataInterfaces.rlsdiReportLayoutPrintParams);
oPrintParam.LayoutCode = oReportLayoutService.GetDefaultReport(oReportParams).LayoutCode;
oPrintParam.DocEntry = sapDocument.DocEntry;
oReportLayoutService.Print(oPrintParam);
Could you please let us know how we can print on the assigned printer.
Any help on this will be appreciated. Thank you.
SAP Business One, version for SAP HANA SAP Business One Extensibility
Request clarification before answering.
User | Count |
---|---|
19 | |
11 | |
10 | |
9 | |
7 | |
7 | |
6 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.