private Dictionary <String, TVariant> InitialiseDictionary(TRptCalculator ACalc) { Shared.MReporting.TParameterList pm = ACalc.GetParameters(); pm.Add("param_ledger_number_i", FLedgerNumber); String LedgerName = TRemote.MFinance.Reporting.WebConnectors.GetLedgerName(FLedgerNumber); ACalc.AddStringParameter("param_ledger_name", LedgerName); ACalc.AddParameter("param_currency_name", FLedgerRow.BaseCurrency); // Stewardship reports are always in Base Currency. ACalc.AddStringParameter("param_currency_formatter", "0,0.000"); ACalc.AddParameter("param_ich_number", pm.Get("param_cmbICHNumber").ToInt32()); ACalc.AddParameter("param_period", true); Int32 period = pm.Get("param_cmbReportPeriod").ToInt32(); Int32 PeriodStart = Math.Max(1, period); Int32 PeriodEnd = period; if (PeriodEnd == 0) { PeriodEnd = TFinanceControls.GetLedgerNumPeriods(FLedgerNumber); } Int32 Year = pm.Get("param_cmbYearEnding").ToInt32(); ACalc.AddParameter("param_start_period_i", PeriodStart); ACalc.AddParameter("param_end_period_i", PeriodEnd); DateTime StartDate = TRemote.MFinance.GL.WebConnectors.GetPeriodStartDate(FLedgerNumber, Year, 0, PeriodStart); DateTime EndDate = TRemote.MFinance.GL.WebConnectors.GetPeriodEndDate(FLedgerNumber, Year, 0, PeriodEnd); ACalc.AddParameter("param_real_year", StartDate.Year); ACalc.AddParameter("param_start_date", StartDate); ACalc.AddParameter("param_end_date", EndDate); ACalc.AddParameter("param_current_financial_year", FLedgerRow.CurrentFinancialYear == Year); Boolean IsClosed = (Year < FLedgerRow.CurrentFinancialYear) || (PeriodEnd < FLedgerRow.CurrentPeriod); ACalc.AddParameter("param_period_closed", IsClosed); Boolean IsCurrent = (Year == FLedgerRow.CurrentFinancialYear) && (PeriodEnd == FLedgerRow.CurrentPeriod); ACalc.AddParameter("param_period_current", IsCurrent); ACalc.AddParameter("param_year_i", Year); ArrayList reportParam = pm.Elems; Dictionary <String, TVariant> paramsDictionary = new Dictionary <string, TVariant>(); foreach (Shared.MReporting.TParameter p in reportParam) { if (p.name.StartsWith("param") && (p.name != "param_calculation")) { paramsDictionary.Add(p.name, p.value); } } return(paramsDictionary); } // Initialise Dictionary