Class ReportBuildFunction
Report build function
Implements
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Function
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class ReportBuildFunction : ReportFunction, IDisposable
Constructors
ReportBuildFunction(object)
Initializes a new instance with the function runtime
Declaration
public ReportBuildFunction(object runtime)
Parameters
| Type | Name | Description |
|---|---|---|
| object | runtime | The runtime |
ReportBuildFunction(string)
New function instance without runtime (scripting development)
Declaration
public ReportBuildFunction(string sourceFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sourceFileName | The name of the source file |
Methods
Build()
Entry point for the runtime
Declaration
public bool? Build()
Returns
| Type | Description |
|---|---|
| bool? |
Remarks
Internal usage only, do not call this method
BuildInputList(DataTable, string, Func<DataRow, object>, Func<DataRow, string>, Func<List<object>, object>)
Build report parameter input list
Declaration
public List<object> BuildInputList(DataTable table, string reportParameter, Func<DataRow, object> identifierFunc, Func<DataRow, string> displayFunc = null, Func<List<object>, object> selectFunc = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataTable | table | List data table |
| string | reportParameter | Report parameter name |
| Func<DataRow, object> | identifierFunc | Identifier function |
| Func<DataRow, string> | displayFunc | Display function: return null to use the identifier for display |
| Func<List<object>, object> | selectFunc | Selection function: return the selected identifier or null |
Returns
| Type | Description |
|---|---|
| List<object> | List of identifiers, selected by the identifier function |
Remarks
Use the query order-by for sorting
BuildInvalid()
Set report build to invalid
Declaration
public void BuildInvalid()
BuildValid()
Set report build to valid
Declaration
public void BuildValid()
BuildValidity(bool)
Set report build validity
Declaration
public void BuildValidity(bool valid)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | valid | Build validity |
ExecuteInputListQuery(string, Dictionary<string, string>, string, Func<DataRow, object>, Func<DataRow, string>, Func<List<object>, object>)
Build report parameter input list based on query
Declaration
public List<object> ExecuteInputListQuery(string queryMethod, Dictionary<string, string> queryParameters, string reportParameter, Func<DataRow, object> identifierFunc, Func<DataRow, string> displayFunc = null, Func<List<object>, object> selectFunc = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | queryMethod | Query method name |
| Dictionary<string, string> | queryParameters | Query parameters |
| string | reportParameter | Report parameter name |
| Func<DataRow, object> | identifierFunc | Identifier function |
| Func<DataRow, string> | displayFunc | Display function: return null to use the identifier for display |
| Func<List<object>, object> | selectFunc | Selection function: return the selected identifier or null |
Returns
| Type | Description |
|---|---|
| List<object> | List of identifiers, selected by the identifier function |
Remarks
Use the query order-by for sorting
HideParameter(params string[])
Hide report parameter
Declaration
public void HideParameter(params string[] parameterNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | parameterNames | The parameter name |
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 |
SetParameterHidden(string, bool)
Set the report parameter hidden state
Declaration
public void SetParameterHidden(string parameterName, bool hidden)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name |
| bool | hidden | The hidden state |
SetParameterReadOnly(string, bool)
Set the report parameter read-only state
Declaration
public void SetParameterReadOnly(string parameterName, bool readOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name |
| bool | readOnly | The read-only state |
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 |
ShowParameter(params string[])
Show report parameters
Declaration
public void ShowParameter(params string[] parameterNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | parameterNames | The parameter names |