C# 使用C代码中的数据创建Stimulsoft报告
我有一个MVC项目,我想使用Stimulsoft Ultimate创建一个报告。我见过使用直接连接并执行查询从数据库获取数据的示例。但是我的c代码中有一个对象列表,我想用于报告。 可能吗?怎么做 更新: 这就是我到目前为止所做的:C# 使用C代码中的数据创建Stimulsoft报告,c#,asp.net-mvc,report,stimulsoft,C#,Asp.net Mvc,Report,Stimulsoft,我有一个MVC项目,我想使用Stimulsoft Ultimate创建一个报告。我见过使用直接连接并执行查询从数据库获取数据的示例。但是我的c代码中有一个对象列表,我想用于报告。 可能吗?怎么做 更新: 这就是我到目前为止所做的: public ActionResult Report() { string FilePath = "..\\Report.mrt"; report.Load(Server.MapPath(FilePath));
public ActionResult Report()
{
string FilePath = "..\\Report.mrt";
report.Load(Server.MapPath(FilePath));
report.Compile();
report["ShamsiCurrDate"] = myGlobalVariables.DateNow;
var Data = GetDataFromDB();
report.Render();
return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);
}
但是在最后一行(return…)中,我得到了以下错误
System.ArgumentNullException: Value cannot be null.
Parameter name: value
您应该将下一节添加到web.config文件:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
到目前为止我们做了什么?给我们看一些代码。@Ramilu我添加了一些代码,这不会有帮助的!还有别的想法吗?嗨,我也发了一个问题:。我希望你能帮忙。你应该把版本改成你使用的版本。