在此示例中,您可以看到如何通过更改查看器选项来自定义 表查看器。
在此示例中,您可以看到如何通过更改查看器选项来自定义 表查看器。
首先,您需要创建StiViewerOptions类对象。此类包含一组属性,这些属性配置查看器的外观和行为。例如,将某些属性更改为默认值以外的其他值:
// Change report viewer optionsvar 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 instancevar report = new Stimulsoft.Report.StiReport();// Load report from urlreport.loadFile("../reports/SimpleList.mrt");// Assign report to the viewer, the report will be built automatically after rendering the viewerviewer.report = report;
在下面的屏幕截图中,您可以看到示例代码的结果。

下载示例代码
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!