如何在 Stimulsoft 报告中正确配置来自 Business Objects 的因变量?

How to properly configure dependent variables from Business Objects in Stimulsoft reports?

我目前正在编写一份使用因变量的报告,但我似乎无法使其正常工作。例如,我使用 Northwind 数据库并在我的 ASP.NET MVC 应用程序中创建业务对象,然后加载预先设计的 .mrt 文件并将 BO 提供给它。这是我到目前为止所做的:

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 应用程序上的字典面板: http://i.stack.imgur.com/zAEZE.png

这是两个变量(类别和产品)的配置:http://i.stack.imgur.com/dbT7H.png

我测试了一下,业务对象映射正确,数据显示。但是,在报告顶部的参数表中,虽然 "Category" select 已正确填写,但 "Product" 显示了所有产品,即使我更改 "Category" select 的值。 我想我可能配置有误,但我不确定是什么。

因变量功能不适用于 Business Objects。