我正在报告页面上使用StimulsoftReport
作为报告软件。在后端代码中,所有内容都是正确的,但是在将报告分配给reportView.Report = report;
的最后一行(StiWebViewer
)中,我遇到此错误:
未找到方法:'无效 Stimulsoft.Report.Web.StiWebViewer.set_Report(Stimulsoft.Report.StiReport)'。
Cs代码:
protected void Page_Load(object sender, EventArgs e)
{
StiReport report = new StiReport();
var registrationNumber = Context.Request.QueryString["RegistrationNumber"];
CabotageBookingViewModel viewModel = cabotageBookingDomainService.GetByRegistrationNumber(registrationNumber);
report.RegBusinessObject("CabotageReciept", "CabotageReciept", viewModel);
report.Load(Server.MapPath("~/Report/Cabotage/CabotageReciept.mrt"));
report.ReportName = "CabotageReciept";
reportView.Report = report;
}
这是我的aspx文件:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CabotageReciept.aspx.cs" Inherits="Tranship.UI.Report.Cabotage.CabotageReciept" %>
<%@ Register Assembly="Stimulsoft.Report.Web, Version=2015.1.0.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a" Namespace="Stimulsoft.Report.Web" TagPrefix="St" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: right">
<St:StiWebViewer id="reportView" runat="server" servertimeout="00:50:00" theme="Office2003"
toolbaralignment="Center"
/>
</div>
</form>
</body>
</html>