Ejemplo n.º 1
0
        private void DoIt()
        {
            string rt = Check();

            if (rt != "OK")
            {
                MyMainForm.ShowWarning(rt);
                return;
            }
            ROps2aTableAdapter ad2a = MyData.GetKlonsRepAdapter("ROps2a") as ROps2aTableAdapter;
            ROps3aTableAdapter ad3a = MyData.GetKlonsRepAdapter("ROps3a") as ROps3aTableAdapter;

            if (ad2a == null)
            {
                return;
            }
            if (ad3a == null)
            {
                return;
            }

            ad2a.FillBy_apgr_dz_12(MyData.DataSetKlonsRep.ROps2a, startDate, endDate);
            ad3a.FillBy_apgr_dz_11(MyData.DataSetKlonsRep.ROps3a, startDate, endDate);

            SaveParams();

            MyData.ReportHelper.PrepareRops2a();

            ReportViewerData rd = new ReportViewerData();

            rd.FileName            = "Report_Apgr_DZ_1";
            rd.Sources["DataSet1"] = MyData.DataSetKlonsRep.ROps2a;
            rd.Sources["DataSet2"] = MyData.DataSetKlonsRep.ROps3a;
            rd.AddReportParameters(
                new string[]
            {
                "RSD", MyData.Params.RSD,
                "RED", MyData.Params.RED,
                "CompanyName", MyData.Params.CompNameX
            });

            MyMainForm.ShowReport(rd);
        }