i-net Clear Reports

com.inet.report
Class Section

java.lang.Object
  extended by com.inet.report.ReportComponent
      extended by com.inet.report.Region
          extended by com.inet.report.Section
All Implemented Interfaces:
ElementContainer, NodeParser, com.inet.report.ReferenceHolder, SimpleElementContainer, java.io.Serializable

public class Section
extends Region
implements ElementContainer

The Section class represents the sections of a report.
Each report consists of several sections which are associated with Areas of type: Report Header, Page Header, Group Header, Detail, Group Footer, Report Footer and Page Footer.
Here you can add elements to your report, like lines, boxes, text fields, pictures and of course fields with dynamic content, called FieldElement. To do this you can use the various add methods of this class.

The height and the width of a section is generated dynamically. Always when you are adding an element the section height and width would be checked. Use the ReportComponent.setHeight(int) and ReportComponent.setWidth(int) methods for changing it manually.

All elements in a section are bundled in a Vector, that you can access with getElementsV(). The index of each element is the position in this Vector object. You need the index if you want to remove an element (with remove(Element)).

This class is part of the RDC.

See Also:
Serialized Form

Field Summary
static int DEFAULT_HEIGHT
          Default value of the property 'height'.
 
Fields inherited from class com.inet.report.Region
DETAIL, GROUP_FOOTER, GROUP_HEADER, PAGE_FOOTER, PAGE_HEADER, REPORT_FOOTER, REPORT_HEADER
 
Method Summary
 Box addBox(int xpos, int ypos, int objwidth, int objheight)
          Adds a new Box to this Section and returns it.
 Box addBox(int xpos, int ypos, int objwidth, int objheight, int y2, Section endSection)
          Adds a new Box to this Section and returns it.
 Chart2 addChart2(ChartStyle style, int xpos, int ypos, int objwidth, int objheight)
          Adds a new chart element to the container and returns it.
 CrossTab addCrossTab(int xpos, int ypos, SummaryField field)
          Adds the simplest possible cross table (at least on field for summarization) into this Section and returns it.
 DatabasePicture addDatabasePicture(Field field, int xpos, int ypos, int objwidth, int objheight)
          Adds a new DatabasePicture (e.g.
 FieldElement addFieldElement(Field field, int xpos, int ypos, int objwidth, int objheight)
          Adds a new FieldElement (a dynamic text element based on a Field) to this Section and returns it.
 com.inet.report.FormFieldElement addFormField(int xpos, int ypos, int objwidth, int objheight)
          Adds a new form field element to the container.
 Line addHorizontalLine(int xpos, int ypos, int objwidth)
          Adds a new horizontal line to the container and returns it.
 com.inet.report.InteractiveSorting addInteractiveSorting(Field field, int xpos, int ypos, int objwidth, int objheight)
          Adds a new InteractiveSorting element to the container.
 JavaBean addJavaBean(java.lang.String className, int xpos, int ypos, int objwidth, int objheight)
          Add a new JavaBean to the container.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, java.lang.String fileName)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, java.io.File file)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, int[] buffer)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, byte[] buffer)
          Adds a new picture element to the container and returns it.
 Picture addPicture(int xpos, int ypos, int objwidth, int objheight, java.awt.image.BufferedImage im)
          Adds a new picture element to the container and returns it.
 SignatureForm addSignatureForm(int xpos, int ypos, int objwidth, int objheight)
          Adds a new SignatureForm element to this Section.
 Subreport addSubreport(int xpos, int ypos, int objwidth, int objheight, java.lang.String filename)
          Adds a new subreport element with definition from file to the container and returns it.
 Subreport addSubreport(int xpos, int ypos, int objwidth, int objheight)
          Adds a new subreport element to the container and returns it.
 Text addText(int xpos, int ypos, int objwidth, int objheight)
          Adds a new text element to the container.
 Line addVerticalLine(int xpos, int ypos, int objheight)
          Adds a new vertical line to the container and returns it.
 Line addVerticalLine(int xpos, int ypos, int y2, Section endSection)
          Adds a new vertical line to the container and returns it.
 int cleanForDataExport()
          All Elements that are not FieldElements will be removed from this Section.
 void copyContent(Section source)
          Copies content and properties of the source section into target section.
 void copyContent(SimpleElementContainer source)
          Copies content and properties of the source container into this container.
 void copyProperties(Section source)
          Some properties of the source section will be copied to this section.
 Element[] getElements()
          Returns an Array containing all elements in this section.
 java.util.Vector getElementsV()
          Returns a Vector containing all elements in this section.
 java.lang.String getName()
          Returns the name of the section - i.e.
 java.lang.Object getParent()
          Returns the parent Area of the Section.
 java.util.List getPropertyFormulas()
          Returns a list with all property formulas that are set for this report element.
 Element getReportElement(int idx)
          Returns a report element.
 int getReportElementsCount()
          Counts the number of Report Elements in this section and returns it.
 java.lang.String getSectionNameByNumber(int number)
          Generates a name ending usually used for section names.
 boolean getSuppressIfBlank()
          Returns the value of the property 'suppress if blank'.
 FormulaField getSuppressIfBlankFormula()
          Returns the formula for the property 'suppress if blank'.
 boolean getUnderlayFollow()
          Returns the value of the property 'underlay follow'.
 FormulaField getUnderlayFollowFormula()
          Returns the formula for the property 'underlay follow'.
 boolean getUseColor()
          Returns the value of the property 'useColor'.
 int getWidth()
          Returns the width of the section.
 int indexOf()
          Returns the current index of this Section in this Area.
 void moveElement(Element elem, Section dest)
          Moves the Element elem from this Section to the destination Section dest.
 void moveElement(Element elem, SimpleElementContainer dest)
          Moves the element elem from this container to the destination container dest.
 java.lang.String paramString()
          Returns a string identifying this report component.
 Element pasteElement(java.lang.Object copy)
          Paste a copy of an Element to this Section.
 void remove(Element elem)
          Removes the given report element from the container.
 void setSuppressIfBlank(boolean newValue)
          Sets the value of the property 'suppress if blank'.
 void setSuppressIfBlankFormula(FormulaField newFormula)
          Sets the formula for the property 'suppress if blank'.
 void setUnderlayFollow(boolean newValue)
          Sets the value of the property 'underlay follow'.
 void setUnderlayFollowFormula(FormulaField newFormula)
          Sets the formula for the property 'underlay follow'.
 void setUseColor(boolean newValue)
          Sets the value of the property 'useColor'.
 
