如何通过Print management 打印SSRS报表(how-to-print-ssrs-report-using-print-management)

报表打印管理Print management 添加一个新的Report format 如下图为Customer invoice添加两个新的Report format 图中的两个Report format可以通过添加一下代码可以实现 [ExtensionOf(classStr(PrintMgmtReportFormatPopulator))] public final class PrintMgmtReportFormatPopulator_Demo_Extension { #PrintMgmtSetup   protected void addDocuments() { // Add new customized reports this.addOther(PrintMgmtDocumentType::SalesOrderInvoice, ssrsReportStr(DocSalesInvoice, Report), ssrsReportStr(DocSalesInvoice, Report), #NoCountryRegionId); this.addOther(PrintMgmtDocumentType::SalesOrderInvoice, ssrsReportStr(DocSalesInvoiceExt, Report), ssrsReportStr(DocSalesInvoiceExt, Report), #NoCountryRegionId); // Add the standard report design, because of PrintMgmtDocType.getDefaultReportFormatDelegate() this.addOther(PrintMgmtDocumentType::SalesOrderInvoice, ssrsReportStr(SalesInvoice, Report), ssrsReportStr(Sal next addDocuments(); } } …

Continue reading ‘如何通过Print management 打印SSRS报表(how-to-print-ssrs-report-using-print-management)’ »

如何在D365FO创建SSRS报表(二)Controller Class(how-to-create-ssrs-report-in-d365fo-part2-controller-class)

Report controller 继承SrsReportRunController 如果没有特殊要求,以下代码就可以搞定。 public class Demo_InventJournalTransTransferController extends SrsReportRunController {   public static void main(Args _args) { Demo_InventJournalTransTransferController controller = new Demo_InventJournalTransTransferController();   controller.parmReportName(ssrsReportStr(Demo_InventJournalTransTransfer, Report)); controller.parmDialogCaption("@Demo954"); controller.parmArgs(_args); controller.startOperation(); } } 多选 如果需要打印用户所选的数据,多选需要用到 MultiSelectionHelper public class Demo_InventJournalTransTransferController extends SrsReportRunController { ……   public void preRunModifyContract() { Demo_InventJournalTransTransferContract contract = this.parmReportContract().parmRdpContract() as Demo_InventJournalTransTransferContract; }   public void …

Continue reading ‘如何在D365FO创建SSRS报表(二)Controller Class(how-to-create-ssrs-report-in-d365fo-part2-controller-class)’ »

如何在SSRS报表中创建条码、 二维码(how-to-create-barcode-qrcode-in-ssrs-report)

Barcode和QR code在SSRS报表中很常见,下面分别介绍如何添加他们。 二维码QRcode 在SSRS的临时表中创建一个字段存储二维码,类型扩展 Bitmap 在相关类中添加如下代码,举例说明: xyzTableBuffer.QRCode =QRHelper::QRCode(“123456789”) public static container QRCode(Str _QRContents) { // QRContents is a formatted string provided as input to this function. // For example _QRContents= ?name=’Customer name’&rr=’RFCno’&tt=’totalInvoiceAmount’;   System.Drawing.Bitmap bm = null; try { var qrCodeEncoder = new Encoder(); bm = qrCodeEncoder.Encode(_QRContents); } catch (Exception::CLRError) { error(CLRInterop::getLastException().ToString()); } using (var stream …

Continue reading ‘如何在SSRS报表中创建条码、 二维码(how-to-create-barcode-qrcode-in-ssrs-report)’ »

如何在D365FO创建SSRS报表(一)Report Data Provider Class(how-to-create-ssrs-report-in-d365fo-part1-report-data-provider-class)

Report data provider class 继承SrsReportDataProviderPreProcessTempDB 声明所用到的Contract 和 Query还有其他变量 [ SRSReportParameterAttribute(classStr(Demo_InventJournalTransTransferContract)), SRSReportQueryAttribute(queryStr(Demo_InventJournalTransTransferQuery)) ] class Demo_InventJournalTransTransferDP extends SrsReportDataProviderPreProcessTempDB { } SRSReportDataSetAttribute 定义临时表保存报表的Header,Footer 等数据 [ SRSReportDataSetAttribute(’Demo_InventJournalTransTransferHeaderTMP’) ] public Demo_InventJournalTransTransferHeaderTMP getHeader() { select * from header; return header; }   [ SRSReportDataSetAttribute(’Demo_InventJournalTransTransferFooterTMP’) ] public Demo_InventJournalTransTransferFooterTMP getFooter() { select * from footer; return footer; } Process report 处理报表的数据 public void …

Continue reading ‘如何在D365FO创建SSRS报表(一)Report Data Provider Class(how-to-create-ssrs-report-in-d365fo-part1-report-data-provider-class)’ »