Show / Hide Table of Contents

Class ReportStartFunction

Executes at the start of report data collection, after parameters are finalized and before the data set is assembled.

Inheritance
object
Function
ReportFunction
ReportStartFunction
Implements
IDisposable
Inherited Members
ReportFunction.GetReportAttribute(string)
ReportFunction.GetReportAttribute<T>(string, T)
ReportFunction.SetReportAttribute(string, object)
ReportFunction.HasParameter(string)
ReportFunction.GetParameter(string)
ReportFunction.GetParameter<T>(string, T)
ReportFunction.GetParameterAttribute(string, string)
ReportFunction.GetParameterAttribute<T>(string, string, T)
ReportFunction.SetParameterAttribute(string, string, object)
ReportFunction.ParameterHidden(string)
ReportFunction.AddReportLog(string, string, DateTime?)
ReportFunction.ToReportMessage(string)
ReportFunction.ExecuteQuery(string, string, Dictionary<string, string>)
ReportFunction.ExecuteQuery(string, string, string, Dictionary<string, string>)
ReportFunction.ExecuteQuery(string, Dictionary<string, string>)
ReportFunction.ExecuteDivisionQuery(int)
ReportFunction.ExecutePayrollDivisionIdQuery(int)
ReportFunction.ExecutePayrollDivisionQuery(int)
ReportFunction.ExecuteLookupValueQuery(int, string, string, string)
ReportFunction.ExecuteGlobalCaseValueQuery(string, ReportQuery)
ReportFunction.ExecuteNationalCaseValueQuery(string, ReportQuery)
ReportFunction.ExecuteCompanyCaseValueQuery(string, ReportQuery)
ReportFunction.ExecuteEmployeeCaseValueQuery(string, int, ReportQuery)
ReportFunction.ExecuteWageTypeQuery(string, int, ReportQuery)
ReportFunction.ExecutePayrollResultQuery(string, ReportQuery)
ReportFunction.ExecuteWageTypeResultQuery(string, int, ReportQuery)
ReportFunction.ExecuteWageTypeCustomResultQuery(string, int, int, ReportQuery)
ReportFunction.ExecuteCollectorResultQuery(string, int, ReportQuery)
ReportFunction.ExecuteCollectorCustomResultQuery(string, int, int, ReportQuery)
ReportFunction.ExecutePayrunResultQuery(string, int, ReportQuery)
ReportFunction.GetOperationBaseName(string)
ReportFunction.ExecuteValueQuery<T>(string, string, Dictionary<string, string>)
ReportFunction.ExecuteValueQuery<T>(string, string, Dictionary<string, string>, T)
ReportFunction.ExecuteLookupQuery(int, string, string, DateTime?, DateTime?)
ReportFunction.ExecuteLookupQuery(int, IEnumerable<string>, string, DateTime?, DateTime?)
ReportFunction.ExecuteCaseFieldQuery(int, IEnumerable<string>, string, DateTime?, DateTime?)
ReportFunction.ExecuteEmployeeTimeCaseValueQuery(string, int, IEnumerable<int>, IEnumerable<CaseValueColumn>, string, DateTime?, DateTime?, DateTime?)
ReportFunction.ExecuteRawCaseValueQuery(string, int, IEnumerable<string>, DatePeriod, DateTime?, DateTime?)
ReportFunction.ExecuteRawCaseValueQuery(string, int, int, IEnumerable<string>, DatePeriod, DateTime?, DateTime?)
ReportFunction.ExecuteRawCaseValueQuery(string, int, IEnumerable<string>, DateTime?, DateTime?, DateTime?, DateTime?)
ReportFunction.ExecuteRawCaseValueQuery(string, int, int, IEnumerable<string>, DateTime?, DateTime?, DateTime?, DateTime?)
ReportFunction.ResolveParameterUserId()
ReportFunction.ResolveParameterEmployeeId()
ReportFunction.ResolveParameterRegulationId()
ReportFunction.ResolveParameterPayrollId()
ReportFunction.ResolveParameterPayrunId()
ReportFunction.ResolveIdentifierParameter(string, string)
ReportFunction.ResolveNameParameter(string, string)
ReportFunction.AddInfo(string, object)
ReportFunction.RemoveInfo(string)
ReportFunction.ReportName
Function.GetTenantAttribute(string)
Function.GetTenantAttribute<T>(string, T)
Function.GetUserAttribute(string)
Function.GetUserAttribute<T>(string, T)
Function.GetDerivedCulture(int, int)
Function.GetDerivedCalendar(int, int)
Function.GetCalendarDayCount(DateTime, DateTime, string)
Function.GetCalendarDayCount(string, DateTime, DateTime, string)
Function.IsCalendarWorkDay(string, DateTime?)
Function.IsCalendarWorkDay(DateTime?)
Function.GetPreviousWorkDay(string, DateTime?)
Function.GetPreviousWorkDays(string, DateTime?, int)
Function.GetNextWorkDay(string, DateTime?)
Function.GetNextWorkDays(string, DateTime?, int)
Function.GetCalendarPeriod(DateTime?, int, int, int)
Function.GetCalendarPeriod(string, DateTime?, int, string)
Function.LogVerbose(string, string, string)
Function.LogDebug(string, string, string)
Function.LogInformation(string, string, string)
Function.LogWarning(string, string, string)
Function.LogError(string, string, string)
Function.LogError(Exception, string, string)
Function.LogFatal(string, string, string)
Function.LogFatal(Exception, string, string)
Function.Log(LogLevel, string, string, string)
Function.AddTask(string, string, DateTime, string, Dictionary<string, object>)
Function.InvokeWebhook<T>(string, object)
Function.GetSourceFileName(string)
Function.ChangeValueType<T>(object, T, IFormatProvider)
Function.Dispose()
Function.Runtime
Function.TenantId
Function.TenantIdentifier
Function.UserId
Function.UserIdentifier
Function.UserCulture
Function.UserType
Function.SelfServiceUser
Function.AdminUser
Function.SourceFileName
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Scripting.Function
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class ReportStartFunction : ReportFunction, IDisposable
Remarks

