<%@ Page Title="Report.mrt - Viewer" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication._Default" %> <%@ Register assembly="Stimulsoft.Report.Web, Version=2024.4.4.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a" namespace="Stimulsoft.Report.Web" tagprefix="cc1" %> <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> <cc1:StiWebViewer ID="StiWebViewer1" runat="server" OnGetReport="StiWebViewer1_GetReport"> </cc1:StiWebViewer> </asp:Content>
using Stimulsoft.Report; using Stimulsoft.Report.Dictionary; using Stimulsoft.Report.Web; using System; using System.Data; using System.IO; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace WebApplication { public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { } protected void StiWebViewer1_GetReport(object sender, StiReportDataEventArgs e) { var report = StiReport.CreateNewReport(); var path = Server.MapPath("Reports/Report.mrt"); report.Load(path); e.Report = report; } } }