Methods inherited from class com.inet.report.Region
getAtBottomOfPageFormula, getNewPageAfterFormula, getNewPageBeforeFormula, getResetPageNumberFormula, getSuppressOnDrillDownFormula, getType, isAtBottomOfPage, isHeader, isNewPageAfter, isNewPageBefore, isResetPageNumber, isSuppressOnDrillDown, setAtBottomOfPage, setAtBottomOfPageFormula, setNewPageAfter, setNewPageAfterFormula, setNewPageBefore, setNewPageBeforeFormula, setResetPageNumber, setResetPageNumberFormula, setSuppressOnDrillDown, setSuppressOnDrillDownFormula
 
Methods inherited from class com.inet.report.ReportComponent
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
 
Methods inherited from interface com.inet.report.parser.NodeParser
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
 

Field Detail

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
Default value of the property 'height'.

See Also:
Constant Field Values
Method Detail

getParent

public java.lang.Object getParent()
                           throws java.lang.IllegalStateException
Returns the parent Area of the Section.

Returns:
The parent Area.
Throws:
java.lang.IllegalStateException - if the type of the section is invalid.

paramString

public java.lang.String paramString()
Returns a string identifying this report component. This method is useful for logging and for debugging.

Overrides:
paramString in class ReportComponent
Returns:
a string identifying the ReportComponent

pasteElement

public Element pasteElement(java.lang.Object copy)
                     throws ReportException
