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?

Comments

  • SamuraySamuray Administrator
    edited 2:20AM
    See this code as example:
    TfrView *obj = frReport1->FindObject("Memo1");
    obj->FillColor = clRed;
  • edited 2:20AM
    thanks
    but it still error,why?

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.