• <menu id="w2i4a"></menu>
  • logo Stimulsoft Reports.WinForms教程-2019

    文檔首頁>>Stimulsoft Reports.WinForms教程-2019>>【Stimulsoft Reports.WinForms教程】Detalization實(shí)時(shí)報(bào)表

    【Stimulsoft Reports.WinForms教程】Detalization實(shí)時(shí)報(bào)表


    【下載Stimulsoft Reports.Ultimate最新版本】

    此示例項(xiàng)目顯示如何在單獨(dú)的預(yù)覽窗口中進(jìn)行報(bào)表分離。該報(bào)告可能包含外部報(bào)表中的詳細(xì)數(shù)據(jù)。例如,主要和詳細(xì)報(bào)表顯示在單獨(dú)的預(yù)覽窗口中。加載主報(bào)表,為click事件添加事件偵聽器,并在查看器中顯示此報(bào)表:

    private void button2_Click(object sender, System.EventArgs e)
    {
        StiReport report = new StiReport();
        report.RegData(dataSet1);
        report.Load("..\\LiveReports.mrt");
        report.Compile();
        report.CompiledReport.Click += new EventHandler(click);
        report.Show();
    }

    在click事件中,您可以使用主報(bào)表中的參數(shù)加載包含數(shù)據(jù)過濾的詳細(xì)報(bào)表:

    private void click(object sender, EventArgs e)
    {
        StiComponent comp = sender as StiComponent;
        string customerID = (string)comp.BookmarkValue;
     
        if (customerID != null)
        {
            StiReport report = new StiReport();
            report.RegData(dataSet1);
            report.Load("..\\Details.mrt");
            StiDataBand dataBand = (StiDataBand)report.Pages["Page1"].Components["DataBand1"];
            StiFilter filter = new StiFilter("{Orders.CustomerID==\"" + customerID + "\"}");
            dataBand.Filters.Add(filter);
            report.Show();
        }
    }

    示例代碼的結(jié)果如下圖所示:

    Stimulsoft

    下載示例

    購買Stimulsoft正版授權(quán),請點(diǎn)擊“咨詢在線客服”喲!

    Stimulsoft

    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();