Page breaks for TfrxMemoView
My report has TfrxMasterData with TfrxMemoView inside. Report source is several hundreds lines of plain text, but requires page break between different sections. Report is filled before ShowReport by TfrxMemoView(frxRep.FindObject('Memo1')).Text := aList.Text;
Adding [#13#10] or [Chr(13)] like directives to source does not create page breaks. How to force page breaks in TfrxMemoView code?
Comments
According to FR Support, there is no such a feature.
I managed to do it via MasterData bands. Report has one PageHeader, one PageFooter and 10 MasterData bands in between. Each MasterData has a single MemoView and OnBeforePrint event like:
if (memoXX.Lines.Count > 0) then Engine.NewPage;
Reportdata sections are inserted to memoXX Views according to section number. This works well since I have max 10 sections in my reports. Now each section starts a new page and if there is only one section, those nine empty ones are not shown or used. MasterData has property StartNewPage but that does not make any difference.
In case report has more than 10 sections, rest of them are added to the last MasterData.