【Stimulsoft Reports.Net教程】在ViewerFx中显示报表

此示例项目演示了如何在ASPX页面上添加Flash查看器并显示简单报表。

下载Stimulsoft Reports.Net最新版本

此示例项目演示了如何在ASPX页面上添加Flash查看器并显示简单报表。要添加Flash查看器,只需从Stimulsoft.Report.Web库中添加StiWebViewerFx组件即可。

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Show_Report_in_the_ViewerFx.Default" %><%@ Register assembly="Stimulsoft.Report.Web" namespace="Stimulsoft.Report.Web" tagprefix="cc1" %><!DOCTYPE html><html ><head runat="server">    <title>Show Report in the ViewerFx</title></head><body>    <form id="form1" runat="server">        <cc1:StiWebViewerFx ID="StiWebViewerFx1" runat="server"                Width="100%" Height="800px"                OnGetReport="StiWebViewerFx1_GetReport" />    </form></body></html>

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

protected void StiWebViewerFx1_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正版授权,请点击“咨询在线客服”哟!

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

来源:慧都网

声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2018年9月26日
下一篇 2018年9月26日

相关推荐

发表回复

登录后才能评论