SetFuncName(Value: String);
Value. Function name.
The SetFuncName method sets function name in instance of the error which appears on writing the function without parameters and brackets in the table cell.
If any function with arguments is written in the table cell without brackets and arguments (), corresponding messages about error are displayed:
To call the <function name> function, at least one parameter is needed.
Not all mandatory parameters of <function name> are defined.
The method allows to change function name.
Executing the example requires a regular report with connected unit, SET_FUNC_NAME is the unit identifier. One of report cells contains text set as hyperlink. Clicking the hyperlink sets the Run Procedure/Function action. Determine Test as procedure or function.
Add the Tab system assembly.
Sub RaiseExceptionRequiredParams(Value: String);
Var
Ex: ITabRequiredParametersException;
Begin
Ex := New TabRequiredParametersException.CreateEx;
Ex.SetFuncName(Value);
Raise Ex;
End Sub RaiseExceptionRequiredParams;
Public Function Test: Variant;
Begin
RaiseExceptionRequiredParams("NewFunction");
Return "";
End Function Test;
This example is a macro for a regular report. On macro executing, regular report will display message with error containing the text: To call the NewFunction function it is required to have at least one parameter. That is, new function name is given on throwing an exception.
See also: