Klasse Subreport
java.lang.Object
com.inet.report.ReportComponent
com.inet.report.Element
com.inet.report.AbstractFontElement
com.inet.report.Subreport
- Alle implementierten Schnittstellen:
BorderProperties, FontProperties, GeneralProperties, NodeParser, com.inet.report.ReferenceHolder, SubreportProperties, TextProperties, Serializable, Cloneable
public class Subreport
extends AbstractFontElement
implements SubreportProperties, TextProperties, com.inet.report.ReferenceHolder, BorderProperties
Engines cannot hold more than one datasource, so if you need a report
that uses data from two or more datasources, you have to use
Example:
You have one database to store private data of your employees. In another database (a table in the same database should also work, but no subreports are required here) you store the sales of each of your shops. So, if you want to create a report, that displays all sales according to the employee you have to create some fields in the main report that shows the employees and a subreport that have some fields to show the sales. To realize the representation of sales according to employees insert a
This class is part of the
Subreport objects
in the report. Example:
You have one database to store private data of your employees. In another database (a table in the same database should also work, but no subreports are required here) you store the sales of each of your shops. So, if you want to create a report, that displays all sales according to the employee you have to create some fields in the main report that shows the employees and a subreport that have some fields to show the sales. To realize the representation of sales according to employees insert a
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.This class is part of the
RDC.- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen AbstractFontElement
AbstractFontElement.FontPropsVon Klasse geerbte verschachtelte Klassen/Schnittstellen Element
Element.BorderProps, Element.CommonProperties, Element.ElementTypes, Element.HyperlinkProps, Element.StringProps -
Feldübersicht
Von Klasse geerbte Felder Element
BOX, CHART, CROSSTAB, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPARTVon Schnittstelle geerbte Felder BorderProperties
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINEVon Schnittstelle geerbte Felder FontProperties
FONT_DIALOG, FONT_MONOSPACED, FONT_SANS_SERIF, FONT_SERIF, FONT_STYLE_BOLD, FONT_STYLE_ITALIC, FONT_STYLE_STRIKETHROUGH, FONT_STYLE_UNDERLINEVon Schnittstelle geerbte Felder GeneralProperties
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT, ALIGN_VERTICAL_BOTTOM, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_TOPVon Schnittstelle geerbte Felder TextProperties
GLYPH_DEFAULT, GLYPH_DOWN, GLYPH_LEFT, GLYPH_RIGHT, GLYPH_UP, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90 -
Methodenübersicht
Modifikator und TypMethodeBeschreibungaddSubreportLink(Field mainRptField, Field subRptField) Adds a new subreport link to the set and returns it.addSubreportLink(Field mainRptField, Field subRptField, boolean generatePrompt) Adds a new subreport link to the set and returns it.copy()Creates a serializable copy of this Element.Returns the engine object belonging to this subreport.intReturns the glyph orientation.Returns the formula whose return value determines the glyph orientation.Returns a FormulaField whose return value specifies the text that is shown instead of the element content when on demand is enabled.Returns a FormulaField whose return value specifies the name of the tab which is showing the activated element if on demand is enabled.Returns a list with all property formulas that are set for this report element.List<? extends ReportComponent> Returns allReportComponents that are descendants of this one.getSubreportLink(int idx) Gets the subreport link at the specified index.intReturns the number of subreport links in the setintReturns the value of the property 'text rotation'.Returns the formula whose return value determines the property 'text rotation'.booleanReturnstrueif on demand is enabled elsefalse.booleanReturnstrueif "suppress if blank" is enabled elsefalse.parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLvoidparseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String, Object> parserMap) FOR INTERNAL USE ONLY Internal method for reading report XMLvoidFOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLvoidremoveSubreportLink(int idx) Removes the subreport link at the specified index.final voidFOR INTERNAL USE ONLYvoidsetGlyphOrientation(int orientation) Sets the orientation of the glyphs.voidsetGlyphOrientationFormula(FormulaField formula) Sets the formula whose return value determines the glyph orientation.voidsetOnDemand(boolean onDemand) Specifies whether on demand is enabled or not.voidIf on demand is enabled, the element is shown in the report as a line of text.voidIf on demand is enabled, the element is shown in the report as a line of text.voidIf on demand is enabled and the element is activated, it is shown in an extra tab or window.voidIf on demand is enabled and the element is activated, it is shown in an extra tab or window.final voidFOR INTERNAL USE ONLYvoidsetSuppressIfBlank(boolean suppress) Specifies whether "suppress if blank" is enabled or not.voidsetTextRotation(int rotation) Sets the value of the property 'text rotation'.voidsetTextRotationFormula(FormulaField formula) Sets the formula whose return value determines the property 'text rotation'.Von Klasse geerbte Methoden AbstractFontElement
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, setUnderlineFormulaVon Klasse geerbte Methoden Element
addListener, getBottomLineStyle, getBottomLineStyleFormula, getBulletValueStack, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getListStack, getParent, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, getTypeAsString, getVerAlign, getVerAlignFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isCloseBorderOnPageBreakInternal, isDropShadow, isInCrossTab, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setBulletValueStack, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setListStack, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula, setVerAlign, setVerAlignFormulaVon Klasse geerbte Methoden ReportComponent
addPropertyChangeListener, addPropertyChangeListener, addReferencedObject, addVetoableChangeListener, addVetoableChangeListener, getBackColor, getBackColorFormula, getCustomData, getHeight, getKeepTogetherFormula, getRealReferencedObjectCount, getReferencedObjectCount, getReferencedObjects, getStructElem, getSuppressFormula, getType, getWidth, getX, getY, isDOMParser, isKeepTogether, isSuppress, parseDOM, removePropertyChangeListener, removePropertyChangeListener, removeReferencedObject, removeVetoableChangeListener, removeVetoableChangeListener, setBackColor, setBackColorFormula, setCustomData, setHeight, setKeepTogether, setKeepTogetherFormula, setStructElem, setSuppress, setSuppressFormula, setWidth, setX, setYVon Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden BorderProperties
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, setTopLineStyleFormulaVon Schnittstelle geerbte Methoden GeneralProperties
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormulaVon Schnittstelle geerbte Methoden com.inet.report.ReferenceHolder
addReferencedObject, getRealReferencedObjectCount, getReferencedObjectCount, getReferencedObjects, removeReferencedObject
-
Methodendetails
-
copy
Creates a serializable copy of this Element. The returned Object is not an instance of Element. This method is used from i-net Designer for Copy and Paste.- Setzt außer Kraft:
copyin KlasseElement- Gibt zurück:
- A serializable Object.
- Löst aus:
ReportException- If accessing properties of this Element causes any errors.- Siehe auch:
-
getEngine
Returns the engine object belonging to this subreport. This is different to the super method of Element. Will return null if this subreport no longer belongs to a main report. -
addSubreportLink
Adds a new subreport link to the set and returns it.- Parameter:
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.- Gibt zurück:
- The created SubreportLink object.
- Löst aus:
ReportException- If an error occurred while creating the sub report link.- Seit:
- 6.0
-
addSubreportLink
public SubreportLink addSubreportLink(Field mainRptField, Field subRptField, boolean generatePrompt) throws ReportException Adds a new subreport link to the set and returns it.- Parameter:
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- Iftruea PromptField which is used for this link is generated automatically. If set tofalsea PromptField has to be set withSubreportLink.setPromptField(PromptField).- Gibt zurück:
- The created SubreportLink object.
- Löst aus:
ReportException- If an error occurred while creating the sub report link.- Seit:
- 6.0
-
removeSubreportLink
public void removeSubreportLink(int idx) Removes the subreport link at the specified index.- Parameter:
idx- The 0-based index of the SubreportLink object that should be removed.- Seit:
- 6.0
- Siehe auch:
-
getSubreportLink
Gets the subreport link at the specified index.- Parameter:
idx- The 0-based index of the subreport that should be returned.- Gibt zurück:
- The SubreportLink object at the specified position.
- Seit:
- 6.0
- Siehe auch:
-
getSubreportLinkCount
public int getSubreportLinkCount()Returns the number of subreport links in the set- Gibt zurück:
- The number of subreport links.
- Seit:
- 6.0
-
setOnDemand
public void setOnDemand(boolean onDemand) Specifies whether on demand is enabled or not.- Angegeben von:
setOnDemandin SchnittstelleSubreportProperties- Parameter:
onDemand- when true on demand is enabled
-
isOnDemand
public boolean isOnDemand()Returnstrueif on demand is enabled elsefalse.- Angegeben von:
isOnDemandin SchnittstelleSubreportProperties- Gibt zurück:
- whether on demand is enabled
- Seit:
- 7.0
-
setOnDemandLinkLabel
If on demand is enabled, the element is shown in the report as a line of text. Specify this text with this method.- Angegeben von:
setOnDemandLinkLabelin SchnittstelleSubreportProperties- Parameter:
lab- - the text as String
-
setOnDemandLinkLabel
If on demand is enabled, the element is shown in the report as a line of text. Specify this text with this method.- Angegeben von:
setOnDemandLinkLabelin SchnittstelleSubreportProperties- Parameter:
lab- - a FormulaField whose return value specifies the text.
-
getOnDemandLinkLabel
Returns a FormulaField whose return value specifies the text that is shown instead of the element content when on demand is enabled.- Angegeben von:
getOnDemandLinkLabelin SchnittstelleSubreportProperties- Gibt zurück:
- FormulaField
-
setOnDemandTabLabel
If on demand is enabled and the element is activated, it is shown in an extra tab or window. Specify the name of this tab with this method.- Angegeben von:
setOnDemandTabLabelin SchnittstelleSubreportProperties- Parameter:
lab- - the name as String
-
setOnDemandTabLabel
If on demand is enabled and the element is activated, it is shown in an extra tab or window. Specify the name of this tab with this method.- Angegeben von:
setOnDemandTabLabelin SchnittstelleSubreportProperties- Parameter:
lab- - a FormulaField whose return value specifies the name.
-
getOnDemandTabLabel
Returns a FormulaField whose return value specifies the name of the tab which is showing the activated element if on demand is enabled.- Angegeben von:
getOnDemandTabLabelin SchnittstelleSubreportProperties- Gibt zurück:
- FormulaField
-
getPropertyFormulas
Returns a list with all property formulas that are set for this report element. This includes property formulas for any type of sub-component but excludes formulas for any descendantReportComponentof this one. To get the property formulas for descendantReportComponentuseReportComponent.getSubComponents()- Setzt außer Kraft:
getPropertyFormulasin KlasseAbstractFontElement- Gibt zurück:
- List of property formulas
-
setReferences
public final void setReferences()FOR INTERNAL USE ONLY- Angegeben von:
setReferencesin Schnittstellecom.inet.report.ReferenceHolder- Setzt außer Kraft:
setReferencesin KlasseElement
-
resetReferences
public final void resetReferences()FOR INTERNAL USE ONLY- Angegeben von:
resetReferencesin Schnittstellecom.inet.report.ReferenceHolder- Setzt außer Kraft:
resetReferencesin KlasseReportComponent
-
getGlyphOrientation
public int getGlyphOrientation()Returns the glyph orientation. This is the rotation of every individual character in the line. The default value is GLYPH_DEFAULT, that is, the glyphs point towards the source of the given block progression. Use the GLYPH constants for the orientation.- Angegeben von:
getGlyphOrientationin SchnittstelleTextProperties- Gibt zurück:
- glyph orientation
- Siehe auch:
-
setGlyphOrientation
public void setGlyphOrientation(int orientation) Sets the orientation of the glyphs. This is the rotation of every individual character in the line. The default value is GLYPH_DEFAULT, that is, the glyphs point towards the source of the given block progression. Use the GLYPH constants for the orientation.- Angegeben von:
setGlyphOrientationin SchnittstelleTextProperties- Parameter:
orientation- Orientation to be set for the glyphs (i.e. the rotation of every individual character of the line of text)- Siehe auch:
-
setGlyphOrientationFormula
Sets the formula whose return value determines the glyph orientation. This is the rotation of every individual character in each line. This formula should return one of the formula constants GlyphDefault, GlyphLeft, GlyphRight, or GlyphDown.- Angegeben von:
setGlyphOrientationFormulain SchnittstelleTextProperties- Parameter:
formula- the formula whose return value determines the glyph orientation
-
getGlyphOrientationFormula
Returns the formula whose return value determines the glyph orientation. This is the rotation of every individual character in each line. This formula should return one of the formula constants GlyphDefault, GlyphLeft, GlyphRight, or GlyphDown.- Angegeben von:
getGlyphOrientationFormulain SchnittstelleTextProperties- Gibt zurück:
- the formula whose return value determines the glyph orientation
-
setTextRotation
public void setTextRotation(int rotation) Sets the value of the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. For example, to have a text element have vertical text running from top to bottom and each line run from right to left, you'd set a glyph orientation of GLYPH_LEFT and a text rotation of ROTATE_270.- Angegeben von:
setTextRotationin SchnittstelleTextProperties- Parameter:
rotation- The new value of the property 'text rotation'. Rotation is done counter-clockwise.- Seit:
- 5.4
- Siehe auch:
-
getTextRotation
public int getTextRotation()Returns the value of the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. For example, to have a text element have vertical text running from top to bottom and each line run from right to left, you'd set a glyph orientation of GLYPH_LEFT and a text rotation of ROTATE_270.- Angegeben von:
getTextRotationin SchnittstelleTextProperties- Gibt zurück:
- The value of the property 'text rotation'.
- Seit:
- 5.4
- Siehe auch:
-
getTextRotationFormula
Returns the formula whose return value determines the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. This formula should return one of the formula constants Rotate0, Rotate90, Rotate180, or Rotate270.- Angegeben von:
getTextRotationFormulain SchnittstelleTextProperties- Gibt zurück:
- formula whose return value determines the property 'text rotation'.
- Siehe auch:
-
setTextRotationFormula
Sets the formula whose return value determines the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. This formula should return one of the formula constants Rotate0, Rotate90, Rotate180, or Rotate270.- Angegeben von:
setTextRotationFormulain SchnittstelleTextProperties- Parameter:
formula- formula whose return value determines the property 'text rotation'.- Siehe auch:
-
isSuppressIfBlank
public boolean isSuppressIfBlank()Returnstrueif "suppress if blank" is enabled elsefalse. 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.- Angegeben von:
isSuppressIfBlankin SchnittstelleSubreportProperties- Gibt zurück:
- whether "suppress if blank" is enabled
- Siehe auch:
-
setSuppressIfBlank
public void setSuppressIfBlank(boolean suppress) Specifies whether "suppress if blank" is enabled or not. 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.- Angegeben von:
setSuppressIfBlankin SchnittstelleSubreportProperties- Parameter:
suppress- whether to suppress the display of this subreport if it is blank- Siehe auch:
-
parseElement
public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) throws FatalParserExceptionFOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLParses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.
- Angegeben von:
parseElementin SchnittstelleNodeParser- Setzt außer Kraft:
parseElementin KlasseAbstractFontElement- Parameter:
group- XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.tag- The XMLTag to be parsedatts- The set of attributes in the current XMLTagparserMap- The map of current Parser.- Gibt zurück:
- The NodeParser sub-element if one needed to be created, or null if none was created.
- Löst aus:
FatalParserException- if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
-
parseText
FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLThis method is called if text was encountered in the context of this node. (Examples would be a formula's text or a text element's text)
- Angegeben von:
parseTextin SchnittstelleNodeParser- Setzt außer Kraft:
parseTextin KlasseElement- Parameter:
textData- text encountered and to be storedparserMap- The map of current Parser.
-
parseEndElement
public void parseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String, Object> parserMap) throws FatalParserExceptionFOR INTERNAL USE ONLY Internal method for reading report XMLReceive notification of the end of an XML tag.
- Angegeben von:
parseEndElementin SchnittstelleNodeParser- Setzt außer Kraft:
parseEndElementin KlasseReportComponent- Parameter:
group- XMLTag of the current node to be parsed, or null if there is no such current group.tag- The XMLTag to be parsedparserMap- The map of current Parser.- Löst aus:
FatalParserException- if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
-
getSubComponents
Returns allReportComponents that are descendants of this one. E.G. this will return all Element of aSection. But it's as well useful forCrossTabs orTextelements which have additional elements. NOTE: This does not return anyReportComponentof the sub-engine!- Angegeben von:
getSubComponentsin KlasseReportComponent- Gibt zurück:
- a list with all sub components which can be empty as well; will be
nullif the component has no descendants
-