Class ReportRuntime
Runtime for the payroll report function
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Runtime.Api
Assembly: PayrollEngine.Client.Services.dll
Syntax
public abstract class ReportRuntime : RuntimeBase, IReportRuntime, IRuntime
Constructors
View SourceReportRuntime(PayrollHttpClient, int, int, ReportSet, ReportRequest)
Initializes a new instance of the PayrollRuntime class
Declaration
protected ReportRuntime(PayrollHttpClient httpClient, int tenantId, int userId, ReportSet report, ReportRequest reportRequest)
Parameters
| Type | Name | Description |
|---|---|---|
| PayrollHttpClient | httpClient | The Payroll http client |
| int | tenantId | The tenant id |
| int | userId | The user id |
| ReportSet | report | The report |
| ReportRequest | reportRequest | The report request |
Properties
View SourceLogOwner
The log owner type
Declaration
protected override string LogOwner { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
View SourcePayrollService
The payroll service
Declaration
protected IPayrollService PayrollService { get; }
Property Value
| Type | Description |
|---|---|
| IPayrollService |
Report
The report
Declaration
protected ReportSet Report { get; }
Property Value
| Type | Description |
|---|---|
| ReportSet |
ReportName
Gets the report name
Declaration
public string ReportName { get; }
Property Value
| Type | Description |
|---|---|
| string |
ReportRequest
The report request
Declaration
protected ReportRequest ReportRequest { get; }
Property Value
| Type | Description |
|---|---|
| ReportRequest |
UserCulture
The culture by priority: report request > tenant > system
Declaration
public override string UserCulture { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
View SourceAddReportLog(string, string, DateTime?)
Add report log
Declaration
public void AddReportLog(string message, string key = null, DateTime? reportDate = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The log message |
| string | key | The log key |
| DateTime? | reportDate | The report date (default: now) |
ExecuteCollectorCustomResultQuery(string, int, int, Tuple<int?, string, string, string, long?, long?>)
Execute a collector custom result query on the Api web method
Declaration
public DataTable ExecuteCollectorCustomResultQuery(string tableName, int payrollResultId, int collectorResultId, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| int | payrollResultId | The payroll result id |
| int | collectorResultId | The collector result id |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteCollectorResultQuery(string, int, Tuple<int?, string, string, string, long?, long?>)
Execute a collector result query on the Api web method
Declaration
public DataTable ExecuteCollectorResultQuery(string tableName, int payrollResultId, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| int | payrollResultId | The payroll result id |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteCompanyCaseValueQuery(string, Tuple<int?, string, string, string, long?, long?>)
Execute company case value query on the Api web method
Declaration
public DataTable ExecuteCompanyCaseValueQuery(string tableName, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteConsolidatedQuery(string, string, string, string, Dictionary<string, string>)
Executes a query across all provider tenants that have granted Consolidation permission to the current tenant via regulation sharing. For each share, the query is executed with the provider tenant's id and the results are merged into a single table. Use this in ReportEndFunction scripts to aggregate cross-tenant payroll results. Example: collecting COM-normalized results from NL and BE tenants into one table.
Declaration
public DataTable ExecuteConsolidatedQuery(string tableName, string methodName, string culture, string mergeColumn, Dictionary<string, string> parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name for the merged result |
| string | methodName | The API query method name (e.g. QueryPayrollResultValues) |
| string | culture | The content culture |
| string | mergeColumn | Column used as primary key for merging — must be unique across all tenants |
| Dictionary<string, string> | parameters | Base query parameters; TenantId is overridden per share iteration |
Returns
| Type | Description |
|---|---|
| DataTable | Merged data table containing rows from all provider tenants, empty table when no shares exist |
ExecuteEmployeeCaseValueQuery(string, int, Tuple<int?, string, string, string, long?, long?>)
Execute employee case value query on the Api web method
Declaration
public DataTable ExecuteEmployeeCaseValueQuery(string tableName, int employeeId, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| int | employeeId | The employee id |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteGlobalCaseValueQuery(string, Tuple<int?, string, string, string, long?, long?>)
Execute global case value query on the Api web method
Declaration
public DataTable ExecuteGlobalCaseValueQuery(string tableName, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteLookupValueQuery(int, string, string, string)
Query Json lookup values by lookup name
Declaration
public Dictionary<string, string> ExecuteLookupValueQuery(int regulationId, string lookupName, string keyAttribute, string valueAttribute)
Parameters
| Type | Name | Description |
|---|---|---|
| int | regulationId | The regulation id |
| string | lookupName | The lookup name |
| string | keyAttribute | The json object key attribute name |
| string | valueAttribute | The json object value attribute name |
Returns
| Type | Description |
|---|---|
| Dictionary<string, string> | The lookup values dictionary |
ExecuteNationalCaseValueQuery(string, Tuple<int?, string, string, string, long?, long?>)
Execute national case value query on the Api web method
Declaration
public DataTable ExecuteNationalCaseValueQuery(string tableName, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecutePayrollResultQuery(string, Tuple<int?, string, string, string, long?, long?>)
Execute a payroll result query on the Api web method
Declaration
public DataTable ExecutePayrollResultQuery(string tableName, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecutePayrunResultQuery(string, int, Tuple<int?, string, string, string, long?, long?>)
Execute a payrun result query on the Api web method
Declaration
public DataTable ExecutePayrunResultQuery(string tableName, int payrollResultId, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| int | payrollResultId | The payroll result id |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteQuery(string, string, string, Dictionary<string, string>)
Execute a query on the Api web method
Declaration
public virtual DataTable ExecuteQuery(string tableName, string methodName, string culture, Dictionary<string, string> parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| string | methodName | The query name |
| string | culture | The content culture |
| Dictionary<string, string> | parameters | The method parameters |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteWageTypeCustomResultQuery(string, int, int, Tuple<int?, string, string, string, long?, long?>)
Execute a wage type custom result query on the Api web method
Declaration
public DataTable ExecuteWageTypeCustomResultQuery(string tableName, int payrollResultId, int wageTypeResultId, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| int | payrollResultId | The payroll result id |
| int | wageTypeResultId | The wage type result id |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteWageTypeQuery(string, int, Tuple<int?, string, string, string, long?, long?>)
Execute a wage type query on the Api web method
Declaration
public DataTable ExecuteWageTypeQuery(string tableName, int regulationId, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| int | regulationId | The regulation id |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
ExecuteWageTypeResultQuery(string, int, Tuple<int?, string, string, string, long?, long?>)
Execute a wage type result query on the Api web method
Declaration
public DataTable ExecuteWageTypeResultQuery(string tableName, int payrollResultId, Tuple<int?, string, string, string, long?, long?> queryValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Target table name |
| int | payrollResultId | The payroll result id |
| Tuple<int?, string, string, string, long?, long?> | queryValues | The query |
Returns
| Type | Description |
|---|---|
| DataTable | Resulting data table, existing will be removed |
GetParameter(string)
Get report parameter
Declaration
public string GetParameter(string parameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name |
Returns
| Type | Description |
|---|---|
| string | The report parameter value as JSON |
GetParameterAttribute(string, string)
Get report parameter attribute value
Declaration
public object GetParameterAttribute(string parameterName, string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name |
| string | attributeName | Name of the attribute |
Returns
| Type | Description |
|---|---|
| object | The report attribute value |
GetReportAttribute(string)
Get report attribute value
Declaration
public object GetReportAttribute(string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attributeName | Name of the attribute |
Returns
| Type | Description |
|---|---|
| object | The report attribute value |
HasParameter(string)
Check for existing report parameter
Declaration
public bool HasParameter(string parameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name |
Returns
| Type | Description |
|---|---|
| bool |
ParameterHidden(string)
Test for hidden report parameter
Declaration
public bool ParameterHidden(string parameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name |
Returns
| Type | Description |
|---|---|
| bool | True for hidden report attribute |
SetParameterAttribute(string, string, object)
Set report attribute value
Declaration
public void SetParameterAttribute(string parameterName, string attributeName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name |
| string | attributeName | Name of the attribute |
| object | value | The attribute value |
SetParameterInternal(string, string)
Set the report parameter
Declaration
protected void SetParameterInternal(string parameterName, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | Name of the parameter |
| string | value | The parameter value |
SetReportAttribute(string, object)
Set report attribute value
Declaration
public void SetReportAttribute(string attributeName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attributeName | Name of the attribute |
| object | value | Attribute value |