Godfrey if you look at the report in design mode either 1 from flex label2c
you will find a bit of code in one of the memos scripts, (the last one placed in the band)
moved := ufmoverec([lprinted]);
moved is a variable it will contain the result sent back from delphi of the value passed out through the userfunction ufmoverec(p1,p2,p3);
when ever fast report finds an unknownname() folloed by brackets it triggers the on user function event of the report component itself.
in this case we pass out the value of [lprinted] to delphi then in delphi
procedure TForm1.frReport1UserFunction(const Name: String; p1, p2,
p3: Variant; var Val: Variant);
var
s:integer;
begin
if AnsiCompareText(Name, 'ufmoverec') = 0 then
begin
s:= frparser.calc(p1); // gets valu of lprinted passed in p1
if s = spinedit2.Value then // if vals match
begin
if not Query1.Eof then Query1.Next; //and not at end of file move next record
val:= true;//return to fr's moved variable
end
else
val:= false;// or return to fr's moved variable
end;
// could add more user functions here
end;
// when using Ansi compare text(NAME,'string') be careful it is case sensitive
// the name used in 'string' must be exactly as it was in fr
// ie 'Ufmoverec' and 'ufmoverec' would be two different functions
and that might be your problem.
regards