Aggregate function at runtime
Hi, i'm trying to set an aggregate function in c++ builder xe5 code, i'm doing this:
memo = dynamic_cast<TfrxMemoView *> (frxReport1->FindObject("Memo5"));
memo->Text = "[Sum(<Group.\"Total\">, MasterData1, 1)]";
Memo5 is on a GroupFooter band, but when I run the app and try to generate the report it shows the next message:
Access violation at address 00FB3D34 in module 'fs19.bpl'. Read of address 00000000
I'm using Fast Report 4 Embarcadero Version (the one that comes with XE5 version) and generating a sql query using FireDAC
any suggestion?
memo = dynamic_cast<TfrxMemoView *> (frxReport1->FindObject("Memo5"));
memo->Text = "[Sum(<Group.\"Total\">, MasterData1, 1)]";
Memo5 is on a GroupFooter band, but when I run the app and try to generate the report it shows the next message:
Access violation at address 00FB3D34 in module 'fs19.bpl'. Read of address 00000000
I'm using Fast Report 4 Embarcadero Version (the one that comes with XE5 version) and generating a sql query using FireDAC
any suggestion?
Comments
i am not a c programmer but try using
memo->memo->Text = "[Sum(<Group.\"Total\">, MasterData1, 1)]"
if that fails try using a call to designreport temporarilly to see what is placed in the memoview
you may have some string delimiters stripped
I have the same problem ,have you find a solution please ???
Where are you writing this code ?
another tip place the value you are trying to enter by code
in the memo and see if the report runs as expected.
if it does then you are probably missing string delimiters or you are
writing the code in the wrong place
you must do it when the report is first loaded NOT in the onbeforeprint event