Bug 153488 Page Break - Page breaks are created for groups automatically
In the latest build, engine alyways creats a page break before the outermost group. Issues: 1) If i add a group with company logo and header, followed by a table (with groups). The output is confusing, a page break occurs between the grid and table. A better solution would be page break occurs before each group, except the first group. Current behavior PageBreakBefore = Always Better solution would be PageBreakBefore = Always but first 2) Looks like engine is automatically putting page breaks for groups. But when I click on the group definition i see the following values. PageBreakBefore - Auto PageBreakAfter - Auto // Auto means inserts a page break before the element if necesary. Suggested solution - When user click on new group dialog, BIRT designer by default sets the value PageBreakBefore = Always but first. This way it is less confusing to end users. Cons - Older reports will not have auto page breaks for groups.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/writer/ModuleWriter.java
import org.eclipse.birt.report.model.elements.TextDataItem;
import org.eclipse.birt.report.model.elements.TextItem;
import org.eclipse.birt.report.model.elements.Translation;
import org.eclipse.birt.report.model.extension.oda.ODAProvider;
import org.eclipse.birt.report.model.extension.oda.OdaDummyProvider;
import org.eclipse.birt.report.model.metadata.ElementPropertyDefn;
import org.eclipse.birt.report.model.metadata.ExtensionElementDefn;
import org.eclipse.birt.report.model.metadata.MetaDataDictionary;
import org.eclipse.birt.report.model.metadata.PropertyDefn;
import org.eclipse.birt.report.model.metadata.PropertyType;
import org.eclipse.birt.report.model.metadata.StructPropertyDefn;
import org.eclipse.birt.report.model.metadata.StructureDefn;
import org.eclipse.birt.report.model.parser.DesignSchemaConstants;
import org.eclipse.birt.report.model.util.ContentIterator;
/**
 * Represents the module writer which writes an XML file following the BIRT
 * design schema. Uses a visitor pattern to traverse each element. BIRT elements
 * support inheritance in several forms. Because of this, the module writer
 * writes only those properties "local" to the element being written -- it does
 * not write inherited properties.
 * <p>
 * Because the XML schema was designed for to be understood by humans, the
 * schema is not a literal representation of the model. Instead, properties are
 * named and grouped in a way that is easiest to explain and understand. This
 * means that the writer has to do a bit more work to write the design, the the
 * extra work here is well worth the savings to the many customers who will read
 * the design format.
 * 
 */
public abstract class ModuleWriter extends ElementVisitor