示例#1
0
文件: Form1.cs 项目: 21express/sisco
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                var a = new FormReportPreview();
                var b = new XtraReportTabular();
                //b.DataSource = ReportDataSource.GetDataSource();
                //b.bindingSource1.Clear();
                var v = new ReportLayout("XtraReportTabular.repx");
                if (v.HasLayout)
                {
                    b.LoadLayout(v.LayoutPath);
                }

                var c = new ReportDataSource {
                    ListReportModels = ReportDataSource.GetDataSource()
                };
                b.bindingSource1.DataSource      = c;
                a.documentViewer1.DocumentSource = b;
                a.Show();
            }
            catch (Exception err)
            {
                throw;
            }
        }
示例#2
0
文件: Form1.cs 项目: 21express/sisco
        private void buttonReportDesignerRuntime_Click(object sender, EventArgs e)
        {
            var xr = new XRDesignForm();
            var b  = new XtraReportTabular();
            var v  = new ReportLayout("XtraReportTabular.repx");

            if (v.HasLayout)
            {
                b.LoadLayout(v.LayoutPath);
            }
            xr.OpenReport(b);
            xr.Show(this);
        }