1

我想在 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();
        }
4

1 回答 1

0

使用 2015.2 零售版的 Stimulsoft 报告。

于 2017-10-03T09:54:14.657 回答