Paste a copy of an Element to this Section. The parameter is not an instance of Element. If the Element needs references to a Field or a Group then these objects must exist in this Engine. In the other cases a ReportException will be thrown. The coordinates on that the Element will be paste in the Section are the coordinates of the copied element.

Specified by:
pasteElement in interface ElementContainer
Parameters:
copy - An object created with the method Element.copy().
Returns:
The inserted Element.
Throws:
ReportException - If the Element cannot be created because of missing references.
See Also:
Element.copy()

moveElement

public void moveElement(Element elem,
                        Section dest)
                 throws ReportException
Moves the Element elem from this Section to the destination Section dest.

Parameters:
elem - The Element, which should move to another Section.
dest - The destination Section of movement.
Throws:
ReportException - will thrown if dest or elem is null.
See Also:
Element.setIndex(int)

getElementsV

public java.util.Vector getElementsV()
Returns a Vector containing all elements in this section. Each element in the returned Vector is an instance of class Element or an instance of Elements subclasses.

Specified by:
getElementsV in interface SimpleElementContainer
Returns:
A Vector containing all elements in this section.
See Also:
getElements(), Element

getElements

public Element[] getElements()
Returns an Array containing all elements in this section. Each field of the Array contains an instance of class Element or an instance of Elements subclasses.

Specified by:
getElements in interface SimpleElementContainer
Returns:
An Array containing all elements in this Section.
See Also:
getElementsV(), Element

addFieldElement

public FieldElement addFieldElement(Field field,
                                    int xpos,
                                    int ypos,
                                    int objwidth,
                                    int objheight)
                             throws ReportException
Adds a new FieldElement (a dynamic text element based on a Field) to this Section and returns it. Note that for binary fields you need to use the method addDatabasePicture(Field, int, int, int, int), since picture fields are not FieldElements.

Specified by:
addFieldElement in interface SimpleElementContainer
Parameters:
field - The field that should added into Section. May not be null.
xpos - The x-coordinate of the upper left corner in twips.
ypos - The y-coordinate of the upper left corner in twips.
objwidth - The width of the new FieldElement in twips.
objheight - The height of the new FieldElement in twips.
Returns:
The created FieldElement or null if the creation was not successfull.
Throws:
ReportException - if the value type of the field is binary - use addDatabasePicture(Field, int, int, int, int) instead.
java.lang.IllegalArgumentException - if the parameters x, y, width or height are negative or the field is null
See Also:
DatabaseField, FormulaField, PromptField, SummaryField, SQLField, GroupField

addDatabasePicture

public DatabasePicture addDatabasePicture(Field field,
                                          int xpos,
                                          int ypos,
                                          int objwidth,
                                          int objheight)
Adds a new DatabasePicture (e.g. Blob) to this Section and returns it.

Specified by:
addDatabasePicture in interface SimpleElementContainer
Parameters:
field - Field which valuetype is Field.BINARY and that should be added to the section. This can be a database field, a formula field, a prompt field or a SQL field.
xpos - x-coordinate of the upper left corner in twips.
ypos - y-coordinate of the upper left corner in twips.
objwidth - Width of the new fieldElement in twips.
objheight - Height of the new fieldElement in twips.
Returns:
new created DatabasePicture

addBox

public Box addBox(int xpos,
                  int ypos,
                  int objwidth,
                  int objheight)
Adds a new Box to this Section and returns it.

Specified by:
addBox in interface SimpleElementContainer
Parameters:
xpos - The horizontal offset in twips.
ypos - The vertical offset in twips.
objwidth - The width of the box in twips.
objheight - The height of the box in twips.
Returns:
The created Box element or null if the creation was not successfull
Throws:
java.lang.IllegalArgumentException - If the parameter width or height are negative.

addBox

public Box addBox(int xpos,
                  int ypos,
                  int objwidth,
                  int objheight,
                  int y2,
                  Section endSection)
Adds a new Box to this Section and returns it.

Specified by:
addBox in interface ElementContainer
Parameters:
xpos - The horizontal offset in twips.
ypos - The vertical offset in twips.
objwidth - The width of the box in twips.
objheight - The minimal height of the box in start section in twips.
y2 - The vertical offset of the end point in end section
endSection - The section where the box ends
Returns:
The created box element

