public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Repayment_Slip rpt = new Repayment_Slip(); rpt.Site = this.Site; return(rpt); }
private void button_print_deposit_Click(object sender, EventArgs e) { Repayment_Viewer RepaymentViewer = new Repayment_Viewer(); Repayment_Slip cr = new Repayment_Slip(); TextObject text = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text47"]; TextObject text1 = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text46"]; TextObject text2 = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text45"]; TextObject text3 = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text44"]; TextObject text4 = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text43"]; TextObject text5 = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text39"]; TextObject text6 = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text14"]; TextObject text7 = (TextObject)cr.ReportDefinition.Sections["Section2"].ReportObjects["Text3"]; text.Text = Date_Loan.Text; text1.Text = txt_RepaymentBorrower.Text; text2.Text = txt_RepaymentAccountNumber.Text; text3.Text = txt_RepaymentAmount.Text; text4.Text = txt_RepaymentAmountInWords.Text; text5.Text = label_RemainingAmount.Text; text6.Text = txt_RemainingAmounInWord.Text; text7.Text = label_RepaymentTime.Text; RepaymentViewer.crystalReportViewer1.ReportSource = cr; RepaymentViewer.Show(); }