예제 #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);
        }