addCrossTab

public CrossTab addCrossTab(int xpos,
                            int ypos,
                            SummaryField field)
Adds the simplest possible cross table (at least on field for summarization) into this Section and returns it. To make this cross table more complex use the add and append methods in class com.inet.report.CrossTab.

Specified by:
addCrossTab in interface ElementContainer
Parameters:
xpos - The x position of the upper left corner of the whole cross table in twips..
ypos - The y position of the upper left corner of the whole cross table in twips..
field - The field to summarise in cross table.
Returns:
The created Crosstab.
Throws:
java.lang.IllegalArgumentException - if the parameters x or y are negative
See Also:
CrossTab

addChart2

public Chart2 addChart2(ChartStyle style,
                        int xpos,
                        int ypos,
                        int objwidth,
                        int objheight)
Adds a new chart element to the container and returns it. The chart type is defined by the parameter style. You can use e.g. BarStyle.BAR2D for a simple bar chart 2D. To see which chart types are allowed see the subclasses of ChartStyle. Initializes all properties with default values.

Specified by:
addChart2 in interface ElementContainer
Parameters:
style - the style of chart.
xpos - the x offset of the upper left corner in twips.
ypos - the y offset of the upper left corner in twips.
objwidth - the total width of the chart element in twips.
objheight - the total height of the chart element in twips.
Returns:
the new Chart2.
See Also:
Chart2, ChartStyle, BarStyle, LineStyle, AreaStyle, Chart3DStyle, PieStyle, XYStyle, StockStyle, ContinuousStyle, GanttStyle, SimpleElementContainer.remove(Element), SimpleElementContainer.getElements()

addHorizontalLine

public Line addHorizontalLine(int xpos,
                              int ypos,
                              int objwidth)
Adds a new horizontal line to the container and returns it.

Specified by:
addHorizontalLine in interface SimpleElementContainer
Parameters:
xpos - the horizontal offset of the start point in twips.
ypos - the vertical offset of the start point in twips.
objwidth - the width of the line in twips.
Returns:
the created line element

addJavaBean

public JavaBean addJavaBean(java.lang.String className,
                            int xpos,
                            int ypos,
                            int objwidth,
                            int objheight)
                     throws ReportException
Add a new JavaBean to the container. The class of the Java Bean need to be extends form java.awt.Component.

Specified by:
addJavaBean in interface SimpleElementContainer
Parameters:
className - The class name of the Java Bean.
xpos - The x-coordinate of the upper left corner in twips.
ypos - The y-coordinate of the upper left corner in twips.
objwidth - The width of the new fieldElement in twips.
objheight - The height of the new fieldElement in twips.
Returns:
The created JavaBean.
Throws:
ReportException - if the Java Bean cannot created.

addVerticalLine

public Line addVerticalLine(int xpos,
                            int ypos,
                            int objheight)
Adds a new vertical line to the container and returns it.

Specified by:
addVerticalLine in interface SimpleElementContainer
Parameters:
xpos - the horizontal offset of the start point in twips.
ypos - the vertical offset of the start point in twips.
objheight - the height of the line in twips.
Returns:
the created line element

addVerticalLine

public Line addVerticalLine(int xpos,
                            int ypos,
                            int y2,
                            Section endSection)
Adds a new vertical line to the container and returns it.

Specified by:
addVerticalLine in interface ElementContainer
Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
y2 - The vertical offset of the end point in end section in twips.
endSection - The section where the line should end.
Returns:
The created line element.

addPicture

public Picture addPicture(int xpos,
                          int ypos,
                          int objwidth,
                          int objheight,
                          java.lang.String fileName)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Specified by:
addPicture in interface SimpleElementContainer
Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips
objheight - The height of the picture in twips.
fileName - The absolute or relative to working directory path to the image. Valid formats are gif, jpg, png, bmp, wmf or emf.
Returns:
Picture The created report element.
Throws:
ReportException - will thrown if file is an unknown picture format.
See Also:
SimpleElementContainer.addPicture(int,int,int,int,java.io.File), SimpleElementContainer.addPicture(int,int,int,int,byte[])

