/// <summary> /// Function to print report /// </summary> /// <param name="fromDate"></param> /// <param name="toDate"></param> public void Print(DateTime fromDate, DateTime toDate) { try { FinancialStatementSP spFinance = new FinancialStatementSP(); AccountGroupSP spAccountGroup = new AccountGroupSP(); DataSet dsAccountGroup = new DataSet(); DataTable dtblAccountGroup = spAccountGroup.AccountGroupReportFill(fromDate, toDate); string strSum = lblBalanceTotal.Text; DataTable dtblSum = new DataTable(); dtblSum.Columns.Add("Sum", typeof(string)); DataRow dr = dtblSum.NewRow(); dr[0] = strSum; dtblSum.Rows.InsertAt(dr, 0); DataTable dtblCompany = spFinance.FundFlowReportPrintCompany(1); dsAccountGroup.Tables.Add(dtblAccountGroup); dsAccountGroup.Tables.Add(dtblCompany); dsAccountGroup.Tables.Add(dtblSum); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.AccountGroup(dsAccountGroup); } catch (Exception ex) { formMDI.infoError.ErrorString = "AGR1:" + ex.Message; } }