我想在 ASP.NET MVC 中使用Stimulsoft 报告工具来生成会计报告。当我想将我的数据绑定到报告时,我看到:
Value cannot be null.
这是我的代码:
StiReport report = new StiReport();
var model = new CardReportViewModel();
model.AccountId = 1500;
model.AccountCode = "add";
report.Dictionary.DataStore.Clear();
report.Load(Server.MapPath("~/Content/File/Report.mrt"));
report.RegBusinessObject("data", model);
//report.RegData("data",model);
report.Dictionary.SynchronizeBusinessObjects();
try
{
return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);
}
catch (Exception ex)
{
return View();
}