Esempio n. 1
0
        private void loadReport()
        {
            string nameRe = "MAU_79_80_4210.mrt";

            if (checkBox_namere.Checked)
            {
                nameRe = ClassPrint.nameReport(nameRe);
            }
            StiReport report = new StiReport();

            report.Load("Reports\\" + nameRe);

            StiSqlDatabase sqlDB = new StiSqlDatabase();

            sqlDB = (StiSqlDatabase)report.Dictionary.Databases["Oracle"];
            sqlDB.ConnectionString = FormHISSMS.conn_string;
            report.Compile();
            //report["schemamonth"] = dateToSchemaMonth(dateEditTuNgay.Text, dateEditDenNgay.Text);
            //MessageBox.Show(datauser(dateEditTuNgay.Text, dateEditDenNgay.Text));
            ((StiSqlSource)report.Dictionary.DataSources["DataSource1"]).CommandTimeout = 100;
            report["schemamonth"] = datauser(dateEditTuNgay.Text, dateEditDenNgay.Text);
            report["tungay"]      = dateEditTuNgay.Text;
            report["denngay"]     = dateEditDenNgay.Text;
            if (cb_solieu.Text == "Nội trú")
            {
                report["solieu"] = "=1";
            }
            else
            {
                report["solieu"] = "!=1";
            }
            report.Render(false);

            stiViewerControl.Report = report;
        }
        private void loadReport()
        {
            string nameRe = "mau_21.mrt";

            if (checkBox_namere.Checked)
            {
                nameRe = ClassPrint.nameReport(nameRe);
            }
            StiReport report = new StiReport();

            report.Load("Reports\\" + nameRe);

            StiSqlDatabase sqlDB = new StiSqlDatabase();

            sqlDB = (StiSqlDatabase)report.Dictionary.Databases["Oracle"];
            sqlDB.ConnectionString = FormHISSMS.conn_string;
            report.Compile();
            //report["schemamonth"] = dateToSchemaMonth(dateEditTuNgay.Text, dateEditDenNgay.Text);
            //MessageBox.Show(datauser(dateEditTuNgay.Text, dateEditDenNgay.Text));
            report["schemamonth"] = datauser(dateEditTuNgay.Text, dateEditDenNgay.Text);
            report["tungay"]      = dateEditTuNgay.Text;
            report["denngay"]     = dateEditDenNgay.Text;
            report.Render(false);

            stiViewerControl.Report = report;
        }
Esempio n. 3
0
        private void loadReport()
        {
            string nameRe = "mau_19.mrt";

            if (checkBox_namere.Checked)
            {
                nameRe = ClassPrint.nameReport(nameRe);
            }
            StiReport report = new StiReport();

            report.Load("Reports\\" + nameRe);
            StiSqlDatabase sqlDB = new StiSqlDatabase();

            sqlDB = (StiSqlDatabase)report.Dictionary.Databases["Oracle"];
            sqlDB.ConnectionString = FormHISSMS.conn_string;
            report.Compile();
            //MessageBox.Show(DateTime.ParseExact(dateEditTuNgay.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy"));
            //MessageBox.Show(datauser(dateEditTuNgay.Text, dateEditDenNgay.Text));
            //report["schemamonth"] = dateToSchemaMonth(dateEditTuNgay.Text, dateEditDenNgay.Text);
            try {
                report["schemamonth"] = datauser(dateEditTuNgay.Text, dateEditDenNgay.Text);
                //report["schemamonth"] = dateToSchemaMonth(dateEditTuNgay.Text, dateEditDenNgay.Text);
                report["tungay"]  = dateEditTuNgay.Text;
                report["denngay"] = dateEditDenNgay.Text;
                report.Render(false);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            stiViewerControl.Report = report;
        }