【问题标题】:How to properly configure dependent variables from Business Objects in Stimulsoft reports?如何在 Stimulsoft 报告中正确配置来自业务对象的因变量?
【发布时间】:2015-08-25 13:06:48
【问题描述】:

我目前正在编写一份使用因变量的报告,但我似乎无法使其正常工作。例如,我使用 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

我对其进行了测试,业务对象已正确映射,并显示了数据。但是,在报告顶部的参数表单中,当“类别”选择正确填写时,“产品”一项显示所有产品,即使我更改“类别”的值,它也保持不变选择。 我想我可能配置错误,但我不确定是什么。

【问题讨论】:

    标签: c# asp.net report stimulsoft


    【解决方案1】:

    因变量功能不适用于业务对象。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-23
      • 2013-07-07
      • 2017-11-04
      • 1970-01-01
      • 2015-07-31
      • 2010-12-15
      相关资源
      最近更新 更多