Package com.inet.report
Class ReportProperties
java.lang.Object
com.inet.report.ReportProperties
- All Implemented Interfaces:
NodeParser,Serializable
The report properties describes global options for a report or sub report.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPaper orientation is system default.static final intPaper size is system default.static final intPaper orientation is landscape.static final int[]The sizes of all currently supported page formats in twips.static final intPaper size is 10 x 11 in.static final intPaper size is 10 x 14 in.static final intPaper size is 11 x 17 in.static final intPaper size is 15 x 11 in.static final intPaper size is 9 x 11 in.static final intPaper size is A2, 420 x 594 mm.static final intPaper size is A3, 297 x 420 mm.static final intPaper size is A4, 210 x 297 mm.static final intPaper size is A4 SMALL, 210 x 297 mm.static final intPaper size is A5, 148 x 210 mm.static final intPaper size is B4 (JIS), 257 x 364 mm.static final intPaper size is B4 (ISO), 250 x 353 mm.static final intPaper size is B5 (JIS), 182 x 257 mm.static final intPaper size is C size sheet, 431,7 x 558,7 mm.static final intPaper size is D size sheet, 558,7 x 863,4 mm .static final intPaper size is E size sheet, 863,4 x 1117,4 mm.static final intPaper size is Envelope #10, 4 1/8 x 9 1/2 in.static final intPaper size is Envelope #11, 4 1/2 x 10 3/8 in.static final intPaper size is Envelope #12, 4 3/4 x 11 in.static final intPaper size is Envelope #14, 5 x 11 1/2 in.static final intPaper size is Envelope #9, 3 7/8 x 8 7/8 in.static final intPaper size is Envelope B4, 250 x 353 mm.static final intPaper size is Envelope B5, 176 x 250 mm.static final intPaper size is Envelope B6, 176 x 125 mm.static final intPaper size is Envelope C3, 324 x 458 mm.static final intPaper size is Envelope C4, 229 x 324 mm.static final intPaper size is Envelope C5, 162 x 229 mm.static final intPaper size is Envelope C6, 114 x 162 mm.static final intPaper size is Envelope C65, 114 x 229 mm.static final intPaper size is Envelope DL, 110 x 220 mm.static final intPaper size is Envelope Italy, 110 x 230 mm.static final intPaper size is Envelope Monarch, 3 7/8 x 7 1/2 in.static final intPaper size is 6 3/4 Envelope, 3 5/8 x 6 1/2 in.static final intPaper size is Executive, 7 1/4 x 10 1/2 in.static final intPaper size is German Legal Fanfold, 8 1/2 x 13 in.static final intPaper size is German Standard Fanfold, 8 1/2 x 12 in.static final intPaper size is US Standard Fanfold, 14 7/8 x 11 in.static final intPaper size is Folio, 8 1/2 x 13 in.static final intPaper size is Japanese Postcard, 100 x 148 mm.static final intPaper size is Ledger, 17 x 11 in.static final intPaper size is Legal, 8 1/2 x 14 in.static final intPaper size is LETTER, 8 1/2 x 11 in.static final intPaper size is Letter Small, 8 1/2 x 11 in.static final intThe last possible paper.static final intPaper size is Note, 8 1/2 x 11 in.static final intPaper size is Quarto, 215 x 275 mm.static final intPaper size is Statement, 5 1/2 x 8 1/2 in.static final intPaper size is Tabloid, 11 x 17 in.static final intPaper orientation is portrait.static final intUser Defined Paper Size -
Method Summary
Modifier and TypeMethodDescriptionstatic intfindPaperFormat(int x, int y, boolean isLandscape) Find the best best match for paper format.String[]Returns the valid output formats for this report.intReturns the horizontal gap between multi-column labels.intReturns the height of a multi-column label.Returns the name of a multi-column label.
This will return the complete name for predefined labels of the i-net designer or the name you set before withsetLabelName(String).intReturns the width of a multi-column label.intReturns the bottom margin of the page in twips.intReturns the left margin of the page in twips.intReturns the right margin of the page in twips.intReturns the top margin of the page in twips.intReturns the format of the paper as a constant.intReturns the height of the report page in twips.intReturns the orientation of the paper.intReturns the width of the report page in twips.Returns the default formula/resource locale defined for the current report.intReturns the number of rows which will be cached in the row buffer.intReturns the vertical gap between multi-column labels.intReturns the major version of the report XML of the template underlying this report.intReturns the minor version of the report XML of the template underlying this report.booleanReturns the printing direction of a multi-column report.booleanReturnstrueif the report comes from i-net Clear Reports file format, elsefalse.booleanReturns whether the clipboard is enabled for the Java Viewer, that is, whether it is possible to copy text from the Viewer to the clipboard.booleanIf convertNullValuesToDefault is set to true the report will convert null values from the database to a 0 (for numeric fields) or a blank (for non-numeric fields).booleanReturns the value of the property 'distinct'.booleanFOR INTERNAL USE ONLY Internal method for reading report XMLbooleanReturns the flag ExportEnabled for this report.booleanShould be group header/footer be treated as an ordinary label in a multi-column report?booleanTest if the detail section of the report should be formatted in multiple columns of variable or fixed (labels) length.booleanReturns the flag FormPrint for this report.booleanReturns the flag GroupTreeVisible for this report.booleanReturns the value of the flag "Hide PageFooter inside ReportHeader".booleanDeprecated.booleanDeprecated.As of i-net Clear Reports 15, instead remove sort fields from the report withFields.removeSortField(int)booleanReturns if printing is enabled for this report.booleanReturnstrueif the used datasource configurations should save in the report file.booleanReturns the flag that controls the group tree nodes of suppressed group areas will be shown.booleanIf suppressIfNoRows is set to true the (sub)report will only be printed if rows are fetched from the database.booleanReturns whether or not this report is suited for buffering of rows.voidFOR INTERNAL USE ONLY Internal method for reading report XMLparseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) 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 Internal method for reading report XMLvoidsetAcrossThenDown(boolean acrossThenDown) Sets the printing direction of a multi-column report.voidsetClipboardEnabled(boolean value) Enable the clipboard of the new Java Viewer.voidsetConvertNullValuesToDefault(boolean convertNullValuesToDefault) If convertNullValuesToDefault is set to true the report will convert null values from the database to a 0 (for numeric fields) or a blank (for non-numeric fields).voidsetDistinct(boolean distinct) Set the value of the property 'distinct'.voidsetEnabledFormats(String[] formats) Sets a list of valid formats, that is, which formats it is possible to render.voidsetExportEnabled(boolean value) Enable or disable the export button and the export API of the new Java Viewer.voidsetFormatGroupsWithMultipleColumn(boolean formatGroupsWithMultipleColumn) Should be group header/footer be treated as an ordinary label in a multi-column report?voidsetFormatWithMultipleColumns(boolean val) Sets if the detail section of the report should be formatted in multiple columns of variable or fixed (labels) length.voidsetFormPrint(boolean value) Determines whether this report is a form - forms are never automatically resized if the designed margins are larger than the printable area, rather, the area which is not printable is truncated instead.voidsetGroupTreeVisible(boolean value) Enable or disable the GroupTree of the Java Viewer.voidsetHidePageFooterInsideReportHeader(boolean hidePageFooterInsideReportHeader) Set value of the flag "Hide PageFooter inside ReportHeader".voidsetHorizontal(int horizontal) Sets the horizontal gap between multi-column labels.voidsetIgnoreFiltering(boolean ignoreFiltering) Deprecated.As of i-net Clear Reports 15, instead remove the record selection from the report withReport.setRecordSelectionFormula(FormulaField)voidsetIgnoreSorting(boolean ignoreSorting) Deprecated.As of i-net Clear Reports 15, instead remove sort fields from the report withFields.removeSortField(int)voidsetLabelHeight(int labelHeight) Sets the height of a multi-column label.voidSets the label name, such as "User Defined Label" or "Address"voidsetLabelWidth(int labelWidth) Sets the width of a multi-column label.voidsetMarginBottom(int margin) Sets the bottom margin of the page in twips.voidsetMarginLeft(int margin) Sets the left margin of the page in twips.voidsetMarginRight(int margin) Sets the right margin of the page in twips.voidsetMarginTop(int margin) Sets the top margin of the page in twips.voidsetPaperHeight(int height) Sets the height of the report page in twips.
1 pica = 1/6 inch
1 point = 1/12 pica
1 twip = 1/20 point or 20 twips = 1 point
1 twip = 1/567 centimeter or 567 twips = 1 centimeter
1 twip = 1/1440 inch or 1440 twips = 1 inchvoidsetPaperOrient(int paperOrientation, int paperSize) Sets the orientation and size of the report for printing.voidsetPaperSize(int paperOrient, int paperFormat) Sets the paper width and paper height depending on the supplied paper format and orientation.voidsetPaperWidth(int width) Sets the width of the report page in twips.
1 pica = 1/6 inch
1 point = 1/12 pica
1 twip = 1/20 point or 20 twips = 1 point
1 twip = 1/567 centimeter or 567 twips = 1 centimeter
1 twip = 1/1440 inch or 1440 twips = 1 inchvoidsetPrintingEnabled(boolean value) Enable or disable the print button and the print API of the Java Viewer.voidsetReportLocale(Locale reportLocale) Sets the formula/resource default locale for the current report.voidsetRowBufferSize(int rowCount) Sets the row count which will be cached during the rendering process.voidsetSaveDatasource(boolean save) Set the flag if a copy of the datasource configuration should be saved in the report file.voidsetShowSuppressedGroupTreeNodes(boolean showSuppressedGroupTreeNodes) Sets the flag that controls the group tree nodes of suppressed group areas will be shown.voidsetSuppressIfNoRows(boolean suppressIfNoRows) If suppressIfNoRows is set to true the (sub)report will only be printed if rows are fetched from the database.voidsetVertical(int vertical) Sets the vertical gap between multi-column labels.
-
Field Details
-
DEFAULT_PAPER_ORIENTATION
public static final int DEFAULT_PAPER_ORIENTATIONPaper orientation is system default.- See Also:
-
PORTRAIT
public static final int PORTRAITPaper orientation is portrait.- See Also:
-
LANDSCAPE
public static final int LANDSCAPEPaper orientation is landscape.- See Also:
-
DEFAULT_PAPERSIZE
public static final int DEFAULT_PAPERSIZEPaper size is system default.- See Also:
-
PAPER_LETTER
public static final int PAPER_LETTERPaper size is LETTER, 8 1/2 x 11 in.- See Also:
-
PAPER_LETTER_SMALL
public static final int PAPER_LETTER_SMALLPaper size is Letter Small, 8 1/2 x 11 in.- See Also:
-
PAPER_TABLOID
public static final int PAPER_TABLOIDPaper size is Tabloid, 11 x 17 in.- See Also:
-
PAPER_LEDGER
public static final int PAPER_LEDGERPaper size is Ledger, 17 x 11 in.- See Also:
-
PAPER_LEGAL
public static final int PAPER_LEGALPaper size is Legal, 8 1/2 x 14 in.- See Also:
-
PAPER_STATEMENT
public static final int PAPER_STATEMENTPaper size is Statement, 5 1/2 x 8 1/2 in.- See Also:
-
PAPER_EXECUTIVE
public static final int PAPER_EXECUTIVEPaper size is Executive, 7 1/4 x 10 1/2 in.- See Also:
-
PAPER_A3
public static final int PAPER_A3Paper size is A3, 297 x 420 mm.- See Also:
-
PAPER_A4
public static final int PAPER_A4Paper size is A4, 210 x 297 mm.- See Also:
-
PAPER_A4_SMALL
public static final int PAPER_A4_SMALLPaper size is A4 SMALL, 210 x 297 mm.- See Also:
-
PAPER_A5
public static final int PAPER_A5Paper size is A5, 148 x 210 mm.- See Also:
-
PAPER_B4
public static final int PAPER_B4Paper size is B4 (JIS), 257 x 364 mm.- See Also:
-
PAPER_B5
public static final int PAPER_B5Paper size is B5 (JIS), 182 x 257 mm.- See Also:
-
PAPER_FOLIO
public static final int PAPER_FOLIOPaper size is Folio, 8 1/2 x 13 in.- See Also:
-
PAPER_QUATRO
public static final int PAPER_QUATROPaper size is Quarto, 215 x 275 mm.- See Also:
-
PAPER_10_X_14
public static final int PAPER_10_X_14Paper size is 10 x 14 in.- See Also:
-
PAPER_11_X_17
public static final int PAPER_11_X_17Paper size is 11 x 17 in.- See Also:
-
PAPER_NOTE
public static final int PAPER_NOTEPaper size is Note, 8 1/2 x 11 in.- See Also:
-
PAPER_ENVELOPE_9
public static final int PAPER_ENVELOPE_9Paper size is Envelope #9, 3 7/8 x 8 7/8 in.- See Also:
-
PAPER_ENVELOPE_10
public static final int PAPER_ENVELOPE_10Paper size is Envelope #10, 4 1/8 x 9 1/2 in.- See Also:
-
PAPER_ENVELOPE_11
public static final int PAPER_ENVELOPE_11Paper size is Envelope #11, 4 1/2 x 10 3/8 in.- See Also:
-
PAPER_ENVELOPE_12
public static final int PAPER_ENVELOPE_12Paper size is Envelope #12, 4 3/4 x 11 in.- See Also:
-
PAPER_ENVELOPE_14
public static final int PAPER_ENVELOPE_14Paper size is Envelope #14, 5 x 11 1/2 in.- See Also:
-
PAPER_C_SHEET
public static final int PAPER_C_SHEETPaper size is C size sheet, 431,7 x 558,7 mm.- See Also:
-
PAPER_D_SHEET
public static final int PAPER_D_SHEETPaper size is D size sheet, 558,7 x 863,4 mm .- See Also:
-
PAPER_E_SHEET
public static final int PAPER_E_SHEETPaper size is E size sheet, 863,4 x 1117,4 mm.- See Also:
-
PAPER_ENVELOPE_DL
public static final int PAPER_ENVELOPE_DLPaper size is Envelope DL, 110 x 220 mm.- See Also:
-
PAPER_ENVELOPE_C5
public static final int PAPER_ENVELOPE_C5Paper size is Envelope C5, 162 x 229 mm.- See Also:
-
PAPER_ENVELOPE_C3
public static final int PAPER_ENVELOPE_C3Paper size is Envelope C3, 324 x 458 mm.- See Also:
-
PAPER_ENVELOPE_C4
public static final int PAPER_ENVELOPE_C4Paper size is Envelope C4, 229 x 324 mm.- See Also:
-
PAPER_ENVELOPE_C6
public static final int PAPER_ENVELOPE_C6Paper size is Envelope C6, 114 x 162 mm.- See Also:
-
PAPER_ENVELOPE_C65
public static final int PAPER_ENVELOPE_C65Paper size is Envelope C65, 114 x 229 mm.- See Also:
-
PAPER_ENVELOPE_B4
public static final int PAPER_ENVELOPE_B4Paper size is Envelope B4, 250 x 353 mm.- See Also:
-
PAPER_ENVELOPE_B5
public static final int PAPER_ENVELOPE_B5Paper size is Envelope B5, 176 x 250 mm.- See Also:
-
PAPER_ENVELOPE_B6
public static final int PAPER_ENVELOPE_B6Paper size is Envelope B6, 176 x 125 mm.- See Also:
-
PAPER_ENVELOPE_ITALY
public static final int PAPER_ENVELOPE_ITALYPaper size is Envelope Italy, 110 x 230 mm.- See Also:
-
PAPER_ENVELOPE_MONARCH
public static final int PAPER_ENVELOPE_MONARCHPaper size is Envelope Monarch, 3 7/8 x 7 1/2 in.- See Also:
-
PAPER_ENVELOPE_PERSONAL
public static final int PAPER_ENVELOPE_PERSONALPaper size is 6 3/4 Envelope, 3 5/8 x 6 1/2 in.- See Also:
-
PAPER_FANFOLD_US
public static final int PAPER_FANFOLD_USPaper size is US Standard Fanfold, 14 7/8 x 11 in.- See Also:
-
PAPER_FANFOLD_STD_GERMAN
public static final int PAPER_FANFOLD_STD_GERMANPaper size is German Standard Fanfold, 8 1/2 x 12 in.- See Also:
-
PAPER_FANFOLD_LEGAL_GERMAN
public static final int PAPER_FANFOLD_LEGAL_GERMANPaper size is German Legal Fanfold, 8 1/2 x 13 in.- See Also:
-
PAPER_B4_ISO
public static final int PAPER_B4_ISOPaper size is B4 (ISO), 250 x 353 mm.- See Also:
-
PAPER_JAPANESE_POSTCARD
public static final int PAPER_JAPANESE_POSTCARDPaper size is Japanese Postcard, 100 x 148 mm.- See Also:
-
PAPER_9_X_11
public static final int PAPER_9_X_11Paper size is 9 x 11 in.- See Also:
-
PAPER_10_X_11
public static final int PAPER_10_X_11Paper size is 10 x 11 in.- See Also:
-
PAPER_15_X_11
public static final int PAPER_15_X_11Paper size is 15 x 11 in.- See Also:
-
PAPER_MAX
public static final int PAPER_MAXThe last possible paper. All integers betweenDEFAULT_PAPERSIZEandPAPER_MAXare valid.- See Also:
-
pageSizes
public static final int[] pageSizesThe sizes of all currently supported page formats in twips. Returns the size of a page according to a symbol (i.e. ReportProperties.PAPER_A4) with
ReportProperties.pageSizes[2*(ReportProperties.PAPER_A4-1)]; or
ReportProperties.pageSizes[(2*(ReportProperties.PAPER_A4-1))+1]; -
PAPER_A2
public static final int PAPER_A2Paper size is A2, 420 x 594 mm.- See Also:
-
USERDEFINED_PAPER
public static final int USERDEFINED_PAPERUser Defined Paper Size- See Also:
-
-
Method Details
-
isSuppressIfNoRows
public boolean isSuppressIfNoRows()If suppressIfNoRows is set to true the (sub)report will only be printed if rows are fetched from the database. Otherwise nothing will be printed.- Returns:
- Returns the suppressIfNoRows.
- Since:
- 6.0
-
setSuppressIfNoRows
public void setSuppressIfNoRows(boolean suppressIfNoRows) If suppressIfNoRows is set to true the (sub)report will only be printed if rows are fetched from the database. Otherwise nothing will be printed.- Parameters:
suppressIfNoRows- The suppressIfNoRows to set.- Since:
- 6.0
-
setDistinct
public void setDistinct(boolean distinct) Set the value of the property 'distinct'. If it istruethen duplicated records will not be fetched.- Parameters:
distinct-trueif distinct records should be fetched only, else false.- Since:
- 6.1
-
isDistinct
public boolean isDistinct()Returns the value of the property 'distinct'. Iftrueduplicated records will not be fetched.- Returns:
trueif distinct records should be fetched only, else false.- Since:
- 7.0
-
isConvertNullValuesToDefault
public boolean isConvertNullValuesToDefault()If convertNullValuesToDefault is set to true the report will convert null values from the database to a 0 (for numeric fields) or a blank (for non-numeric fields).- Returns:
- Returns the convertNullValuesToDefault
- Since:
- 6.0
-
setConvertNullValuesToDefault
public void setConvertNullValuesToDefault(boolean convertNullValuesToDefault) If convertNullValuesToDefault is set to true the report will convert null values from the database to a 0 (for numeric fields) or a blank (for non-numeric fields).- Parameters:
convertNullValuesToDefault- The convertNullValuesToDefault to set.- Since:
- 6.0
-
isShowSuppressedGroupTreeNodes
public boolean isShowSuppressedGroupTreeNodes()Returns the flag that controls the group tree nodes of suppressed group areas will be shown.- Returns:
- the flag
- Since:
- 8.1
- See Also:
-
setShowSuppressedGroupTreeNodes
public void setShowSuppressedGroupTreeNodes(boolean showSuppressedGroupTreeNodes) Sets the flag that controls the group tree nodes of suppressed group areas will be shown.- Parameters:
showSuppressedGroupTreeNodes- the flag- Since:
- 8.1
- See Also:
-
setRowBufferSize
public void setRowBufferSize(int rowCount) Sets the row count which will be cached during the rendering process. We advise to set this at 30000 rows. The minimum size of buffer is 3 rows. A row count of 0 disables the row buffer. Decrease this value if the engine throws OutOfMemoryError but note that this increases the rendering time.- Parameters:
rowCount- The amount of rows to be cached during the rendering process. 30000 is usually a good value.- Since:
- 6.1
- See Also:
-
getRowBufferSize
public int getRowBufferSize()Returns the number of rows which will be cached in the row buffer.- Returns:
- Number of rows or 0 if row buffer is disabled.
- Since:
- 6.1
- See Also:
-
isValidForRowBuffer
public boolean isValidForRowBuffer()Returns whether or not this report is suited for buffering of rows. Buffering rows causes the engine to only fetch parts of the data at a time, reducing memory usage, but raising the rendering time. Row buffering is intended for rendering large amounts of data. In order to use row buffering, the report should not contain groups, summary functions, charts, or crosstabs. To use row buffering, set the buffer size with setRowBufferSize.- Returns:
- true if this report is suited for row buffering
- Since:
- 6.1
- See Also:
-
setPaperOrient
Sets the orientation and size of the report for printing.- Parameters:
paperOrientation- The orientation of the paperpaperSize- The size of the paper.- Throws:
IllegalArgumentException- if paperSize is no valid Paperformat.ReportException- Changing the papersize failed due to an invalid report state.- Since:
- 6.0
- See Also:
-
DEFAULT_PAPER_ORIENTATIONPORTRAITLANDSCAPEDEFAULT_PAPERSIZEPAPER_LETTERPAPER_LETTER_SMALLPAPER_TABLOIDPAPER_LEDGERPAPER_LEGALPAPER_STATEMENTPAPER_EXECUTIVEPAPER_A3PAPER_A4PAPER_A4_SMALLPAPER_A5PAPER_B4PAPER_B5PAPER_FOLIOPAPER_QUATROPAPER_10_X_14PAPER_11_X_17PAPER_NOTEPAPER_ENVELOPE_9PAPER_ENVELOPE_10PAPER_ENVELOPE_11PAPER_ENVELOPE_12PAPER_ENVELOPE_14PAPER_C_SHEETPAPER_D_SHEETPAPER_E_SHEETPAPER_ENVELOPE_DLPAPER_ENVELOPE_C5PAPER_ENVELOPE_C3PAPER_ENVELOPE_C4PAPER_ENVELOPE_C6PAPER_ENVELOPE_C65PAPER_ENVELOPE_B4PAPER_ENVELOPE_B5PAPER_ENVELOPE_B6PAPER_ENVELOPE_ITALYPAPER_ENVELOPE_MONARCHPAPER_ENVELOPE_PERSONALPAPER_FANFOLD_USPAPER_FANFOLD_STD_GERMANPAPER_FANFOLD_LEGAL_GERMANPAPER_B4_ISOPAPER_JAPANESE_POSTCARDPAPER_9_X_11PAPER_10_X_11PAPER_MAX
-
getPaperOrient
public int getPaperOrient()Returns the orientation of the paper.- Returns:
- one of the following constants
PORTRAIT,LANDSCAPEorDEFAULT_PAPER_ORIENTATION - Since:
- 6.0
- See Also:
-
getPaperHeight
public int getPaperHeight()Returns the height of the report page in twips.- Returns:
- the paper height value
- Since:
- 6.0
-
setPaperHeight
public void setPaperHeight(int height) Sets the height of the report page in twips.
1 pica = 1/6 inch
1 point = 1/12 pica
1 twip = 1/20 point or 20 twips = 1 point
1 twip = 1/567 centimeter or 567 twips = 1 centimeter
1 twip = 1/1440 inch or 1440 twips = 1 inch- Parameters:
height- the new paper height- Throws:
IllegalArgumentException- if height is negative or if margin top and margin bottom are greater than height.- Since:
- 6.0
-
getPaperWidth
public int getPaperWidth()Returns the width of the report page in twips.- Returns:
- the paper width value
- Since:
- 6.0
-
setPaperWidth
Sets the width of the report page in twips.
1 pica = 1/6 inch
1 point = 1/12 pica
1 twip = 1/20 point or 20 twips = 1 point
1 twip = 1/567 centimeter or 567 twips = 1 centimeter
1 twip = 1/1440 inch or 1440 twips = 1 inch- Parameters:
width- the new paper width- Throws:
IllegalArgumentException- if width is negative or if margin left and margin right are greater than width.ReportException- The currently used Engine isn't valid anymore.- Since:
- 6.0
-
getPaperFormat
public int getPaperFormat()Returns the format of the paper as a constant. See the various PAPER constants.- Returns:
- the paper format of this report
- Since:
- 6.0
-
findPaperFormat
public static int findPaperFormat(int x, int y, boolean isLandscape) Find the best best match for paper format.- Parameters:
x- width in Twipsy- height in TwipsisLandscape- true for landscape page orientation- Returns:
- constant for paper format
- Throws:
IllegalArgumentException- if x or y is less than 1- Since:
- 14.0
-
getLabelWidth
public int getLabelWidth()Returns the width of a multi-column label.- Returns:
- width of multi-column label
- Since:
- 6.0
-
setLabelWidth
public void setLabelWidth(int labelWidth) Sets the width of a multi-column label.- Parameters:
labelWidth- new label width- Throws:
IllegalArgumentException- if labelWidth is negative- Since:
- 6.0
-
getLabelHeight
public int getLabelHeight()Returns the height of a multi-column label.- Returns:
- height of multi-column label
- Since:
- 6.0
-
setLabelHeight
public void setLabelHeight(int labelHeight) Sets the height of a multi-column label.- Parameters:
labelHeight- new height- Throws:
IllegalArgumentException- if labelHeight is negative- Since:
- 6.0
-
getHorizontal
public int getHorizontal()Returns the horizontal gap between multi-column labels.- Returns:
- horizontal gap between labels
- Since:
- 6.0
-
setHorizontal
public void setHorizontal(int horizontal) Sets the horizontal gap between multi-column labels.- Parameters:
horizontal- new gap- Throws:
IllegalArgumentException- if horizontal is negative- Since:
- 6.0
-
getVertical
public int getVertical()Returns the vertical gap between multi-column labels.- Returns:
- vertical gap between labels
- Since:
- 6.0
-
setVertical
public void setVertical(int vertical) Sets the vertical gap between multi-column labels.- Parameters:
vertical- new gap- Throws:
IllegalArgumentException- if vertical is negative- Since:
- 6.0
-
setLabelName
Sets the label name, such as "User Defined Label" or "Address"- Parameters:
s- label name to set.- Since:
- 6.0
- See Also:
-
getLabelName
Returns the name of a multi-column label.
This will return the complete name for predefined labels of the i-net designer or the name you set before withsetLabelName(String).- Returns:
- String type of the multi-column label
- Since:
- 6.0
-
isAcrossThenDown
public boolean isAcrossThenDown()Returns the printing direction of a multi-column report.- Returns:
trueif printing goes first across the page (left-right-top-down),falseotherwise.- Since:
- 7.0
-
setAcrossThenDown
public void setAcrossThenDown(boolean acrossThenDown) Sets the printing direction of a multi-column report.- Parameters:
acrossThenDown- true if printing goes first across the page (left-right-top-down)- Since:
- 6.0
-
isFormatGroupsWithMultipleColumn
public boolean isFormatGroupsWithMultipleColumn()Should be group header/footer be treated as an ordinary label in a multi-column report?- Returns:
trueif the group's header/footer are lined up with the other fields in a multi-column report,falseotherwise.- Since:
- 7.0
-
setFormatGroupsWithMultipleColumn
public void setFormatGroupsWithMultipleColumn(boolean formatGroupsWithMultipleColumn) Should be group header/footer be treated as an ordinary label in a multi-column report?- Parameters:
formatGroupsWithMultipleColumn- true if the group's header/footer should be lined up with the other fields in a multi-column report- Since:
- 6.0
-
setMarginTop
public void setMarginTop(int margin) Sets the top margin of the page in twips.- Parameters:
margin- the new top margin- Throws:
IllegalArgumentException- if margin is negative or if top and bottom margin are greater than page height- Since:
- 6.0
-
getMarginTop
public int getMarginTop()Returns the top margin of the page in twips.- Returns:
- the top margin value
- Since:
- 6.0
-
setMarginBottom
public void setMarginBottom(int margin) Sets the bottom margin of the page in twips.- Parameters:
margin- the new bottom margin- Throws:
IllegalArgumentException- if margin is negative or if top and bottom margin are greater than page height- Since:
- 6.0
-
getMarginBottom
public int getMarginBottom()Returns the bottom margin of the page in twips.- Returns:
- the bottom margin value
- Since:
- 6.0
-
setMarginLeft
Sets the left margin of the page in twips.- Parameters:
margin- the new left margin- Throws:
IllegalArgumentException- if margin is negativeReportException- if left and right margin are greater than page width- Since:
- 6.0
-
getMarginLeft
public int getMarginLeft()Returns the left margin of the page in twips.- Returns:
- the left margin value
- Since:
- 6.0
-
setMarginRight
Sets the right margin of the page in twips.- Parameters:
margin- the new right margin- Throws:
ReportException- if left and right margin are greater than page widthIllegalArgumentException- if margin is negative- Since:
- 6.0
-
getMarginRight
public int getMarginRight()Returns the right margin of the page in twips.- Returns:
- the right margin value
- Since:
- 6.0
-
isFormatWithMultipleColumns
public boolean isFormatWithMultipleColumns()Test if the detail section of the report should be formatted in multiple columns of variable or fixed (labels) length.- Returns:
trueif the detail section should be formatted with multiple columns,falseotherwise.- Since:
- 6.0
-
setFormatWithMultipleColumns
public void setFormatWithMultipleColumns(boolean val) Sets if the detail section of the report should be formatted in multiple columns of variable or fixed (labels) length.- Parameters:
val-trueif the detail section should be formatted with multiple columns,falseotherwise.- Since:
- 6.0
-
setPaperSize
Sets the paper width and paper height depending on the supplied paper format and orientation. If the paper format is one of the pre-defined likePAPER_A4then the paper width smaller side of the paper forPORTRAITorientation and the paper height the wider side or vise versa forLANDSCAPE. If the paper format isUSERDEFINED_PAPERthen the width and height are not changed as they have to be set manually. In case the paper format isDEFAULT_PAPERSIZEthe width and height will be set using the default paper size defined in the i-net Clear Reports configuration regarding the supplied paper orientation. If an unknown paper format is supplied a warning will be written to the log and paper formatPAPER_LETTERwill be set.- Parameters:
paperOrient- The paper orientation to set for this report.paperFormat- The paper format to set for this report.- Throws:
ReportException- If an invalid page width shall be set.- Since:
- 6.0
-
setFormPrint
public void setFormPrint(boolean value) Determines whether this report is a form - forms are never automatically resized if the designed margins are larger than the printable area, rather, the area which is not printable is truncated instead. The default value is false.- Parameters:
value-trueif form print will be enabled for this report,falseotherwise.- Since:
- 7.0
-
isFormPrint
public boolean isFormPrint()Returns the flag FormPrint for this report.- Returns:
trueif form print is enabled for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
setPrintingEnabled
public void setPrintingEnabled(boolean value) Enable or disable the print button and the print API of the Java Viewer.- Disabled, Viewer API print methods will have no effect.
- Enabled, the button can be modified with the API.
- Parameters:
value-trueif printing will be enabled,falseotherwise.- Since:
- 7.0
- See Also:
-
isPrintingEnabled
public boolean isPrintingEnabled()Returns if printing is enabled for this report.- Returns:
trueif printing is enabled for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
setEnabledFormats
Sets a list of valid formats, that is, which formats it is possible to render. All values that can be used in the Engine Constructor are valid.- Parameters:
formats- export formats which are valid for this report,nullif all formats are valid- Since:
- 7.0
- See Also:
-
getEnabledFormats
Returns the valid output formats for this report.- Returns:
- the export formats which are valid for this report or
nullif all formats are valid - Since:
- 7.0
- See Also:
-
setClipboardEnabled
public void setClipboardEnabled(boolean value) Enable the clipboard of the new Java Viewer. If disabled, then the user can't copy text from the viewer to the clipboard. This setting is on by default.- Parameters:
value-trueif the clipboard will be enabled for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
isClipboardEnabled
public boolean isClipboardEnabled()Returns whether the clipboard is enabled for the Java Viewer, that is, whether it is possible to copy text from the Viewer to the clipboard.- Returns:
trueif the clipboard is enabled for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
setExportEnabled
public void setExportEnabled(boolean value) Enable or disable the export button and the export API of the new Java Viewer. If disabled, the viewer API export methods will have no effect. If enabled, the button can be modified with the API.- Parameters:
value-trueif the export will be enabled for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
isExportEnabled
public boolean isExportEnabled()Returns the flag ExportEnabled for this report.- Returns:
trueif the export is enabled for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
setGroupTreeVisible
public void setGroupTreeVisible(boolean value) Enable or disable the GroupTree of the Java Viewer. If disabled, the viewer API group tree methods will have no effect. If enabled, the button can be modified with the API.- Parameters:
value-trueif the group tree will be visible for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
isGroupTreeVisible
public boolean isGroupTreeVisible()Returns the flag GroupTreeVisible for this report.- Returns:
trueif the group tree is visible for this report,falseotherwise.- Since:
- 7.0
- See Also:
-
isIgnoreSorting
Deprecated.As of i-net Clear Reports 15, instead remove sort fields from the report withFields.removeSortField(int)Returns the flag that indicates whether or not the sorting performed on engine.- Returns:
trueif sorting is not performed on engine,falseotherwise.- Since:
- 7.7
- See Also:
-
setIgnoreSorting
Deprecated.As of i-net Clear Reports 15, instead remove sort fields from the report withFields.removeSortField(int)Sets the flag that deactivates the sorting on engine. You can use this flag to deactivate the sorting on engine by setSQL, setData, Command. Note this flag do not takes effect if your report contains a group with specified, by summary or hierarchical sort order.- Parameters:
ignoreSorting- the flag, default false.- Since:
- 7.7
- See Also:
-
isIgnoreFiltering
Deprecated.As of i-net Clear Reports 15, instead remove the record selection from the report withReport.setRecordSelectionFormula(FormulaField)Returns whether the data filtering performed on engine or not.- Returns:
trueif data filtering is not performed on engine,falseotherwise.- Since:
- 7.7
- See Also:
-
setIgnoreFiltering
Deprecated.As of i-net Clear Reports 15, instead remove the record selection from the report withReport.setRecordSelectionFormula(FormulaField)Set if the data filtering on engine should be deactivated or not. You can use this flag to deactivate the filtering on engine by setSQL, setData, Command.- Parameters:
ignoreFiltering-trueif data filtering on engine should be deactivated,falseotherwise.- Since:
- 7.7
- See Also:
-
parseElement
public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) throws FatalParserExceptionFOR 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.
- Specified by:
parseElementin interfaceNodeParser- Parameters:
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.- Returns:
- The NodeParser sub-element if one needed to be created, or null if none was created.
- Throws:
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 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)
- Specified by:
parseTextin interfaceNodeParser- Parameters:
text- 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.
- Specified by:
parseEndElementin interfaceNodeParser- Parameters:
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.- Throws:
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.
-
isDOMParser
public boolean isDOMParser()FOR INTERNAL USE ONLY Internal method for reading report XMLReturns whether this node is to be read via a DOM parser.
- Specified by:
isDOMParserin interfaceNodeParser- Returns:
- true if this node is to be read via a DOM parser, false otherwise.
-
parseDOM
FOR INTERNAL USE ONLY Internal method for reading report XMLParses the node.
- Specified by:
parseDOMin interfaceNodeParser- Parameters:
node- the nodeparserMap- The map of current Parser.- Throws:
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.
-
setReportLocale
Sets the formula/resource default locale for the current report. If the report locale is set, any call to get the servers default locale will return the report locale instead, while the report gets rendered.
InvokingEngine.setLocale(Locale)orEngine.setClientLocale(Locale)will override the report locale, because the report locale only replaces the default locale.- Parameters:
reportLocale- The new default locale for the current report. Ifnull, the locale of the Java Virtual Machine will be used as default locale.- Since:
- 8.2
- See Also:
-
getReportLocale
Returns the default formula/resource locale defined for the current report. If this property is not set, it will returnnull.
This locale does not reflect, which locale is used to render the report because it might be overridden byEngine.setLocale(Locale)orEngine.setClientLocale(Locale). It only indicates, which default will be used.- Returns:
- The default locale set by the report or
null, if this property is not set. - Since:
- 8.2
- See Also:
-
isCCFormat
public boolean isCCFormat()Returnstrueif the report comes from i-net Clear Reports file format, elsefalse.- Returns:
- Whether or not the report is based on a template in i-net Clear Reports RPT format.
- Since:
- 9.0
-
getXMLMajorVersion
public int getXMLMajorVersion()Returns the major version of the report XML of the template underlying this report. Note: returns -1 if the report template underlying this report is not XML-based. For example, a report created with i-net Crystal-Clear 8.2 would return 8.- Returns:
- the major version of the XML of the template underlying this report. -1 if not XML-based
- Since:
- 9.0
-
getXMLMinorVersion
public int getXMLMinorVersion()Returns the minor version of the report XML of the template underlying this report. Note: returns -1 if the report template underlying this report is not XML-based. For example, a report created with i-net Crystal-Clear 8.2 would return 2.- Returns:
- the minor version of the XML of the template underlying this report. -1 if not XML-based
- Since:
- 9.0
-
setSaveDatasource
public void setSaveDatasource(boolean save) Set the flag if a copy of the datasource configuration should be saved in the report file. NOTE: THIS WILL ENABLE ANYONE WITH THIS REPORT TEMPLATE TO ACCESS THE DATA IN YOUR DATA SOURCE.- Parameters:
save- true, save the datasource configuration with next save- Since:
- 9.2
-
isSaveDatasource
public boolean isSaveDatasource()Returnstrueif the used datasource configurations should save in the report file. This is helpful if the report is used on different computers in a intranet.- Returns:
- true, if a copy is saved.
- Since:
- 9.2
-
Report.setRecordSelectionFormula(FormulaField)