在将数据发送到报告时,此错误显示给我 业务对象是名为ReportData的字符串的5列
公共ActionResult GetReport() { 清单ItemExpiredReportViewModelList = new List();
for (int i = 0; i < 10; i++)
{
ItemExpiredReportViewModel ItemExpiredReportViewModela = new ItemExpiredReportViewModel();
ItemExpiredReportViewModela.ItemName = "ItemName ".ToString();
ItemExpiredReportViewModela.ItemCode = "ItemCode ".ToString();
ItemExpiredReportViewModela.ItemUnit = "ItemUnit ".ToString();
ItemExpiredReportViewModela.ExpireDate = "ExpireDate".ToString();
ItemExpiredReportViewModela.Balance = "Balance ".ToString();
ItemExpiredReportViewModelList.Add(ItemExpiredReportViewModela);
}
StiReport report = new StiReport();
report.Load(Server.MapPath("~/Areas/Admin/Reports/TestStimulsoft/Report.mrt"));
report.RegBusinessObject("ReportData", ItemExpiredReportViewModelList);
report.Compile();
CheckReference(report);
return StiMvcViewer.GetReportResult(report);
}
c:\ Users \ user \ AppData \ Local \ Temp \ s3iq5rsq.0.cs(950,13):错误CS0126:要求可转换为'string'类型的对象c:\ Users \ user \ AppData \ Local \ Temp \ s3iq5rsq.0.cs(955,13):错误CS0126:需要可转换为“字符串”类型的对象c:\ Users \ user \ AppData \ Local \ Temp \ s3iq5rsq.0.cs(960, 13):错误CS0126:需要可转换为“字符串”类型的对象c:\ Users \ user \ AppData \ Local \ Temp \ s3iq5rsq.0.cs(965,13):错误CS0126:可转换类型的对象到'string'是必需的c:\ Users \ user \ AppData \ Local \ Temp \ s3iq5rsq.0.cs(970,13):错误CS0126:需要可转换为'string'的类型的对象
在D:\ Stimulsoft \ Stimulsoft.Reports \ Stimulsoft.Report \ StiReport.Compile.cs:line 435中的Stimulsoft.Report.StiReport.Compile(字符串路径,流,StiOutputType输出类型,布尔自动创建,对象standaloneReportType)中的
在D:\ Stimulsoft \ Stimulsoft.Reports \ Stimulsoft.Report \ StiReport.Compile.cs:line 134中的Stimulsoft.Report.StiReport.Compile()
在D:\ HMS3 \ HMS.Web \ Areas \ Admin \ Controllers \ AddTransactionController.cs:line 405中的HMS.Web.Areas.Admin.Controllers.AddTransactionController.GetReport()
在lambda_method(Closure,ControllerBase,Object [])
在System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase控制器,Object []参数)
在System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary 2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2个参数)处
在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c.b__9_0(IAsyncResult asyncResult,ActionInvocation innerInvokeState)
在System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult 2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End()处
在System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__11_0()
在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters。<> c__DisplayClass11_1.b__2()