Using functions in calling program
I have a function that is called in the OnGetdataText event of my grid to apply a timezone offset to a unix date depending upon the timezone setting of my program
Can I call this function (in my calling program) from a FastReport script?
Can I call this function (in my calling program) from a FastReport script?
Comments
http://www.fast-report.com/en/documentatio...he%20report.htm
I want to code a user function as per the custom functions chapter - I have the following code but when I compile I get
[bcc32 Error] Unit1.cpp(11787): E2247 '_fastcall operator Variant::[](const int)' is not accessible
Full parser context
Unit1.cpp(11785): parsing: Variant _fastcall TForm1::frxReport1UserFunction(const UnicodeString,Variant &)
Any ideas as to how I pass the parameter to my function in C ?
Thanks
String TForm1::MyFunc(int d)
{
// relevant code
}
Variant __fastcall TForm1::frxReport1UserFunction(const UnicodeString MethodName,
Variant &Params)
{
if(MethodName =="MYFUNC")
return MyFunc(Params[0]);
}
//
Both the examples below give a script error when I PrepareReport
frxReport1->AddFunction("function String MyFunc(int d)", "My Functions", "returns a value");
I also tried the line below
frxReport1->AddFunction("function MyFunc(int d) : String", "My Functions", "returns a value");