Access FastReort's object
I want to modify fastreport's object property at runtime, there is a object named MemoYear and it's type is TfrMemoView in my designed report, so I coded it follow:
TfrMemoView *lMemoYear = new TfrMemoView();
lMemoYear = dynamic_cast<TfrMemoView *>(fr_Report->FindObject("MemoYear"));
if( lMemoYear != NULL )
lMemoYear->Memo->Text = "2003";
lMemoYear always null,why?
TfrMemoView *lMemoYear = new TfrMemoView();
lMemoYear = dynamic_cast<TfrMemoView *>(fr_Report->FindObject("MemoYear"));
if( lMemoYear != NULL )
lMemoYear->Memo->Text = "2003";
lMemoYear always null,why?
Comments
TfrView *obj = frReport1->FindObject("Memo1");
obj->FillColor = clRed;
but it still error,why?