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

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            if (dateTimePicker1.Value > DateTime.Now)
            {
                MessageBox.Show("Value tanggal 1 tidak bisa lebih besar dari hari ini");
                return;
            }

            if (dateTimePicker1.Value > dateTimePicker2.Value)
            {
                MessageBox.Show("Value tanggal 1 tidak bisa lebih besar dari tanggal 2");
                return;
            }

            LaporanPenjualan rep = new LaporanPenjualan();

            rep.SetDatabaseLogon("export", "import", "orcl", "");
            rep.SetParameterValue("Awal", dateTimePicker1.Value.ToString("dd-MMM-yy"));
            rep.SetParameterValue("Akhir", dateTimePicker2.Value.ToString("dd-MMM-yy"));
            crystalReportViewer.ReportSource = rep;
        }