string amount = amountTextBox.Text;
string titleString = " Total Sanctions above ";
List investmentList = new List();
investmentList = new InvestmentManager().CollectAmountWiseInvestment(amount);
expirySanctionCrystalReport reportDocumentObject = new expirySanctionCrystalReport();
//Set Crystal Report Header
CrystalDecisions.CrystalReports.Engine.TextObject amountText = (CrystalDecisions.CrystalReports.Engine.TextObject)reportDocumentObject.ReportDefinition.ReportObjects["dateText"];
amountText.Text = amount;
CrystalDecisions.CrystalReports.Engine.TextObject titleText = (CrystalDecisions.CrystalReports.Engine.TextObject)reportDocumentObject.ReportDefinition.ReportObjects["TextTitle"];
titleText.Text = titleString;
reportDocumentObject.SetDataSource(investmentList);
amountWiseCrystalReportViewer.ReportSource = reportDocumentObject;
amountWiseCrystalReportViewer.RefreshReport();
amountWiseCrystalReportViewer.Visible = true;
No comments:
Post a Comment