could not convert variant of type (null) into type (olestr)
In FastReport VCL 5 this work's, but in FastReport VCL 6 return the title error:
var
V: string
begin
V := Report.Variables.Variables('Name');
end.
In FastReport VCL 5 this work's, but in FastReport VCL 6 return the title error:
var
V: string
begin
V := Report.Variables.Variables('Name');
end.
Comments
G'day Daniel,
What action do you want to take if Variables ['Name'] is Null? If you want the variable "V" to be set to an Empty String, you should code for that. 😉
with Report.Variables do begin
if IsNull (Variables('Name')) then
V := EmptyStr // replace by whatever action you require
else
V := Variables('Name');
end;
This is not really a FastReport problem but an outcome of mixing Variants and Strings...
Cheers, Paul