public class Subreport extends AbstractFontElement implements SubreportProperties, TextProperties, com.inet.report.ReferenceHolder, BorderProperties
Subreport
objects
in the report. SubreportLink
using the employee id field in the main report
(i.e. Employees.Id) and the employee id in the subreport (i.e. Sales.Employee-Id).
Now each employee will be followed by its sales, where the sales were shown in
a single object - the Subreport
object.BOX, CHART, CROSSTAB, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART
GLYPH_DEFAULT, GLYPH_DOWN, GLYPH_LEFT, GLYPH_RIGHT, GLYPH_UP, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE
FONT_DIALOG, FONT_MONOSPACED, FONT_SANS_SERIF, FONT_SERIF, FONT_STYLE_BOLD, FONT_STYLE_ITALIC, FONT_STYLE_STRIKETHROUGH, FONT_STYLE_UNDERLINE
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT
Modifier and Type | Method and Description |
---|---|
SubreportLink |
addSubreportLink(Field mainRptField,
Field subRptField)
Adds a new subreport link to the set and returns it.
|
SubreportLink |
addSubreportLink(Field mainRptField,
Field subRptField,
boolean generatePrompt)
Adds a new subreport link to the set and returns it.
|
java.lang.Object |
copy()
Creates a serializable copy of this Element.
|
Engine |
getEngine()
Returns the engine object belonging to this subreport.
|
int |
getGlyphOrientation()
Returns the glyph orientation.
|
FormulaField |
getGlyphOrientationFormula()
Returns the formula whose return value determines the glyph orientation.
|
FormulaField |
getOnDemandLinkLabel()
Returns a FormulaField whose return value
specifies the text that is shown instead of the element content when on demand is enabled.
|
FormulaField |
getOnDemandTabLabel()
Returns a FormulaField whose return value
specifies the name of the tab which is showing
the activated element if on demand is enabled.
|
java.util.List<FormulaField> |
getPropertyFormulas()
Returns a list with all property formulas that are set for this report element.
|
java.util.List<? extends ReportComponent> |
getSubComponents()
Returns all
ReportComponent s that are descendants of this one. |
SubreportLink |
getSubreportLink(int idx)
Gets the subreport link at the specified index.
|
int |
getSubreportLinkCount()
Returns the number of subreport links in the set
|
int |
getTextRotation()
Returns the value of the property 'text rotation'.
|
FormulaField |
getTextRotationFormula()
Returns the formula whose return value determines the property 'text rotation'.
|
boolean |
isOnDemand()
Returns
true if on demand is
enabled else false . |
boolean |
isSuppressIfBlank()
Returns
true if "suppress if blank" is enabled else false . |
void |
removeSubreportLink(int idx)
Removes the subreport link at the specified index.
|
void |
setGlyphOrientation(int orientation)
Sets the orientation of the glyphs.
|
void |
setGlyphOrientationFormula(FormulaField formula)
Sets the formula whose return value determines the glyph orientation.
|
void |
setOnDemand(boolean onDemand)
Specifies whether on demand is enabled or not.
|
void |
setOnDemandLinkLabel(java.lang.String lab)
If on demand is enabled, the element is shown
in the report as a line of text.
|
void |
setOnDemandLinkLabel(FormulaField lab)
If on demand is enabled, the element is shown
in the report as a line of text.
|
void |
setOnDemandTabLabel(java.lang.String lab)
If on demand is enabled and the element is
activated, it is shown in an extra tab or window.
|
void |
setOnDemandTabLabel(FormulaField lab)
If on demand is enabled and the element is
activated, it is shown in an extra tab or window.
|
void |
setSuppressIfBlank(boolean suppress)
Specifies whether "suppress if blank" is enabled or not.
|
void |
setTextRotation(int rotation)
Sets the value of the property 'text rotation'.
|
void |
setTextRotationFormula(FormulaField formula)
Sets the formula whose return value determines the property 'text rotation'.
|
getFontColor, getFontColorFormula, getFontName, getFontNameFormula, getFontSize, getFontSizeFormula, getFontSizeTwips, getFontStyle, getFontStyleFormula, getStrikeoutFormula, getUnderlineFormula, isBold, isItalic, isStrikeout, isUnderline, setBold, setFontColor, setFontColorFormula, setFontName, setFontNameFormula, setFontSize, setFontSizeFormula, setFontSizeTwips, setFontStyle, setFontStyleFormula, setItalic, setStrikeout, setStrikeoutFormula, setUnderline, setUnderlineFormula
addListener, getBottomLineStyle, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getParent, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isDropShadow, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
getBackColor, getBackColorFormula, getBottomLineStyle, getBottomLineStyleFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getForeColor, getForeColorFormula, getLeftLineStyle, getLeftLineStyleFormula, getRightLineStyle, getRightLineStyleFormula, getTightHorizontalFormula, getTopLineStyle, getTopLineStyleFormula, isCloseBorderOnPageBreak, isDropShadow, isTightHorizontal, setBackColor, setBackColorFormula, setBottomLineStyle, setBottomLineStyleFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setForeColor, setForeColorFormula, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setTightHorizontal, setTightHorizontalFormula, setTopLineStyle, setTopLineStyleFormula
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public java.lang.Object copy() throws ReportException
copy
in class Element
ReportException
- If accessing properties of this Element causes any errors.Section.pasteElement(java.lang.Object)
public Engine getEngine()
getEngine
in class Element
Engine
The engine of the subreport.Engine
,
Element.getEngine()
public SubreportLink addSubreportLink(Field mainRptField, Field subRptField) throws ReportException
mainRptField
- The Field in the main report whose values
will be used for the PromptField in the subreport.subRptField
- The Field in the subreport whose values
will be used to compare with the values of the PromptField.ReportException
- If an error occurred while creating the sub report link.public SubreportLink addSubreportLink(Field mainRptField, Field subRptField, boolean generatePrompt) throws ReportException
mainRptField
- The Field in the main report whose values
will be used for the PromptField in the subreport.subRptField
- The Field in the subreport whose values
will be used to compare with the values of the PromptField.generatePrompt
- If true
a PromptField which is used for this
link is generated automatically. If set to false
a PromptField has to be
set with SubreportLink.setPromptField(PromptField)
.ReportException
- If an error occurred while creating the sub report link.public void removeSubreportLink(int idx)
idx
- The 0-based index of the SubreportLink object that should be removed.getSubreportLinkCount()
public SubreportLink getSubreportLink(int idx)
idx
- The 0-based index of the subreport that should be returned.getSubreportLinkCount()
public int getSubreportLinkCount()
public void setOnDemand(boolean onDemand)
setOnDemand
in interface SubreportProperties
onDemand
- when true on demand is enabledpublic boolean isOnDemand()
true
if on demand is
enabled else false
.isOnDemand
in interface SubreportProperties
public void setOnDemandLinkLabel(java.lang.String lab)
setOnDemandLinkLabel
in interface SubreportProperties
lab
- - the text as Stringpublic void setOnDemandLinkLabel(FormulaField lab)
setOnDemandLinkLabel
in interface SubreportProperties
lab
- - a FormulaField whose return value specifies the text.public FormulaField getOnDemandLinkLabel()
getOnDemandLinkLabel
in interface SubreportProperties
public void setOnDemandTabLabel(java.lang.String lab)
setOnDemandTabLabel
in interface SubreportProperties
lab
- - the name as Stringpublic void setOnDemandTabLabel(FormulaField lab)
setOnDemandTabLabel
in interface SubreportProperties
lab
- - a FormulaField whose return value specifies the name.public FormulaField getOnDemandTabLabel()
getOnDemandTabLabel
in interface SubreportProperties
public java.util.List<FormulaField> getPropertyFormulas()
ReportComponent
of this one. To get the property formulas for descendant ReportComponent
use ReportComponent.getSubComponents()
getPropertyFormulas
in class AbstractFontElement
public int getGlyphOrientation()
getGlyphOrientation
in interface TextProperties
TextProperties.setGlyphOrientation(int)
,
TextProperties.GLYPH_DEFAULT
,
TextProperties.GLYPH_UP
,
TextProperties.GLYPH_DOWN
,
TextProperties.GLYPH_RIGHT
,
TextProperties.GLYPH_LEFT
public void setGlyphOrientation(int orientation)
setGlyphOrientation
in interface TextProperties
orientation
- Orientation to be set for the glyphs (i.e. the rotation of every individual character of the line of text)TextProperties.getGlyphOrientation()
,
TextProperties.GLYPH_DEFAULT
,
TextProperties.GLYPH_UP
,
TextProperties.GLYPH_DOWN
,
TextProperties.GLYPH_RIGHT
,
TextProperties.GLYPH_LEFT
public void setGlyphOrientationFormula(FormulaField formula)
setGlyphOrientationFormula
in interface TextProperties
formula
- the formula whose return value determines the glyph orientationpublic FormulaField getGlyphOrientationFormula()
getGlyphOrientationFormula
in interface TextProperties
public void setTextRotation(int rotation)
setTextRotation
in interface TextProperties
rotation
- The new value of the property 'text rotation'. Rotation is done counter-clockwise.TextProperties.ROTATE_0
,
TextProperties.ROTATE_90
,
TextProperties.ROTATE_180
,
TextProperties.ROTATE_270
public int getTextRotation()
getTextRotation
in interface TextProperties
TextProperties.ROTATE_0
,
TextProperties.ROTATE_90
,
TextProperties.ROTATE_180
,
TextProperties.ROTATE_270
public FormulaField getTextRotationFormula()
getTextRotationFormula
in interface TextProperties
TextProperties.getTextRotation()
,
TextProperties.setTextRotation(int)
public void setTextRotationFormula(FormulaField formula)
setTextRotationFormula
in interface TextProperties
formula
- formula whose return value determines the property 'text rotation'.TextProperties.getTextRotation()
,
TextProperties.setTextRotation(int)
public boolean isSuppressIfBlank()
true
if "suppress if blank" is enabled else false
. A subreport is blank if all
sections are suppressed or have no height. If the subreport is suppressed, the border and background
will not be printed.isSuppressIfBlank
in interface SubreportProperties
ReportProperties.isSuppressIfNoRows()
,
Section.getSuppressIfBlank()
public void setSuppressIfBlank(boolean suppress)
setSuppressIfBlank
in interface SubreportProperties
suppress
- whether to suppress the display of this subreport if it is blankReportProperties.setSuppressIfNoRows(boolean)
,
Section.setSuppressIfBlank(boolean)
public java.util.List<? extends ReportComponent> getSubComponents()
ReportComponent
s that are descendants of this one. E.G. this will return all Element
of a Section
. But it's as well useful for CrossTab
s or Text
elements which have
additional elements.
NOTE: This does not return any ReportComponent
of the sub-engine!getSubComponents
in class ReportComponent
null
if the component has no descendantsCopyright © 1999-2020 by i-net software GmbH