【Stimulsoft Reports.Net教程】带滚动条的Web查看器

此示例项目演示了如何在ASPX页面上添加带滚动条的HTML5 Web查看器。

下载Stimulsoft Reports.Net最新版本

默认情况下,查看器将其自身大小调整为 表的大小。如果要显示具有指定宽度和高度的查看器,则可能存在查看 表的整个页面或页面的问题。为此,它是一种带滚动条的特殊模式。

要添加带有滚动条的Web查看器,只需设置查看器组件的宽度和高度,并将特殊的ScrollbarsMode属性设置为True即可。

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Web_Viewer_with_Scroll_Bars.Default" %><%@ Register assembly="Stimulsoft.Report.Web" namespace="Stimulsoft.Report.Web" tagprefix="cc1" %><!DOCTYPE html><html><head runat="server">    <title>Web Viewer with Scroll Bars</title></head><body>    <form id="form1" runat="server">        <cc1:StiWebViewer ID="StiWebViewer1" runat="server"            Width="800px" Height="500px" ScrollbarsMode="true"            OnGetReport="StiWebViewer1_GetReport" />    </form></body></html>

要显示 表,您应添加OnGetReport事件,您需要在该事件中加载 表,并在需要时注册数据。

protected void StiWebViewer1_GetReport(object sender, Stimulsoft.Report.Web.StiReportDataEventArgs e){    string reportPath = Server.MapPath("Reports/SimpleList.mrt");    StiReport report = new StiReport();    report.Load(reportPath);    string dataPath = Server.MapPath("Data/Demo.xml");    DataSet data = new DataSet();    data.ReadXml(dataPath);    report.RegData(data);    e.Report = report;}

示例代码的结果如下图所示:

Stimulsoft

下载示例

购买Stimulsoft正版授权,请点击“咨询在线客服”哟!

标签: 表解决方案 表 表控件 表设计stimulsoft report .netStimulsoft

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

上一篇 2018年10月3日
下一篇 2018年10月3日

相关推荐

发表回复

登录后才能评论