Passing Parameter to Query in FastReport Script

edited 11:36PM in FastReport VCL 5
I've searched all over and tried many approaches but can't get this to work. I run a query in a FR script and need to pass a parameter. I get the error "Could not convert variant of type (Array Variant) into type (Ole String)." Here is my code;
In the Delphi program I have:

var
tmp : string:
begin
tmp := 'ABC123';
Fastreport1.Script.Variables[Tracking'] := tmp;

I also tried-
var
V : variant;
tmp :string;
begin
tmp := 'ABC123';
V := tmp;
Fastreport1.Script.Variables := V;

and I tried
var
tmp : string;
begin
tmp := 'ABC123';
Fastreport1.Script.Variables := quotedstr(tmp);

in the Fastreport query
parameters editor
Name = Tnumber
DataType = string
Value = [Tracking]

I would appreciate any assistance
thank you

Leave a Comment