{"id":130,"date":"2023-11-09T16:45:45","date_gmt":"2023-11-09T08:45:45","guid":{"rendered":"https:\/\/live-d365fo.pantheonsite.io\/?p=130"},"modified":"2024-07-19T17:47:13","modified_gmt":"2024-07-19T09:47:13","slug":"how-to-extend-standard-ssrs-report","status":"publish","type":"post","link":"https:\/\/dev-d365fo.pantheonsite.io\/how-to-extend-standard-ssrs-report\/","title":{"rendered":"\u5982\u4f55\u4fee\u6539\u7cfb\u7edf\u6807\u51c6\u7684SSRS\u62a5\u8868\uff08how-to-extend-standard-ssrs-report\uff09"},"content":{"rendered":"\n

CustAccountStatementExt<\/h1>\n\n\n\n

\u6f14\u793a\u5982\u4f55\u5411 Customer account statement report \u6dfb\u52a0\u65b0\u5b57\u6bb5<\/p>\n\n\n\n

1.\u6dfb\u52a0\u65b0\u5b57\u6bb5<\/h2>\n\n\n\n

\u4e3b\u4e34\u65f6\u8868\u662f CustAccountStatementExtTmp\uff0c\u53f3\u952e\u5355\u51fb\u5e76\u521b\u5efa\u6269\u5c55\uff1b\u6211\u5c06\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u5b57\u6bb5 MaxTxT\u3002<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

<\/p>\n\n\n\n

2. \u590d\u5236\u8fd9\u4e2a\u62a5\u8868<\/h2>\n\n\n\n

\u91cd\u547d\u540d\u4e3a\uff1aCustAccountStatementExt<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

<\/p>\n\n\n\n

3.\u4fee\u6539\u62a5\u544a\u8bbe\u8ba1<\/h2>\n\n\n\n

\u53f3\u952e\u5355\u51fb\u62a5\u8868\u6570\u636e\u96c6\u5e76\u9009\u62e9\u6062\u590d\u4ee5\u5237\u65b0\u65b0\u5b57\u6bb5\uff0c\u6253\u5f00\u62a5\u8868\u8bbe\u8ba1\u5668\u5e76\u5c06\u8be5\u5b57\u6bb5\u6dfb\u52a0\u5230\u8868\u4e2d<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

<\/p>\n\n\n\n

4. \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6269\u5c55\u7c7b\u6765\u6269\u5c55\u6807\u51c6\u62a5\u8868Controller class<\/h2>\n\n\n\n
\nclass CustAccountStatementExtControllerExtextends CustAccountStatementExtController\n{\n    \/\/Add construct\n    public static CustAccountStatementExtControllerExtconstruct()\n    {\n        return new CustAccountStatementExtControllerExt();\n    }\n\n    public static void main(Args _args)\n    {\n        SrsPrintMgmtFormLetterController controller = new CustAccountStatementExtControllerExt();\n        controller.parmReportName(PrintMgmtDocType::construct(PrintMgmtDocumentType::CustAccountStatement).getDefaultReportFormat());\n        controller.parmArgs(_args);\n        CustAccountStatementExtControllerExt::startControllerOperation(controller, _args);\n    }\n    \u00a0\n    protected static void startControllerOperation(SrsPrintMgmtFormLetterController _controller, Args _args)\n    {\n        _controller.startOperation();\n    }\n}\n<\/pre>\n\n\n\n

\u53ef\u9009\u65b9\u6cd5\uff0c\u786e\u5b9a\u62a5\u8868\u7684\u9ed8\u8ba4\u8bbe\u8ba1\uff0c\u6709\u4e9b\u62a5\u8868\u4e0d\u4f7f\u7528<\/p>\n\n\n\n

\nprotected void outputReport()\n{\n    SRSCatalogItemName  reportDesign;\n    reportDesign = ssrsReportStr(CustAccountStatementExt,Report);\n    this.parmReportName(reportDesign);\n    this.parmReportContract().parmReportName(reportDesign);\n    formletterReport.parmReportRun().settingDetail().parmReportFormatName(reportDesign);\n    super();\n}\n\n<\/pre>\n\n\n\n

5. \u521b\u5efa\u65b0\u7684report handler class<\/h2>\n\n\n\n

\u6211\u4eec\u6709\u4e24\u79cd\u4e0d\u540c\u7684\u65b9\u6cd5\u6765\u586b\u5145\u62a5\u8868\u5904\u7406\u7a0b\u5e8f\u7c7b\u4e2d\u7684\u6570\u636e\uff1a<\/p>\n\n\n\n