【问题标题】:How to access to Business Objects in Stimulsoft Report Code Behind如何在 Stimulsoft 报告代码后面访问业务对象
【发布时间】:2018-02-05 06:25:51
【问题描述】:

我是 stimulsoft 报告设计师的新手。如您所知,可以在报告中编写 C# 代码。

我想创建一个函数来过滤我的业务对象并返回一个值。但问题是如何在报表后面的代码中访问业务对象?

不幸的是,我没有找到任何有关文档的信息!

【问题讨论】:

    标签: c# stimulsoft


    【解决方案1】:

    正确的方法是将报表对象连接到数据源,然后可以添加filters

    要以编程方式访问数据,您可以使用 this.Dictionary...

    【讨论】:

      【解决方案2】:

      您可以使用以下代码在 c# 中处理 stimulsoft 的业务对象 -

      StiReport 报告 = 新 StiReport(); 列表 lst=new List();

              if (lst.Count() > 0)
              {
                  report.Load(Server.MapPath("~/ your path/ReporFile.mrt"));
                  report.RegData("YourDataObjectInReport", lst);
                  report.RegBusinessObject("YourBussineessObject",lst);
              }
              else
              {
                  report = NoDataReport();
              }
              return StiMvcViewer.GetReportSnapshotResult(report);
      

      【讨论】:

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