public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            R_landbaseMLC rpt = new R_landbaseMLC();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        public void Load_MLC()
        {
            Cursor.Current      = Cursors.WaitCursor;
            wizard1.SelectedTab = tabPage2;
            IniFile ini = new IniFile(ClassSql.MMS_Path);
            DataClasses1DataContext db   = new DataClasses1DataContext(Properties.Settings.Default.MyConString);
            DataTable     dt             = new ds_report2.sp_Landbase_MLCDataTable();
            R_landbaseMLC R_landbase_MLC = new R_landbaseMLC();

            var list = db.sp_Landbase_MLC(this.Tag.ToString()).ToList();

            foreach (var i in list)
            {
                dt.Rows.Add(i.lastname, i.firstname, i.middlename, i.address_1, i.position, i.marital_status, i.gender, i.birthdate, i.place_of_birth, i.employer, i.passport_no, i.nationality, i.religion, i.country_destination, i.picture.ToArray(), i.result_date, i.pathologist, i.fitness_date, i.valid_until, i.recommendation, i.medtech, i.ISHIHARA_U, i.ISHIHARA_C, i.SATISFACTORY_HEARING, i.SATISFACTORY_PSYCHO, i.SATISFACTORY_SIGHT_UNAID, i.specimen_no);
            }
            R_landbase_MLC.SetDataSource(dt);
            TextObject FormNo = (TextObject)R_landbase_MLC.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_landbase_MLC.ReportDefinition.ReportObjects["txt_RevNo"];
            TextObject Iso    = (TextObject)R_landbase_MLC.ReportDefinition.ReportObjects["txt_iso"];

            FormNo.Text = ini.IniReadValue("FORM", "Landbase_MLC");
            RevNo.Text  = ini.IniReadValue("REVISION", "Landbase_MLC");
            Iso.Text    = ini.IniReadValue("ISO", "Landbase_MLC");



            Viewer2.ReportSource = R_landbase_MLC;
            RemoveTab(Viewer2);
            Cursor.Current = Cursors.Default;
        }