C# 如何从Stimulsoft报告中的业务对象正确配置因变量?
我目前正在编写一份使用因变量的报告,但我似乎无法使其正常工作。例如,我正在使用Northwind数据库,在我的ASP.NET MVC应用程序中创建业务对象,然后加载预先设计的.mrt文件并将BOs提供给它。以下是我迄今为止所做的工作:C# 如何从Stimulsoft报告中的业务对象正确配置因变量?,c#,asp.net,report,stimulsoft,C#,Asp.net,Report,Stimulsoft,我目前正在编写一份使用因变量的报告,但我似乎无法使其正常工作。例如,我正在使用Northwind数据库,在我的ASP.NET MVC应用程序中创建业务对象,然后加载预先设计的.mrt文件并将BOs提供给它。以下是我迄今为止所做的工作: public ActionResult GetDependentVariablesSnapshot() { string reportFile = Server.MapPath("~/bin/DependentVariables.mrt")
public ActionResult GetDependentVariablesSnapshot()
{
string reportFile = Server.MapPath("~/bin/DependentVariables.mrt");
StiReport report = new StiReport();
report.Load(reportFile);
var reportBO = new DependentVariables();
var BOs = new List<StiBusinessObjectData>();
BOs.Add(new StiBusinessObjectData("", "DependentVariables", reportBO));
report.RegBusinessObject(BOs);
report.Dictionary.SynchronizeBusinessObjects();
return StiMvcViewer.GetReportSnapshotResult(report);
}
以下是Designer应用程序上的my dictionary面板:
以下是变量类别和产品的配置:
我对它进行了测试,业务对象被正确映射,数据被显示出来。但是,在报告顶部的参数表单中,当正确填写类别选择时,Product one会显示所有产品,即使我更改类别选择的值,它也会保持不变。
我想我可能对某些内容进行了错误配置,但我不确定是什么。因变量功能不适用于业务对象