IsSubReport access violation

edited 5:03PM in FastReport 4.0
I have a report with a child band, wherein there is a subreport with a single masterband.

I create it like this:
  SubReport := TfrxSubReport.Create(ChildBand);
  SubReport.Left := CurrentPosX;
  SubReport.Top := CurrentPosY;
  Result := TfrxMasterData.Create(SubReport);

But when the report builds, I get an access violation on TfrxReportPage.IsSubReport, and it is regardless of whether I create the SubReport with the Band or the Page as its parent. The function is called a few times when I make a breakpoint there, but it crashes once RunPage() is called with nil.

Is there anything I need to specifically when I create the SubReport or what?

On that note; can I give a DataBand (e.g. master/detail/etc.) two header bands? I tried giving a Header a Child and force it to appear above, but it did not work, in fact the entire detail band with its two headers did not appear.

I am also having trouble with SubdetailData that won't appear at all.

Do note: I do not use the GUI, and my reports are purely built up from code.

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.