Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            KlaimReport rpt = new KlaimReport();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            KlaimReport crpt = new KlaimReport();

            try
            {
                crpt.SetDatabaseLogon("proyek", "proyek");
                crpt.SetParameterValue("NamaPegawai", comboBox1.SelectedItem.ToString());
                crystalReportViewer1.ReportSource = crpt;
                MessageBox.Show(comboBox1.SelectedItem.ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error");
            }
        }