Memo
How to create Memo object from code on existing report ?
Page orientation works grat, but how to create new object memo ?
I tried this code below but not working [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> var Page : TfrxReportPage; Memo: TfrxMemoView; begin Page := TfrxReportPage(report.Pages[1]); Page.Orientation := poLandscape; Memo := TfrxMemoView(Page); Memo.Create(nil); Memo.Text := 'test'; end;[/img]
Page orientation works grat, but how to create new object memo ?
I tried this code below but not working [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> var Page : TfrxReportPage; Memo: TfrxMemoView; begin Page := TfrxReportPage(report.Pages[1]); Page.Orientation := poLandscape; Memo := TfrxMemoView(Page); Memo.Create(nil); Memo.Text := 'test'; end;[/img]
Comments
if you are trying to work with a report stored in dfm or stored in a file
you must use the findobject method to get the design page first, then create the memo in the context of the page.
Also, if you are working with a report stored in a file you must loadfromfile first.