addPicture

public Picture addPicture(int xpos,
                          int ypos,
                          int objwidth,
                          int objheight,
                          java.io.File file)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Specified by:
addPicture in interface SimpleElementContainer
Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
file - The file object to the image. Valid formats are gif, jpg, png, bmp, wmf or emf.
Returns:
Picture The created report element.
Throws:
ReportException - will thrown if file is an unknown picture format.
See Also:
SimpleElementContainer.addPicture(int,int,int,int,String), SimpleElementContainer.addPicture(int,int,int,int,byte[])

addPicture

public Picture addPicture(int xpos,
                          int ypos,
                          int objwidth,
                          int objheight,
                          int[] buffer)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Specified by:
addPicture in interface SimpleElementContainer
Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
buffer - A int[] with image header and data. Valid formats are gif, jpg, png, bmp, wmf or emf.
Returns:
Picture The created report element.
Throws:
ReportException - ReportException will thrown if buffer is an unknown picture format.
See Also:
SimpleElementContainer.addPicture(int,int,int,int,java.io.File), SimpleElementContainer.addPicture(int,int,int,int,String)

addPicture

public Picture addPicture(int xpos,
                          int ypos,
                          int objwidth,
                          int objheight,
                          byte[] buffer)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used.

Specified by:
addPicture in interface SimpleElementContainer
Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
buffer - A byte[] with image header and data. Valid formats are gif, jpg, png, bmp, wmf or emf.
Returns:
Picture The created report element.
Throws:
ReportException - ReportException will thrown if buffer is an unknown picture format.
See Also:
SimpleElementContainer.addPicture(int,int,int,int,java.io.File), SimpleElementContainer.addPicture(int,int,int,int,String)

addPicture

public Picture addPicture(int xpos,
                          int ypos,
                          int objwidth,
                          int objheight,
                          java.awt.image.BufferedImage im)
                   throws ReportException
Adds a new picture element to the container and returns it. If the width or height -1 then the width and height from the loaded image is used. The TYPE_INT_ARGB colormodel is supported only.

Specified by:
addPicture in interface SimpleElementContainer
Parameters:
xpos - The horizontal offset of the start point in twips.
ypos - The vertical offset of the start point in twips.
objwidth - The width of the picture in twips.
objheight - The height of the picture in twips.
im - The image object.
Returns:
Picture The created report element.
Throws:
ReportException - ReportException will thrown if im is an unknown picture format.

copyContent

public void copyContent(Section source)
Copies content and properties of the source section into target section.

Parameters:
source - The sections thats content and properties should copied.

addSubreport

public Subreport addSubreport(int xpos,
                              int ypos,
                              int objwidth,
                              int objheight,
                              java.lang.String filename)
                       throws ReportException,
                              java.net.MalformedURLException,
                              java.io.FileNotFoundException
Adds a new subreport element with definition from file to the container and returns it.

Specified by:
addSubreport in interface ElementContainer
Parameters:
xpos - The x offset of the left upper corner of subreport frame.
ypos - The y offset of the left upper corner of subreport frame.
objwidth - The width of the subreport frame.
objheight - The height of the subreport frame.
filename - The file name of the subreport to insert.
Returns:
The created subreport element. You can get the engine of the subreport with method getEngine in class Subreport.
Throws:
ReportException - if Engine is not initialized or finished.
java.net.MalformedURLException - Thrown to indicate that a malformed URL has occurred.
java.io.FileNotFoundException - If no file for the subreport were found.

addSubreport

public Subreport addSubreport(int xpos,
                              int ypos,
                              int objwidth,
                              int objheight)
Adds a new subreport element to the container and returns it. Add-on is only possible if this report is a main report.

Specified by:
addSubreport in interface ElementContainer
Parameters:
xpos - The x offset of the left upper corner of subreport frame.
ypos - The y offset of the left upper corner of subreport frame.
objwidth - The width of the subreport frame.
objheight - The height of the subreport frame.
Returns:
The created subreport element. You can get the engine of the subreport with method getEngine in class Subreport.

