linq查询如何绑定到刺激物报告

本文关键字:刺激物 报告 绑定 查询 何绑定 linq | 更新日期: 2023-09-27 17:50:30

我使用刺激物获取报告。首先,我设计了一个名为stireport1的报告。但是我点击报告显示按钮,一个空的报告显示给我,为什么?我的代码是:

private void radButton1_Click(object sender, EventArgs e)
    {

           // stiReport1.RegData("query", query);
           // stiReport2.RegBusinessObject("PUBS", "pub_info", query);
            //stiReport2.RegData("pub_info", query);
          //  stiReport2.RegReportDataSources() = query;
           // stiReport2.Dictionary.Databases.Add(query);
           // stiReport2.Render();
            StiReport st = GetReport();
            st.Show();
    }
private StiReport GetReport()
    {
        StiReport report = new StiReport();
        if (File.Exists("D:''stiReport1"))
        {
            report.Load("D:''stiReport1");
        }
        PUBSEntities db = new PUBSEntities();
        var query = (from p in db.pub_info
                         select p).ToList();
        db.Dispose();
      //  report.RegBusinessObject("PUBS", "pub_info", query);
        report.RegData("mypub",query);
        return report;
    }

linq查询如何绑定到刺激物报告

尝试使用下一个代码:

  if (File.Exists("D:''stiReport1.mrt"))
    {
        report.Load("D:''stiReport1.mrt");
    }