procedure SetValueWithoutDeletion(SL: TStringList; const Name, Value: TRVUnicodeString);
var
I: Integer;
begin
I := SL.IndexOfName(Name);
if I < 0 then
SL.Add(Name + '=' + Value)
else
SL.Strings[I] := Name + '=' + Value;
end;
When do you call this script?
The variable is not assigned before the first call of "set".
You can initialize it in the script that is called before report generation:
Sergey Tkachenko wrote: ↑Fri May 12, 2023 1:18 pm
When do you call this script?
The variable is not assigned before the first call of "set".
You can initialize it in the script that is called before report generation:
Initializing the variable (rvrsOnStart or RVReportGenerator.Variables.Add) resolved the issue.
I add scripts in TRVReportTableItemInfo.RowGenerationRules.
PS: If the script is added to rvrsBeforeRecord, it is not necessary to initialize the variable. If I add to rvrsAfterRecord, I need to initialize the variable as you demonstrated.
Ceprotec wrote: ↑Fri May 12, 2023 2:08 pmPS: If the script is added to rvrsBeforeRecord, it is not necessary to initialize the variable. If I add to rvrsAfterRecord, I need to initialize the variable as you demonstrated.
As expected. If a variable is defined in the script, and If the script is called after processing a record, this variable is not defined when processing the first record.
In the beginning of June.
I want to add a couple of features (multi-format Linux clipboard with FMXLinux 1.74, and starting value for markdown lists), but I am implementing it in background, because currently I am focusing on RVMedia.