public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CetakNilai rpt = new CetakNilai(); rpt.Site = this.Site; return(rpt); }
private void btn_cetak_Click(object sender, RoutedEventArgs e) { if (kueri != "") { try { k.sql = kueri; k.setdt(); var ctk = new CetakNilai(); ctk.SetDataSource((DataTable)k.dt); var wctk = new w_Cetak(); wctk.ReportViewer1.ViewerCore.ReportSource = ctk; wctk.ShowDialog(); } catch (Exception err) { Console.WriteLine("{0} Exception caught.", err); } } else { var sampleMessageDialog = new SampleMessageDialog { Message = { Text = "Nilai Belum Ditampilkan" } }; DialogHost.Show(sampleMessageDialog, "MainDialog"); } }