This function runs once per report execution, after ReportBuildFunction has configured the parameters and the user has confirmed the inputs. It is the primary hook for overriding parameter values programmatically and registering custom query strings that the report engine will use when populating the data set.

Typical uses:

  • Derive or override parameter values based on other parameters (SetParameter<T>(string, T)).
  • Register custom query strings via SetQuery(string, string) so the engine uses them when populating the data set tables.
  • Validate parameter combinations and abort execution by returning false.

Return value: Return null to proceed with data assembly. Return false to abort the report before any data is fetched.

For parameter form setup see ReportBuildFunction. For post-processing the assembled data set see ReportEndFunction.

Examples
// Resolve a payroll id from the parameter and store the division for downstream use
var payrollId = ResolveParameterPayrollId() ?? 0;
var divisionId = ExecutePayrollDivisionIdQuery(payrollId);
SetParameter("DivisionId", divisionId);

Constructors

View Source

ReportStartFunction(object)

Initializes a new instance with the function runtime

Declaration
public ReportStartFunction(object runtime)
Parameters
Type Name Description
object runtime

The runtime

View Source

ReportStartFunction(string)

New function instance without runtime (scripting development)

Declaration
public ReportStartFunction(string sourceFileName)
Parameters
Type Name Description
string sourceFileName

The name of the source file

Methods

View Source

GetQuery(string)

Get report query

Declaration
public string GetQuery(string queryName)
Parameters
Type Name Description
string queryName

The query name

Returns
Type Description
string

The report parameter value as JSON

View Source

HasQuery(string)

Check for existing report query

Declaration
public bool HasQuery(string queryName)
Parameters
Type Name Description
string queryName

The query name

Returns
Type Description
bool
View Source

SetParameter(string, string)

Set report parameter value

Declaration
public void SetParameter(string parameterName, string value)
Parameters
Type Name Description
string parameterName

The parameter name

string value

The parameter value as JSON

View Source

SetParameter<T>(string, T)

Set report parameter typed value

Declaration
public void SetParameter<T>(string parameterName, T value)
Parameters
Type Name Description
string parameterName

The parameter name

T value

The default value

Type Parameters
Name Description
T
View Source

SetQuery(string, string)

Set report query value as JSON

Declaration
public void SetQuery(string queryName, string value)
Parameters
Type Name Description
string queryName

The query name

string value

The query value as JSON

View Source

Start()

Entry point for the runtime

Declaration
public object Start()
Returns
Type Description
object
Remarks

Internal usage only, do not call this method

Implements

IDisposable

Extension Methods

ConsoleExtensions.WriteProperties(object, bool)
ValueTypeExtensions.GetValueType(object)
ObjectInfo.GetPropertyValue(object, string)
ObjectInfo.GetPropertyValue<T>(object, string, T)
ObjectInfo.ResolvePropertyValue(object, string)
ObjectInfo.SetPropertyValue(object, string, object)

See Also

ReportBuildFunction
ReportEndFunction
  • View Source
☀
☾
Back to top Generated by DocFX