Exemple #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;
        }
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportJenisKamar rpt = new ReportJenisKamar();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #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;
        }