public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Withdrawal_Slip rpt = new Withdrawal_Slip(); rpt.Site = this.Site; return(rpt); }
private void button_print_deposit_Click(object sender, EventArgs e) { Withdrawal_Viewer WithdrawalViewer = new Withdrawal_Viewer(); Withdrawal_Slip cr = new Withdrawal_Slip(); TextObject text = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text47"]; TextObject text1 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text46"]; TextObject text2 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text45"]; TextObject text3 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text44"]; TextObject text4 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text43"]; TextObject text5 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text42"]; TextObject text6 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text41"]; TextObject text7 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text40"]; TextObject text8 = (TextObject)cr.ReportDefinition.Sections["Section3"].ReportObjects["Text39"]; text.Text = txt_WithdrawalAccountName.Text; text1.Text = txt_WithdrawalAccountNumber.Text; text2.Text = txt_WithdrawalName.Text; text3.Text = Date_Withdrawal.Text; text4.Text = label_WithdrawalTime.Text; text5.Text = txt_WithdrawalAmount.Text; text6.Text = txt_WithdrawalAmountInWord.Text; text7.Text = cb_WithdrawalCurrency.Text; text8.Text = txt_WithdrwalNarration.Text; WithdrawalViewer.crystalReportViewer1.ReportSource = cr; WithdrawalViewer.Show(); }