Undeclared identifier

I am trying to add a custom function and get the below error when I preview the report

Undeclared identifier: 'ReturnAnInt'


I can see what I might be doing wrong - any ideas?


The function is added in my program a

frxReport1->AddFunction("function int ReturnAnInt()", "My Functions", "converts integer to date time string");
frxReport1->DesignReport(true, false); // just for testing


and...

Variant __fastcall TForm1::frxReport1UserFunction(const UnicodeString MethodName,
Variant &Params)
{
return 12345; // debugging code
}


finally the script within my FR report is

void frxDBDataset1createdOnBeforePrint(TfrxComponent Sender)
{
IntToStr(ReturnAnInt();
}



Comments

  • gpigpi
    edited 8:07AM
    Use frxReport1->AddFunction("function ReturnAnInt: integer", "My Functions", "converts integer to date time string");

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.