本文整理汇总了C#中Ict.Petra.Client.MReporting.Logic.TRptCalculator.GetParameters方法的典型用法代码示例。如果您正苦于以下问题:C# TRptCalculator.GetParameters方法的具体用法?C# TRptCalculator.GetParameters怎么用?C# TRptCalculator.GetParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ict.Petra.Client.MReporting.Logic.TRptCalculator
的用法示例。
在下文中一共展示了TRptCalculator.GetParameters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
ACalc.AddParameter("param_recipientkey", txtRecipient.Text);
ACalc.AddParameter("param_extract_name", txtExtract.Text);
if (dtpToDate.Date.HasValue)
{
Int32 ToDateYear = dtpToDate.Date.Value.Year;
//TODO: Calendar vs Financial Date Handling - Confirm that these should not be ledger dates, i.e. allowing for >12 periods and non-calendar period boundaries
DateTime FromDateThisYear = new DateTime(ToDateYear, 1, 1);
DateTime ToDatePreviousYear = new DateTime(ToDateYear - 1, 12, 31);
DateTime FromDatePreviousYear = new DateTime(ToDateYear - 1, 1, 1);
ACalc.AddParameter("param_from_date_this_year", FromDateThisYear);
ACalc.AddParameter("param_to_date_previous_year", ToDatePreviousYear);
ACalc.AddParameter("param_from_date_previous_year", FromDatePreviousYear);
}
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
for (int Counter = 0; Counter <= MaxColumns; ++Counter)
{
String ColumnName = ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
if (ColumnName == "Gift Amount")
{
ACalc.AddParameter("param_gift_amount_column", Counter);
}
}
}
示例2: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if ((AReportAction == TReportActionEnum.raGenerate)
&& (dtpFromDate.Date > dtpToDate.Date))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("From date is later than to date."),
Catalog.GetString("Please change from date or to date."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
ACalc.AddParameter("param_currency", "Base");
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
// Set the values for accumulating the costs to 0
ACalc.AddParameter("CostCentreCredit", 0);
ACalc.AddParameter("CostCentreDebit", 0);
ACalc.AddParameter("AccountCodeCredit", 0);
ACalc.AddParameter("AccountCodeDebit", 0);
ACalc.AddParameter("TotalCredit", 0);
ACalc.AddParameter("TotalDebit", 0);
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
// we need to know some indices of the columns
for (int Counter = 0; Counter < MaxColumns; ++Counter)
{
String ColumnName = "param_column_" + ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
ACalc.AddParameter(ColumnName, Counter);
}
}
示例3: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if ((AReportAction == TReportActionEnum.raGenerate)
&& (dtpFromDate.Date > dtpToDate.Date))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("From date is later than to date."),
Catalog.GetString("Please change from date or to date."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
ACalc.AddParameter("TransactionCount", 0);
ACalc.AddParameter("TransactionCountAccount", 0);
ACalc.AddParameter("SumDebitAccount", 0);
ACalc.AddParameter("SumCreditAccount", 0);
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
for (int Counter = 0; Counter <= MaxColumns; ++Counter)
{
String ColumnName = ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
if (ColumnName == "Debits")
{
ACalc.AddParameter("param_debit_column", Counter);
}
if (ColumnName == "Credits")
{
ACalc.AddParameter("param_credit_column", Counter);
}
}
}
示例4: LoadReportData
//
// This will be called if the Fast Reports Wrapper loaded OK.
// Returns True if the data apparently loaded OK and the report should be printed.
private bool LoadReportData(TRptCalculator ACalc)
{
ArrayList reportParam = ACalc.GetParameters().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.ContainsKey(p.name)))
{
paramsDictionary.Add(p.name, p.value);
}
}
DataTable ReportTable = TRemote.MReporting.WebConnectors.GetReportDataTable("GiftBatchDetail", paramsDictionary);
if (this.IsDisposed) // There's no cancel function as such - if the user has pressed Esc the form is closed!
{
return false;
}
if (ReportTable == null)
{
FPetraUtilsObject.WriteToStatusBar("Report Cancelled.");
return false;
}
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportTable, "GiftBatchDetail");
//
// I need to get the name of the current ledger..
DataTable LedgerNameTable = TDataCache.TMFinance.GetCacheableFinanceTable(TCacheableFinanceTablesEnum.LedgerNameList);
DataView LedgerView = new DataView(LedgerNameTable);
LedgerView.RowFilter = "LedgerNumber=" + FLedgerNumber;
String LedgerName = "";
if (LedgerView.Count > 0)
{
LedgerName = LedgerView[0].Row["LedgerName"].ToString();
}
ACalc.AddStringParameter("param_ledger_name", LedgerName);
ACalc.AddStringParameter("param_linked_partner_cc", ""); // I may want to use this for auto_email, but usually it's unused.
bool TaxDeductiblePercentageEnabled = Convert.ToBoolean(
TSystemDefaults.GetSystemDefault(SharedConstants.SYSDEFAULT_TAXDEDUCTIBLEPERCENTAGE, "FALSE"));
ACalc.AddParameter("param_tax_deductible_pct", TaxDeductiblePercentageEnabled);
if (ACalc.GetParameters().Exists("param_currency")
&& (ACalc.GetParameters().Get("param_currency").ToString() == Catalog.GetString("Transaction")))
{
ACalc.RemoveParameter("param_currency_name");
ACalc.AddParameter("param_currency_name",
TRemote.MFinance.Reporting.WebConnectors.GetTransactionCurrency(FLedgerNumber, Convert.ToInt32(txtBatchNumber.Text)));
}
return true;
}
示例5: LoadReportData
//
// This will be called if the Fast Reports Wrapper loaded OK.
// Returns True if the data apparently loaded OK and the report should be printed.
private bool LoadReportData(TRptCalculator ACalc)
{
ArrayList reportParam = ACalc.GetParameters().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.ContainsKey(p.name)))
{
paramsDictionary.Add(p.name, p.value);
}
}
String RootCostCentre = "[" + FLedgerNumber + "]";
paramsDictionary.Add("param_cost_centre_code", new TVariant(RootCostCentre));
DataTable ReportTable = TRemote.MReporting.WebConnectors.GetReportDataTable("SurplusDeficit", paramsDictionary);
if (ReportTable == null)
{
FPetraUtilsObject.WriteToStatusBar("Report Cancelled.");
return false;
}
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportTable, "SurplusDeficit");
String LedgerName = TRemote.MFinance.Reporting.WebConnectors.GetLedgerName(FLedgerNumber);
ACalc.AddStringParameter("param_ledger_name", LedgerName);
return true;
}
示例6: LoadReportData
//
// This will be called if the Fast Reports Wrapper loaded OK.
// Returns True if the data apparently loaded OK and the report should be printed.
private bool LoadReportData(TRptCalculator ACalc)
{
ArrayList reportParam = ACalc.GetParameters().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.ContainsKey(p.name)))
{
paramsDictionary.Add(p.name, p.value);
}
}
Int32 ParamNestingDepth = 6;
String DepthOption = paramsDictionary["param_depth"].ToString();
if (DepthOption == "standard")
{
ParamNestingDepth = 3;
}
paramsDictionary.Add("param_nesting_depth", new TVariant(ParamNestingDepth));
String RootCostCentre = "[" + FLedgerNumber + "]";
paramsDictionary.Add("param_cost_centre_code", new TVariant(RootCostCentre));
//
// The table contains extra rows for "headers" and "footers", facilitating the hierarchical printout.
DataTable ReportTable = TRemote.MReporting.WebConnectors.GetReportDataTable("BalanceSheet", paramsDictionary);
if (this.IsDisposed)
{
return false;
}
if (ReportTable == null)
{
FPetraUtilsObject.WriteToStatusBar("Report Cancelled.");
return false;
}
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportTable, "BalanceSheet");
//
// I need to get the name of the current ledger..
DataTable LedgerNameTable = TDataCache.TMFinance.GetCacheableFinanceTable(TCacheableFinanceTablesEnum.LedgerNameList);
DataView LedgerView = new DataView(LedgerNameTable);
LedgerView.RowFilter = "LedgerNumber=" + FLedgerNumber;
String LedgerName = "";
if (LedgerView.Count > 0)
{
LedgerName = LedgerView[0].Row["LedgerName"].ToString();
}
ACalc.AddStringParameter("param_ledger_name", LedgerName);
return true;
}
示例7: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
for (int Counter = 0; Counter <= MaxColumns; ++Counter)
{
String ColumnName = ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
if (ColumnName == "Gift Amount")
{
ACalc.AddParameter("param_gift_amount_column", Counter);
}
}
}
示例8: LoadReportData
//
// This will be called if the Fast Reports Wrapper loaded OK.
// Returns True if the data apparently loaded OK and the report should be printed.
private bool LoadReportData(TRptCalculator ACalc)
{
ArrayList reportParam = ACalc.GetParameters().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.ContainsKey(p.name)))
{
paramsDictionary.Add(p.name, p.value);
}
}
String RootCostCentre = "[" + FLedgerNumber + "]";
paramsDictionary.Add("param_cost_centre_code", new TVariant(RootCostCentre));
DataTable ReportTable = TRemote.MReporting.WebConnectors.GetReportDataTable("TrialBalance", paramsDictionary);
if (ReportTable == null)
{
FPetraUtilsObject.WriteToStatusBar("Report Cancelled.");
return false;
}
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportTable, "TrialBalance");
//
// I need to get the name of the current ledger..
ALedgerTable LedgerTbl = TRemote.MFinance.AP.WebConnectors.GetLedgerInfo(FLedgerNumber);
String LedgerName = "";
Boolean IsClosed = false;
if (LedgerTbl.Rows.Count > 0)
{
ALedgerRow LedgerRow = LedgerTbl[0];
LedgerName = LedgerRow.LedgerName;
//
// I want to tell the user whether the selected period is closed
// (although they probably know already...)
Int32 SelPeriod = ACalc.GetParameters().GetParameter("param_end_period_i").value.ToInt32();
Int32 SelYear = ACalc.GetParameters().GetParameter("param_year_i").value.ToInt32();
if ((SelYear < LedgerRow.CurrentFinancialYear) || (SelPeriod < LedgerRow.CurrentPeriod))
{
IsClosed = true;
}
}
ACalc.AddStringParameter("param_ledger_name", LedgerName);
ACalc.AddParameter("param_period_closed", IsClosed);
return true;
}
示例9: LoadReportData
//
// This will be called if the Fast Reports Wrapper loaded OK.
// Returns True if the data apparently loaded OK and the report should be printed.
private bool LoadReportData(TRptCalculator ACalc)
{
ArrayList reportParam = ACalc.GetParameters().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.ContainsKey(p.name)))
{
paramsDictionary.Add(p.name, p.value);
}
}
DataTable ReportTable = TRemote.MReporting.WebConnectors.GetReportDataTable("TotalGiftsThroughField", paramsDictionary);
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportTable, "MonthlyGifts");
return true;
}
示例10: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
for (int Counter = 0; Counter <= MaxColumns; ++Counter)
{
String ColumnName = ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
if (ColumnName == "Total Gifts")
{
ACalc.AddParameter("param_gift_amount_column", Counter);
}
}
// this parameter is added incorrectly by the generated code
ACalc.RemoveParameter("param_minimum_amount");
ACalc.AddParameter("param_minimum_amount", this.txtMinimumAmount.NumberValueDecimal);
}
示例11: ReadControlsManual
//.........这里部分代码省略.........
Catalog.GetString("Gift Limit wrong."),
Catalog.GetString("Minimum Amount can't be greater than Maximum Amount."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
if (!dtpFromDate.ValidDate() || !dtpToDate.ValidDate())
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("Date format problem"),
Catalog.GetString("Please check the date entry."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
if ((cmbReportType.SelectedItem.ToString() == "Complete")
&& (dtpFromDate.Date > dtpToDate.Date))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("From date is later than to date."),
Catalog.GetString("Please change from date or to date."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
}
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
ACalc.AddParameter("param_donorkey", txtDonor.Text);
ACalc.AddParameter("param_extract_name", txtExtract.Text);
//TODO: Calendar vs Financial Date Handling - Confirm that these should not be ledger dates, i.e. allowing for >12 periods and non-calendar period boundaries
DateTime FromDateThisYear = new DateTime(DateTime.Today.Year, 1, 1);
DateTime ToDatePreviousYear = new DateTime(DateTime.Today.Year - 1, 12, 31);
DateTime FromDatePreviousYear = new DateTime(DateTime.Today.Year - 1, 1, 1);
ACalc.AddParameter("param_end_date_this_year", DateTime.Today);
ACalc.AddParameter("param_start_date_this_year", FromDateThisYear);
ACalc.AddParameter("param_end_date_previous_year", ToDatePreviousYear);
ACalc.AddParameter("param_start_date_previous_year", FromDatePreviousYear);
if (cmbReportType.SelectedItem.ToString() == "Totals")
{
DateTime FromDate = new DateTime(DateTime.Today.Year - 3, 1, 1);
ACalc.RemoveParameter("param_from_date");
ACalc.RemoveParameter("param_to_date");
ACalc.AddParameter("param_from_date", FromDate);
ACalc.AddParameter("param_to_date", DateTime.Today);
ACalc.AddParameter("Month0", 1);
ACalc.AddParameter("Month1", 2);
ACalc.AddParameter("Year0", DateTime.Today.Year);
ACalc.AddParameter("Year1", DateTime.Today.Year - 1);
ACalc.AddParameter("Year2", DateTime.Today.Year - 2);
ACalc.AddParameter("Year3", DateTime.Today.Year - 3);
int ColumnCounter = 0;
ACalc.AddParameter("param_calculation", "Month", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)3.0, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Year-0", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)2.0, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Count-0", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)0.8, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Year-1", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)2.0, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Count-1", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)0.8, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Year-2", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)2.0, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Count-2", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)0.8, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Year-3", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)2.0, ColumnCounter);
++ColumnCounter;
ACalc.AddParameter("param_calculation", "Count-3", ColumnCounter);
ACalc.AddParameter("ColumnWidth", (float)0.8, ColumnCounter);
++ColumnCounter;
ACalc.SetMaxDisplayColumns(ColumnCounter);
}
else
{
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
for (int Counter = 0; Counter <= MaxColumns; ++Counter)
{
String ColumnName = ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
if (ColumnName == "Gift Amount")
{
ACalc.AddParameter("param_gift_amount_column", Counter);
}
}
}
}
示例12: ReadLocalDataLabel
/// <summary>
/// Adds the selected columns to the calculation.
/// </summary>
/// <param name="ACalc"></param>
/// <param name="AReportAction"></param>
private void ReadLocalDataLabel(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
ACalc.AddParameter("param_label_type", "partner");
ACalc.AddParameter("param_labeluse", "Personnel");
// TODO: do we need to cater here for applications as well?
// ACalc.AddParameter("param_label_type", "application");
// ACalc.AddParameter("param_labeluse", "LongTermApp,ShortTermApp");
String SelectedColumns = "";
DataTable ColumnTable = ACalc.GetParameters().ToDataTable();
foreach (DataRow Row in ColumnTable.Rows)
{
if ((Row["name"].ToString() == "param_calculation")
&& (Row["level"].ToString() == "-1")
&& (Row["subreport"].ToString() == "-1")
&& (Row["value"].ToString().Contains("eString:")))
{
int ColumnIndex = Convert.ToInt32(Row["column"].ToString());
int Index = Row["value"].ToString().IndexOf("eString:");
String ColumnName = Row["value"].ToString().Substring(Index + 8);
if ((ColumnName == "Partner Key")
|| (ColumnName == "Partner Name"))
{
// don't add partner key and partner name because these are not data labels
continue;
}
if (ColumnName == "DataLabelColumn")
{
ColumnName = ACalc.GetParameters().Get("param_label", ColumnIndex, -1, eParameterFit.eExact).ToString();
}
SelectedColumns = SelectedColumns + ColumnName + ",";
double ColumnWidth = ACalc.GetParameters().Get("ColumnWidth", ColumnIndex, -1, eParameterFit.eExact).ToDouble();
ACalc.AddParameter("param_calculation", "DataLabelColumn", ColumnIndex);
ACalc.AddParameter("ColumnWidth", ColumnWidth, ColumnIndex);
ACalc.AddParameter("param_label", ColumnName, ColumnIndex);
}
}
if (SelectedColumns.Length > 0)
{
SelectedColumns.Substring(0, SelectedColumns.Length - 1);
}
ACalc.AddParameter("param_labels", SelectedColumns);
}
示例13: LoadReportData
private Boolean LoadReportData(TRptCalculator ACalc)
{
ArrayList reportParam = ACalc.GetParameters().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.ContainsKey(p.name))
{
paramsDictionary.Add(p.name, p.value);
}
}
// get data for this report
DataSet ReportDataSet = TRemote.MReporting.WebConnectors.GetRecipientGiftStatementDataSet(paramsDictionary);
if (TRemote.MReporting.WebConnectors.DataTableGenerationWasCancelled() || this.IsDisposed)
{
return false;
}
// if no recipients
if (ReportDataSet.Tables["Recipients"] == null)
{
FPetraUtilsObject.WriteToStatusBar("No recipients found for this report period.");
return false;
}
// register datatables with the report
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportDataSet.Tables["Recipients"], "Recipients");
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportDataSet.Tables["RecipientTotals"], "RecipientTotals");
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportDataSet.Tables["Donors"], "Donors");
FPetraUtilsObject.FFastReportsPlugin.RegisterData(ReportDataSet.Tables["DonorAddresses"], "DonorAddresses");
//
// My report doesn't need a ledger row - only the name of the ledger. And I need the currency formatter..
String LedgerName = TRemote.MFinance.Reporting.WebConnectors.GetLedgerName(FLedgerNumber);
ACalc.AddStringParameter("param_ledger_name", LedgerName);
ACalc.AddStringParameter("param_currency_formatter", "0,0.000");
Boolean HasData = ReportDataSet.Tables["Recipients"].Rows.Count > 0;
if (!HasData)
{
MessageBox.Show(Catalog.GetString(
"No Recipients found."), "Recipient Gift Statement");
}
return HasData;
}
示例14: ReadControlsManual
private void ReadControlsManual(TRptCalculator ACalc, TReportActionEnum AReportAction)
{
if ((AReportAction == TReportActionEnum.raGenerate)
&& rbtSelectedFields.Checked
&& (clbFields.GetCheckedStringList().Length == 0))
{
TVerificationResult VerificationMessage = new TVerificationResult(
Catalog.GetString("Please select at least one field."),
Catalog.GetString("No fields selected!"), TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationMessage);
}
if ((AReportAction == TReportActionEnum.raGenerate) && (rbtAllFields.Checked))
{
ACalc.AddParameter("param_clbFields", this.clbFields.GetAllStringList());
}
if ((AReportAction == TReportActionEnum.raGenerate)
&& (dtpFromDate.Date > dtpToDate.Date))
{
TVerificationResult VerificationResult = new TVerificationResult(
Catalog.GetString("From date is later than to date."),
Catalog.GetString("Please change from date or to date."),
TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationResult);
}
int Years = Convert.ToInt16(txtYears.Text);
if ((AReportAction == TReportActionEnum.raGenerate)
&& ((Years > 4) || (Years < 1)))
{
TVerificationResult VerificationMessage = new TVerificationResult(
Catalog.GetString("Set the year range between 1 and 4"),
Catalog.GetString("Wrong year range entered"), TResultSeverity.Resv_Critical);
FPetraUtilsObject.AddVerificationResult(VerificationMessage);
}
ACalc.AddParameter("param_ledger_number_i", FLedgerNumber);
ACalc.AddParameter("Year0", DateTime.Today.Year);
ACalc.AddParameter("Year1", DateTime.Today.Year - 1);
ACalc.AddParameter("Year2", DateTime.Today.Year - 2);
ACalc.AddParameter("Year3", DateTime.Today.Year - 3);
int MaxColumns = ACalc.GetParameters().Get("MaxDisplayColumns").ToInt();
for (int Counter = 0; Counter <= MaxColumns; ++Counter)
{
String ColumnName = ACalc.GetParameters().Get("param_calculation", Counter, 0).ToString();
if (ColumnName == "Gift Amount")
{
ACalc.AddParameter("param_gift_amount_column", Counter);
}
}
}
示例15: PreviewDetailReport
/// <summary>
///
/// </summary>
/// <param name="ACalculator"></param>
protected void PreviewDetailReport(TRptCalculator ACalculator)
{
TFrmPrintPreview printWindow;
// show a print window with all kinds of output options
printWindow = new TFrmPrintPreview(this, ACalculator.GetParameters().Get("currentReport").ToString(),
ACalculator.GetDuration(), ACalculator.GetResults(
), ACalculator.GetParameters(), FWrapColumn, ACalculator);
this.AddOwnedForm(printWindow);
printWindow.Owner = this;
// printWindow.SetPrintChartProcedure(GenerateChart);
printWindow.ShowDialog();
// EnableDisableToolbar(true);
}