原創(chuàng)|使用教程|編輯:鄭恭琳|2019-10-31 16:28:53.340|閱讀 674 次
概述:在此示例中,您可以看到如何通過更改查看器選項(xiàng)來自定義報(bào)表查看器。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
立即點(diǎn)擊下載Stimulsoft Reports.JS最新版
在此示例中,您可以看到如何通過更改查看器選項(xiàng)來自定義報(bào)表查看器。
首先,您需要?jiǎng)?chuàng)建StiViewerOptions類對(duì)象。此類包含一組屬性,這些屬性配置查看器的外觀和行為。例如,將某些屬性更改為默認(rèn)值以外的其他值:
// Change report viewer options var options = new Stimulsoft.Viewer.StiViewerOptions(); options.appearance.scrollbarsMode = true; options.appearance.pageBorderColor = Stimulsoft.System.Drawing.Color.navy; options.toolbar.borderColor = Stimulsoft.System.Drawing.Color.navy; options.toolbar.showPrintButton = false; options.toolbar.showViewModeButton = false; options.toolbar.viewMode = Stimulsoft.Viewer.StiWebViewMode.WholeReport; options.toolbar.zoom = 50; options.width = "1000px"; options.height = "500px"; var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false); // Create a new report instance var report = new Stimulsoft.Report.StiReport(); // Load report from url report.loadFile("../reports/SimpleList.mrt"); // Assign report to the viewer, the report will be built automatically after rendering the viewer viewer.report = report;
在下面的屏幕截圖中,您可以看到示例代碼的結(jié)果。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn