{"id":69,"date":"2023-11-03T17:30:53","date_gmt":"2023-11-03T09:30:53","guid":{"rendered":"http:\/\/d365dev.local\/?p=69"},"modified":"2023-11-30T09:33:03","modified_gmt":"2023-11-30T01:33:03","slug":"how-to-create-barcode-qrcode-in-ssrs-report","status":"publish","type":"post","link":"https:\/\/live-d365fo.pantheonsite.io\/how-to-create-barcode-qrcode-in-ssrs-report\/","title":{"rendered":"\u5982\u4f55\u5728SSRS\u62a5\u8868\u4e2d\u521b\u5efa\u6761\u7801\u3001 \u4e8c\u7ef4\u7801(how-to-create-barcode-qrcode-in-ssrs-report)"},"content":{"rendered":"\n

Barcode\u548cQR code\u5728SSRS\u62a5\u8868\u4e2d\u5f88\u5e38\u89c1\uff0c\u4e0b\u9762\u5206\u522b\u4ecb\u7ecd\u5982\u4f55\u6dfb\u52a0\u4ed6\u4eec\u3002<\/p>\n\n\n\n

\u4e8c\u7ef4\u7801QRcode<\/h1>\n\n\n\n

\u5728SSRS\u7684\u4e34\u65f6\u8868\u4e2d\u521b\u5efa\u4e00\u4e2a\u5b57\u6bb5\u5b58\u50a8\u4e8c\u7ef4\u7801\uff0c\u7c7b\u578b\u6269\u5c55 Bitmap<\/p>\n\n\n\n

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

<\/p>\n\n\n\n\u5728\u76f8\u5173\u7c7b\u4e2d\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801\uff0c\u4e3e\u4f8b\u8bf4\u660e:\u00a0xyzTableBuffer.QRCode =QRHelper::QRCode(“123456789”)\n

\npublic static container QRCode(Str _QRContents)\n{\n\/\/ QRContents is a formatted string provided as input to this function.\n\/\/ For example _QRContents= ?name='Customer name'&rr='RFCno'&tt='totalInvoiceAmount';\n\n    System.Drawing.Bitmap bm = null;\n    try\n    {\n        var qrCodeEncoder = new Encoder();\n        bm = qrCodeEncoder.Encode(_QRContents);\n    }\n    catch (Exception::CLRError)\n    {\n        error(CLRInterop::getLastException().ToString());\n    }\n    using (var stream = new System.IO.MemoryStream())\n    {\n        bm.Save(stream, System.Drawing.Imaging.ImageFormat::Bmp);\n        bm.Dispose();\n        return Binary::constructFromMemoryStream(stream).getContainer();\n    }\n}\n<\/pre>\n\n\n\n

\u5728\u62a5\u8868\u8bbe\u8ba1\u4e2d\u6dfb\u52a0\u56fe\u7247\uff0c\u53c2\u6570\u5982\u4e0b\uff1a<\/p>\n\n\n\n

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

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

\u6761\u7801Barcode<\/h1>\n\n\n\n

\u5728SSRS\u7684\u4e34\u65f6\u8868\u4e2d\u521b\u5efa\u4e00\u4e2a\u5b57\u6bb5\u5b58\u50a8\u4e8c\u7ef4\u7801\uff0c\u7c7b\u578b\u6269\u5c55  BarCodeString
\u4e3e\u4f8b\u8bf4\u660e: xyzTableBuffer.BarCodeField= this.getBarcode(“123456789”)
\u5728\u62a5\u8868\u8bbe\u8ba1\u4e2d\u4f7f\u7528\u5b57\u4f53 >BC C128 Narrow<\/p>\n\n\n\n

\npublic str getBarcode(str _barCodeText)\n{\n    BarcodeCode128 barcode;\n    barcode = Barcode::construct(BarcodeType::Code128);\n    barcode.string(true, _barCodeText);\n    barcode.encode();\n\n    return barcode.barcodeStr();\n}\n<\/pre>\n\n\n\n

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

<\/p>\n","protected":false},"excerpt":{"rendered":"

Barcode\u548cQR code\u5728SSRS\u62a5\u8868\u4e2d\u5f88\u5e38\u89c1\uff0c\u4e0b\u9762\u5206\u522b\u4ecb\u7ecd\u5982\u4f55\u6dfb\u52a0\u4ed6\u4eec\u3002 \u4e8c\u7ef4\u7801QRcode \u5728SSRS\u7684\u4e34\u65f6\u8868\u4e2d\u521b\u5efa\u4e00\u4e2a\u5b57\u6bb5\u5b58\u50a8\u4e8c\u7ef4\u7801\uff0c\u7c7b\u578b\u6269\u5c55 Bitmap \u5728\u76f8\u5173\u7c7b\u4e2d\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801\uff0c\u4e3e\u4f8b\u8bf4\u660e:\u00a0xyzTableBuffer.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 = …<\/p>\n

Continue reading ‘\u5982\u4f55\u5728SSRS\u62a5\u8868\u4e2d\u521b\u5efa\u6761\u7801\u3001 \u4e8c\u7ef4\u7801(how-to-create-barcode-qrcode-in-ssrs-report)’ »<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[8,6,3,10],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts\/69"}],"collection":[{"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":60,"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":572,"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/posts\/69\/revisions\/572"}],"wp:attachment":[{"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/live-d365fo.pantheonsite.io\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}