Value cannot be null in Reporting Tools

612 Views Asked by At

I want to use Stimulsoft Reporting Tools in ASP.NET MVC for an accounting report. When I want to bind my data to report I see:

Value cannot be null.

This is my code:

        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();
        }
1

There are 1 best solutions below

0
On

Use 2015.2retail version of Stimulsoft report.