Multi Columns Report
I want to ask about multi columns report in fastreport.net. I have one report with grouping (with start new page property set to true). The thing is that although I set the start new page to true for the group header but at the second column appear another group data so the total number of pages becomes halved of the number of the group (2 group data in one page). How can I set the report so it will only show the data of the group and leave the second column blank if there is not enough data to cross to the second column. I've tried using support in fast-report.com by email and ticket but there is no reply at all. I tried asking it in stackoverflow with no luck too, please help me I've tried everything I can think of but not working
This discussion has been closed.
Comments
Hello!
To ensure that each group always starts on a new physical page and that the second column remains empty when there isn't enough data, we recommend moving the column layout from the page to the DataBand:
In the page properties (ReportPage), set Columns.Count = 1.
In the DataBand properties, set Columns.Count = 2 and select the appropriate fill order for Columns.Layout (ColumnLayout.DownThenAcross or ColumnLayout.AcrossThenDown).
For the GroupHeaderBand, leave StartNewPage = true.
Example configuration using C# code:
If you need to keep the columns at the ReportPage level, set GroupHeaderBand.StartNewPage to false and, for all groups except the first one, force the group header to advance to the first column of the new page in the BeforePrint event:
private bool isFirstGroup = true; private void GroupHeader1_BeforePrint(object sender, EventArgs e) { if (isFirstGroup) { isFirstGroup = false; return; } Engine.StartNewPage(); while (Engine.CurColumn > 0) Engine.StartNewPage(); }