Exemplo n.º 1
0
        private void FormReportJenisKamar_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle  = System.Windows.Forms.FormBorderStyle.None;
            conn.ConnectionString = "User ID=proyek;Password=1;Data Source=orcl";
            try
            {
                if (conn.State == ConnectionState.Open)
                {
                    conn.Close();
                    conn.ConnectionString = "User ID=proyek;Password=1;Data Source=orcl";
                    conn.Open();
                }
                else
                {
                    conn.ConnectionString = "User ID=proyek;Password=1;Data Source=orcl";
                    conn.Open();
                }
                conn.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            comboBox1.Text = "May";
            ReportJenisKamar rep = new ReportJenisKamar();

            rep.SetDatabaseLogon("proyek", "1");
            rep.SetParameterValue("bulan", comboBox1.Text);
            rep.SetParameterValue("jenis_terbanyak", JenisKamarTerbanyak(comboBox1.Text));
            crystalReportViewer1.ReportSource = rep;
        }
Exemplo n.º 2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportJenisKamar rpt = new ReportJenisKamar();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 3
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            ReportJenisKamar rep = new ReportJenisKamar();

            rep.SetDatabaseLogon("proyek", "1");
            rep.SetParameterValue("bulan", comboBox1.Text);
            rep.SetParameterValue("jenis_terbanyak", JenisKamarTerbanyak(comboBox1.Text));
            crystalReportViewer1.ReportSource = rep;
        }