public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crIPODepositSummaryInfo rpt = new crIPODepositSummaryInfo(); rpt.Site = this.Site; return(rpt); }
private void btnDailyReport_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); CrIpoDailyReport crRpt = new CrIpoDailyReport(); crIPODepositSummaryInfo crSummary = new crIPODepositSummaryInfo(); frmIPOReportViewer viewer = new frmIPOReportViewer(); if (cmbMoneyTransacitonType.Text == "ALL") { MoneyTransactionTypeName = ""; } else { MoneyTransactionTypeName = cmbMoneyTransacitonType.Text; } if (CmbtransactionStatus.Text == "ALL") { StatusName = ""; } else { StatusName = Convert.ToString(CmbtransactionStatus.SelectedValue); } if (rdbDailyIPOFullReport.Checked) { if (ChkCompanySelection.Checked) { dt = bal.GetDailyTransactionReport(null, null, MoneyTransactionTypeName, StatusName, Convert.ToString(CmbsessionName.SelectedValue)); } else { dt = bal.GetDailyTransactionReport(dtpFormdate.Value.Date, dtpTodate.Value.Date, MoneyTransactionTypeName, StatusName, ""); } crRpt.SetDataSource(dt); GetCommonInfo(); ((TextObject)crRpt.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ///// Load Branch Name ((TextObject)crRpt.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber; viewer.crystalReportViewer1.ReportSource = crRpt; } else { dt = bal.GetIPODepositSummaryInfo(Convert.ToString(CmbsessionName.SelectedValue)); crSummary.SetDataSource(dt); viewer.crystalReportViewer1.ReportSource = crSummary; } viewer.Show(); }