addText

public Text addText(int xpos,
                    int ypos,
                    int objwidth,
                    int objheight)
Adds a new text element to the container. To fill a new line into this text element use addParagraph method. The returned text element is empty, that means it contains no paragraph object.

Specified by:
addText in interface SimpleElementContainer
Parameters:
xpos - the x offset of the text element
ypos - the y offset of the text element
objwidth - the width of the text element
objheight - the height of the text element
Returns:
the created text element.

addFormField

public com.inet.report.FormFieldElement addFormField(int xpos,
                                                     int ypos,
                                                     int objwidth,
                                                     int objheight)
Adds a new form field element to the container.

Specified by:
addFormField in interface ElementContainer
Parameters:
xpos - The x offset of the left upper corner of the form field.
ypos - The y offset of the left upper corner of the form field.
objwidth - The width of the form field.
objheight - The height of the form field.
Returns:
the created form field element.

addInteractiveSorting

public com.inet.report.InteractiveSorting addInteractiveSorting(Field field,
                                                                int xpos,
                                                                int ypos,
                                                                int objwidth,
                                                                int objheight)
Adds a new InteractiveSorting element to the container.

Specified by:
addInteractiveSorting in interface ElementContainer
Parameters:
field - the a group field or a sorting field which sorting should be interactive.
xpos - The x offset of the left upper corner of the form field.
ypos - The y offset of the left upper corner of the form field.
objwidth - The width of the form field.
objheight - The height of the form field.
Returns:
the created form field element.

remove

public void remove(Element elem)
Removes the given report element from the container.

Specified by:
remove in interface SimpleElementContainer
Parameters:
elem - The Report Element which should be removed from the container (null is not permitted).

getSectionNameByNumber

public java.lang.String getSectionNameByNumber(int number)
                                        throws ReportException
Generates a name ending usually used for section names.

Parameters:
number - - A number greater than 0; usually the index of the section in the sections set.
Returns:
String - "a" for 0, "z" for 25, "ab" for 27
Throws:
ReportException - if number is lesser than 0

getName

public java.lang.String getName()
                         throws ReportException
Returns the name of the section - i.e. "Db" for the second detail section.

Returns:
The Name of the section
Throws:
ReportException - will thrown if Section was not found.

setSuppressIfBlank

public void setSuppressIfBlank(boolean newValue)
Sets the value of the property 'suppress if blank'. If this property is enabled the section will not printed if it is blank.

Parameters:
newValue - The new value of the property 'suppress if blank'.

getSuppressIfBlank

public boolean getSuppressIfBlank()
Returns the value of the property 'suppress if blank'. If this property is enabled the section will not printed if it is blank.

Returns:
The value of the property 'suppress if blank'.

setSuppressIfBlankFormula

public void setSuppressIfBlankFormula(FormulaField newFormula)
Sets the formula for the property 'suppress if blank'. If this property is enabled the section will not printed if it is blank.

Parameters:
newFormula - The new formula for the property 'suppress if blank'.

getSuppressIfBlankFormula

public FormulaField getSuppressIfBlankFormula()
Returns the formula for the property 'suppress if blank'. If this property is enabled the section will not printed if it is blank.

Returns:
The formula for the property 'suppress if blank'.

setUnderlayFollow

public void setUnderlayFollow(boolean newValue)
Sets the value of the property 'underlay follow'. If this property is enabled the section will underlay the following section(s).

Parameters:
newValue - The new value of the property 'underlay follow'.

getUnderlayFollow

public boolean getUnderlayFollow()
Returns the value of the property 'underlay follow'. If this property is enabled the section will underlay the following section(s).

Returns:
The value of the property 'underlay follow'.

setUnderlayFollowFormula

public void setUnderlayFollowFormula(FormulaField newFormula)
Sets the formula for the property 'underlay follow'. If this property is enabled the section will underlay the following section(s).

