private void GetShareReviewEntry(DateTime date) { try { cr_ShareEntryReview objcrReviewShare = new cr_ShareEntryReview(); DataTable dataTable = new DataTable(); frmReportViewer objReportviewer = new frmReportViewer(); ShareDWBAL objShareDW = new ShareDWBAL(); dataTable = objShareDW.GetDayShareSummary(date); objcrReviewShare.SetDataSource(dataTable); GetCommonInfo(); ((TextObject)objcrReviewShare.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName; ((TextObject)objcrReviewShare.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber; ((TextObject)objcrReviewShare.ReportDefinition.Sections[2].ReportObjects["txtTradeDate"]).Text = date.ToString("dd-MMM-yyyy"); objReportviewer.crvReportViewer.ReportSource = objcrReviewShare; objReportviewer.Text = "Share Review Entry"; objReportviewer.crvReportViewer.DisplayGroupTree = false; objReportviewer.Show(); } catch (Exception) { throw; } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { cr_ShareEntryReview rpt = new cr_ShareEntryReview(); rpt.Site = this.Site; return(rpt); }