Parameters:
newFormula - The new formula for the property 'underlay follow'.

getUnderlayFollowFormula

public FormulaField getUnderlayFollowFormula()
Returns the formula for the property 'underlay follow'. If this property is enabled the section will underlay the following section(s).

Returns:
The formula for the property 'underlay follow'.

getReportElementsCount

public int getReportElementsCount()
Counts the number of Report Elements in this section and returns it.

Specified by:
getReportElementsCount in interface SimpleElementContainer
Returns:
The number of report elements in this section.

getReportElement

public Element getReportElement(int idx)
Returns a report element. You can specify the returned element with the idx parameter.

Specified by:
getReportElement in interface SimpleElementContainer
Parameters:
idx - The 0-based index of the element, which should be returned.
Returns:
The returned Element can be a FieldElement, a Text, a Line, a Box, a Picture, a DatabasePicture, a OldChart, Subreport or a CrossTab.
See Also:
FieldElement, Line, Box, Picture, DatabasePicture, Chart2, Subreport, CrossTab, Text

indexOf

public int indexOf()
Returns the current index of this Section in this Area.

Specified by:
indexOf in class ReportComponent
Returns:
The current index of this section in this area.
Throws:
java.lang.IllegalStateException - Thrown if this section was not found in the parent area.

getPropertyFormulas

public java.util.List getPropertyFormulas()
Returns a list with all property formulas that are set for this report element.

Overrides:
getPropertyFormulas in class Region
Returns:
List of property formulas
Since:
6.0

setUseColor

public void setUseColor(boolean newValue)
Sets the value of the property 'useColor'. When this property is enabled the color defined in 'background color' is used.

Parameters:
newValue - The new value of the property 'useColor'.
Since:
6.1

getUseColor

public boolean getUseColor()
Returns the value of the property 'useColor'. When this property is enabled the color defined in 'background color' is used.

Returns:
The current value of the property 'useColor'.
Since:
6.1

getWidth

public int getWidth()
Returns the width of the section. As the width of a section can not vary it will return Engine.getReportProperties().getPaperWidth()-Engine.getReportProperties().getMarginLeft()-Engine.getReportProperties().getMarginRight() for all main reports.
Only if this section belongs to a sub report the section width will not be the width of the page because it is limited to the width of the sub report.

Overrides:
getWidth in class ReportComponent
Returns:
The width of this section.

addSignatureForm

public SignatureForm addSignatureForm(int xpos,
                                      int ypos,
                                      int objwidth,
                                      int objheight)
Adds a new SignatureForm element to this Section. This signature element is useful for PDF export, only.

Specified by:
addSignatureForm in interface ElementContainer
Parameters:
xpos - the x position of the signature form element.
ypos - the y position of the signature form element.
objwidth - the width of the signature form element.
objheight - the height of the signature form element.
Returns:
the created signature form element.
Throws:
java.lang.IllegalArgumentException - if the parameters x, y, width or height are negative
Since:
9.1

copyProperties

public void copyProperties(Section source)
Some properties of the source section will be copied to this section.

Parameters:
source - section to be copied.
Since:
9.1

copyContent

public void copyContent(SimpleElementContainer source)
Copies content and properties of the source container into this container.

Specified by:
copyContent in interface ElementContainer
Parameters:
source - The container thats content and properties should copied.

moveElement

public void moveElement(Element elem,
                        SimpleElementContainer dest)
                 throws ReportException
Moves the element elem from this container to the destination container dest.

Specified by:
moveElement in interface ElementContainer
Parameters:
elem - The element, which should move to another container.
dest - The destination container of movement.
Throws:
ReportException - will thrown if dest or elem is null.
See Also:
Element.setIndex(int)

cleanForDataExport

public int cleanForDataExport()
All Elements that are not FieldElements will be removed from this Section. All suppressed elements apart from FormulaFields will be removed too. All remaining elements will be sorted on their x position.

Returns:
number of remaining elements in the section.
Since:
9.2

i-net Clear Reports

Copyright © 1999-2015 by i-net software GmbH