|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.report.engine.dynamicjasper.DynamicJasperEngine
This class is a default implementation of ReportEngine to allow using JasperReports in Table reports.
It is used DynamicJasper library (version 3.0.13 - LGPL license) : http://dynamicjasper.sourceforge.net/ to build reports dynamically
at runtime.
Required libraries: checkLibraries()
| Field Summary | |
static java.lang.String |
APRIL
|
static java.lang.String |
AUGUST
|
protected boolean |
bPreviousEvaluation
|
protected static boolean |
checkJasperLibreries
|
static int |
columnWidth
|
static java.lang.String |
dateNameSeparator
|
static java.lang.String |
DEBUG
|
static java.lang.String |
DECEMBER
|
static int |
DEFAULT_COLUMN_WIDTH
|
static java.lang.String |
DEFAULT_JRXML_TEMPLATE_LANDSCAPE
|
static java.lang.String |
DEFAULT_JRXML_TEMPLATE_LANDSCAPE_NO_LOGO
|
static java.lang.String |
DEFAULT_JRXML_TEMPLATE_PORTRAIT
|
static java.lang.String |
DEFAULT_JRXML_TEMPLATE_PORTRAIT_NO_LOGO
|
static int |
DEFAULT_PADDING_FOR_GROUPS
|
static int |
DEFAULT_WIDTH_ROW_NUMBERS
|
protected Style |
defaultColumnDataStyle
|
protected Style |
defaultHeaderForGroupStyle
|
protected Style |
defaultHeaderForMultiGroupStyle
|
protected Style |
defaultHeaderStyle
|
protected Style |
defaultSubtitleStyle
|
protected Style |
defaultTitleStyle
|
static int |
defaultVirtualizerCacheSize
|
protected DynamicReport |
dr
|
protected CustomDynamicReportBuilder |
drb
Builder for reports, with this instance is built the report. |
java.lang.String |
dynamicGroupIdentifier
|
protected EntityResult |
erData
|
protected TableModelDataSource |
erDataSource
Objects that implements Jasper interface JRDataSource to store report data. |
static java.lang.String |
ERROR
|
static java.lang.String |
FATAL
|
static java.lang.String |
FEBRUARY
|
static java.lang.String |
FIRST_QUARTER
|
static java.lang.String |
FOURTH_QUARTER
|
protected GroupBuilder |
gb1
Group builder |
static java.lang.String |
GROUP_BY_DEFAULT
|
static java.lang.String |
GROUP_COUNT_LABEL
|
static java.lang.String |
groupCloseCharacter
|
static java.lang.String |
groupDateSeparator
|
static java.lang.String |
groupOpenCharacter
|
protected java.util.Hashtable |
hColsPositions
|
protected java.util.Hashtable |
hMultiGroupColumns
|
protected java.util.Hashtable |
hRenderColumns
|
protected java.util.Hashtable |
hVirtualColumns
It contains the equivalences between column and its virtualcolumn. |
static java.lang.String |
INFO
|
protected boolean |
isfocusAdapterAdded
|
protected boolean |
isRegisteredVirtualizer
|
protected boolean |
isShowedDateInReportFooter
|
static boolean |
isShowedDateInReportFooterByDefault
|
protected boolean |
isShowedPageInReportFooter
|
static boolean |
isShowedPageInReportFooterByDefault
|
protected boolean |
isShowedSubtitle
|
static boolean |
isShowedSubtitleByDefault
|
protected boolean |
isShowedTitle
|
static boolean |
isShowedTitleByDefault
|
protected boolean |
isUsedVirtualizer
|
static java.lang.String |
JANUARY
|
protected static boolean |
jasperLibreries
|
protected JasperPrint |
jp
|
static java.lang.String |
JULY
|
static java.lang.String |
JUNE
|
static java.lang.String |
logLevel
|
static java.lang.String |
MARCH
|
static java.lang.String |
MAY
|
protected javax.swing.table.TableModel |
model
|
static java.lang.String |
NOVEMBER
|
static java.lang.String |
numericPattern
Deprecated. in 5.2060EN-0.1. In next versions numeric patterns for reports are retrieved from table renderers automatically. This variable is ignored. |
static java.lang.String |
OCTOBER
|
protected Style |
oddRowBackgroundStyle
|
static int |
paddingForGroups
|
protected java.util.Hashtable |
parameters
|
protected DefaultReportDialog |
reportDialog
Instance for report dialog (this report dialog contains all elements in panel that is showed when user presses the report button in Table). |
static java.lang.String |
reportLogoOnlyForFirstPage
|
static java.lang.String |
reportLogoPath
|
protected EntityResult |
resultmodel
|
static java.lang.String |
SECOND_QUARTER
|
static java.lang.String |
SEPTEMBER
|
protected java.lang.String |
sHeaderGroupingDate
|
protected TableSorter |
sortermodel
|
protected Style |
styleFooterVariable
|
protected Style |
styleGroupFooterNumberOcurrencesVariable
|
protected Style |
styleGroupFooterVariable
|
static java.lang.String |
THIRD_QUARTER
|
static java.lang.String |
TRACE
|
static boolean |
useTemplatesWithDefaultLogo
|
static boolean |
useVirtualizerByDefault
|
protected CustomJasperViewer |
viewer
|
static java.lang.String |
VIRTUAL_ORDERING_SUFFIX
|
static java.lang.String |
VIRTUAL_SUFFIX
Suffix added to virtual column at the end. |
protected JRVirtualizer |
virtualizer
|
java.util.List |
vMultiGroupColumns
|
static java.lang.String |
WARN
|
static int |
widthRowNumbers
|
| Constructor Summary | |
DynamicJasperEngine()
|
|
| Method Summary | |
void |
applyFunctionForColumn(AbstractColumn column,
GroupBuilder group)
Apply function for a specific column. |
void |
buildColumns()
It is the method called to build columns in report |
protected GroupBuilder |
buildGroup(int groupIndex,
java.lang.String groupColumn,
java.lang.Class groupClass)
Internal method used to create a group. |
void |
buildGroups()
Build groups from selected group columns. |
protected GroupBuilder |
buildMultiGroup(int groupIndex,
java.util.Vector groupColumns,
java.util.Vector groupClasses,
boolean multiGroupContainsSubgroups)
Internal method used to create a multi group. |
void |
buildOptions()
Creates the JPopUpMenu for options: include row number, show column names,... |
void |
buildReportDetail()
Build the report detail: columns and groups. |
void |
buildReportFooter()
Builds the report footer. |
void |
buildReportHeader()
Builds the report header. |
static boolean |
checkJasperLibraries()
|
boolean |
checkLibraries()
Requires: Dynamic jasper 3.09 Jasperreports 3.5.1 commons-beanutils commons-collections commons-logging iText2.0 (only for PDF export) |
void |
clearReportVariables()
Method called before report is built. |
void |
clearVirtualColumns()
Clear table model and virtual columns Hashtable.. |
void |
close()
Invalidates the viewer. |
AbstractColumn |
configureColumn(AbstractColumn column,
java.lang.String columnName,
java.lang.Class columnClass)
Set properties for column: Print Blanks when null values Name of column Title of column Default width for column (It is calculated dynamically) |
ColumnBuilder |
configureColumnBuilder(ColumnBuilder cb,
java.lang.String columnName,
java.lang.Class columnClass)
Sets the property for column builder. |
protected void |
configureColumnRenders()
|
GroupBuilder |
configureGroupBuilder(GroupBuilder gb1,
AbstractColumn column)
Configures group builder for single groups |
AbstractColumn |
configureGroupColumn(AbstractColumn column,
java.lang.String groupColumn,
java.lang.Class groupClass,
int groupIndex)
Set properties for column in single group: NOTE: Implementation is equals to configureMultiGroupColumn but it is duplicated for make easier future inheritance and modularity. |
ColumnBuilder |
configureGroupColumnBuilder(ColumnBuilder cb,
java.lang.String groupColumn,
java.lang.Class groupClass)
Set properties for column builder in simple group: Set column builder property Title of column builder Style for column builder Default width for column (It is calculated dynamically) |
void |
configureGroupFooterVariables(GroupBuilder gb1,
AbstractColumn column)
Configures and applies variables in group footer. |
void |
configureGroupNumberOfOcurrencesLabel(GroupBuilder gb1,
java.lang.String groupColumn)
Creates and sets the label to group indicating the number of ocurrences. |
GroupBuilder |
configureMultiGroupBuilder(GroupBuilder gb1,
AbstractColumn column,
boolean multiGroupContainsSubgroups)
Configures group builder for multiple groups |
AbstractColumn |
configureMultiGroupColumn(AbstractColumn column,
java.lang.String groupColumn,
java.lang.Class groupClass,
int groupIndex)
Set properties for column in multiple group: NOTE: Implementation is equals to configureGroupColumn but it is duplicated for make easier future inheritance and modularity. |
ColumnBuilder |
configureMultiGroupColumnBuilder(ColumnBuilder cb,
java.lang.String groupColumn,
java.lang.Class groupClass,
java.util.Vector groupColumns)
Set properties for column builder in multiple group: Set column builder property Title of column builder Expression to group by Style for column builder Default width for column (It is calculated dynamically) |
protected java.util.Vector |
configureMultiGroupColumnClasses(java.util.Vector groupClasses)
Iterates in group classes and modify java.sql.Date columns by java.util.Date columns |
void |
configureTemplate()
Fixes in report the selected template. |
CustomDynamicReportBuilder |
configureVirtualColumn(CustomDynamicReportBuilder drb,
java.lang.String columnName,
java.lang.Class columnClass)
Create and register a hidden virtual column for dates. |
java.lang.String |
createDatePattern(DateCellRenderer rendererColumn)
|
java.lang.String |
createDecimalPattern(RealCellRenderer rendererColumn)
|
void |
createModel()
Creates the model. |
void |
createReportBuilder()
Creates the report builder. |
void |
createRowNumberColumn()
Creates and adds a column to show the number of rows in report. |
static javax.swing.table.TableModel |
createTableModel(java.util.Hashtable res,
boolean returnEmptyStrings,
boolean convertBB2Im,
boolean convertBooleanToIm)
Creates a table model that replaces complete null columns by empty strings. |
void |
createViewer(JasperPrint jp,
DefaultReportDialog reportDialog)
Creates the jasper viewer to show in report dialog. |
void |
createVirtualColumns()
|
void |
dispose()
Sets the dynamic report builder to null. |
boolean |
existFunctionForColumn(AbstractColumn column)
This method checks is a specified column is numeric. |
boolean |
existFunctions()
Checks whether any column in function list is selected. |
boolean |
existGroups()
Checks whether any column in group list is selected. |
boolean |
existVirtualColumns()
Checks whether exist virtual columns. |
BasicReportStoreDefinition |
generaReportStoreDefinition(java.lang.String pageTitle)
Not implemented. |
protected void |
generateOtherMultiGroupColumns(java.util.Vector groupColumns,
java.util.Vector groupClasses)
Parameter groupColumns contains all columns to create the multigroup. |
java.lang.Object |
generateReport(java.lang.String pageTitle,
java.lang.String description)
This method builds report. |
java.util.Vector |
generateVirtualColumnValues(java.lang.String column,
java.util.Vector originalColumnValues)
|
java.lang.Object |
getBaseTemplate()
Returns the viewer. |
java.lang.Class |
getColumnClassForColumn(java.lang.String columnName)
This method iterates in model and returns th class of column passed in parameter. |
java.lang.String |
getColumnFromVirtualColumn(java.lang.String virtualColumn)
Gets identifier for column from virtual column. |
int |
getColumnIndex(java.lang.String columnName,
javax.swing.table.TableModel model)
Get column index associated with columnName in a particular table model. |
protected java.lang.String |
getColumnPatternFromRenderer(javax.swing.table.TableCellRenderer rendererColumn)
|
protected javax.swing.table.TableModel |
getDataModel(boolean ascending)
Gets the model with data for report. |
javax.swing.table.TableModel |
getDataModelWithVirtualColumns()
|
java.lang.String |
getDatePattern()
Returns a date pattern locale-dependent. |
java.util.List |
getDefaultTemplates()
Returns the default templates. |
DynamicReport |
getDynamicReport()
|
java.lang.String |
getEvaluationValueForGroupingDate(java.util.Map fields,
java.lang.String groupColumn)
This method performs operation to return a string with values for grouping dates. |
CustomExpression |
getExpressionForRowNumbers()
This method gets values to add the row number in report. |
java.lang.String |
getGroupedKey(java.lang.String groupColumn)
Gets the text showed in grouping dates. |
java.lang.String |
getGroupIdentifier(java.lang.String groupColumn)
Gets the group identifier. |
java.lang.String |
getGroupingDatePattern()
|
java.lang.String |
getGroupingDateTimePattern()
|
GroupLayout |
getGroupLayoutForColumn(AbstractColumn column)
Obtains the layout for a determined group. |
GroupLayout |
getGroupLayoutForMultiGroup(AbstractColumn column,
boolean multiGroupContainsSubgroups)
Get group layout for multigroup. |
protected LayoutManager |
getLayoutManager()
Gets the manager that controls the layout of report. |
java.lang.String |
getMonthText(int month)
|
java.util.List |
getMultiGroupColumns()
|
java.util.Vector |
getMultiGroupColumnsForColumn(java.lang.String initialMultiColumn)
Gets the vector with columns in multigroup from the initial column of multigroup |
protected java.lang.Object |
getMultigroupExpression(java.util.List groupColumns,
java.util.Map fields,
java.util.Map variables,
java.util.Map parameters)
This method performs operation to return a string with values for grouping with multiple columns. |
DJCalculation |
getOperation(java.lang.Integer operation)
Gets the operation to use in variables of footer (SUM, MAX, MIN, AVG). |
TableSorter |
getOrderedDataModel(boolean ascending)
This method is used to order a table model. |
java.lang.String |
getPageTitle()
Gets the text of title field. |
java.util.Hashtable |
getParameters()
Returns the parameters that are passed to report. |
java.lang.String |
getPatternForColumn(java.lang.String columnName)
|
PreviewDialog |
getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base)
Implementation of this method for each engine must return a dialog with printed report. |
PreviewDialog |
getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
ReportProcessor r)
Implementation of this method for each engine must return a dialog with printed report. |
PreviewDialog |
getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc)
Implementation of this method for each engine must return a dialog with printed report. |
PreviewDialog |
getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor r)
Implementation of this method for each engine must return a dialog with printed report. |
PreviewDialog |
getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor r,
java.awt.print.PageFormat pf)
Implementation of this method for each engine must return a dialog with printed report. |
java.lang.String |
getQuarterText(int quarter)
|
int |
getRealNumberOfGroups()
Returns the number of groups that user is viewing printed in report (This number matches with number of items selected in group column list when all group columns are also selected in printing column list). |
java.lang.String |
getReportDescription()
Gets the text of subtitle field. |
java.lang.String |
getReportEngineName()
Returns the name of report Engine: "DynamicJasper". |
java.lang.String |
getTextOperation(java.lang.Integer operation)
Gets the text for operation applied in column |
java.lang.String |
getTitle()
Convenience method. |
java.lang.String |
getVirtualColumn(java.lang.String currentGroupItem)
Returns the identifier for virtual column addign to currentGroupItem the suffix indicated by variable: VIRTUAL_SUFFIX |
java.lang.String |
getVirtualColumnForOrdering(java.lang.String virtualColumn)
Returns the identifier for virtual column used for ordering to virtualColumn the suffix indicated by variable: IRTUAL_ORDERING_SUFFIX |
java.util.Hashtable |
getVirtualColumns()
|
boolean |
isBaseColumnFromVirtualColumn(java.lang.String column)
Checks whether a column is the original column for a virtual column. |
boolean |
isColumnGroupInSimpleGroup(java.lang.String groupColumn)
|
boolean |
isDateColumn(java.lang.Class dateClass)
Checks whether column class is a Date. . |
boolean |
isGroupColumnPrinted(int column)
For a group column checks whether this column is being viewed (selected in printing column list). |
boolean |
isImageColumn(java.lang.Class imageClass)
Checks whether column class is sun.awt.image.ToolkitImage. |
boolean |
isMoreInternalGroup(int groupindex)
Checks whether the group indicated by groupindex is the most internal in layout. |
boolean |
isNumericClass(java.lang.Object classparameter)
Returns true when parameter satisfies Number.class.isAssignableFrom() condition. |
boolean |
isSelectedMultiGrouping()
Checks whether contextual menu in group list is marked to show a multi-group report (header with selected columns). |
boolean |
isSelectedNumberOfOccurrences()
Checks whether number of occurrences in function panel is selected. |
boolean |
isSelectedPrintColumnNames()
Checks whether column names are printed. |
boolean |
isSelectedUpdateDynamically()
Checks whether UpdateDynamically toggle button is pressed. |
boolean |
isShowedDateInReportFooter()
Checks whether date in report is showed. |
boolean |
isShowedGroupDetails()
Determines if check for hiding group details is marked in report menu options. |
boolean |
isShowedPageInReportFooter()
Checks whether page in report footer is showed. |
boolean |
isShowedRowNumber()
Checks whether row number column item in pop-up menu for options is selected. |
boolean |
isShowedSubtitle()
Checks whether page in report footer is showed. |
boolean |
isShowedTitle()
Checks whether page in report footer is showed. |
boolean |
isUsedVirtualizer()
Returns true when a virtualizer is used. |
boolean |
isVirtualColumn(java.lang.String column)
Checks whether the column parameter is a virtual column. |
void |
keepOriginalColumnPositions(int i)
Stores in Hashtable hColsPositions the original order in columns. |
void |
refreshOntimizeViewer()
Refreshes the viewer. |
void |
refreshOntimizeViewer(JasperPrint jp)
Refreshes the viewer for a specific jasper print passed in parameter. |
CustomDynamicReportBuilder |
registerField(java.lang.String columnName,
java.lang.Class columnClass)
Register a field in report. |
void |
setColumnDataStyle()
Sets the style for report layout: font, padding, alignment. |
ColumnBuilder |
setColumnGroupClass(ColumnBuilder cb,
java.lang.String groupColumn,
java.lang.Class groupClass)
Sets the group column class for column group. |
void |
setColumnHeaderForGroupsStyle()
Sets the sytle for elements that are showed in groups header. |
void |
setColumnHeaderForMultiGroupsStyle()
Sets the sytle for elements that are showed in groups header. |
void |
setColumnHeaderStyle()
Sets the style for columns showed in header of report. |
ColumnBuilder |
setDateGroupingExpression(ColumnBuilder cb,
java.lang.String groupColumn)
Fixes the property column class to String and date grouping expression to column builder. |
void |
setDefaultParameters()
Sets the parameters that are passed by default to the report: JRParameter.REPORT_VIRTUALIZER: This parameter allows to use virtualizers to manage big reports. |
void |
setDefaultReportDialog(java.lang.Object reportDialog)
Report dialog is passed to engine to get references to dialog elements from engine (i.e. check buttons marked, columns selected,...). |
void |
setDynamicReport(DynamicReport dr)
|
void |
setFooterVariableStyle()
Sets the style for footer variables. |
void |
setGroupFooterNumberOcurrencesVariableStyle()
Sets style for variables in group footer. |
void |
setGroupFooterVariableStyle()
Sets style for variables in group footer. |
void |
setIsUsedVirtualizer(boolean isUsedVirtualizer)
Allows to modify the variable that manages the use of virtualizers. |
static void |
setLogLevel(java.lang.String logLevel)
Sets log level for this engine. |
void |
setParameters(java.util.Hashtable parameters)
Adds the specified parameters to report. |
AbstractColumn |
setPatterns(AbstractColumn column,
java.lang.Class columnClass)
|
void |
setReportDescription(java.lang.String text)
Sets the title of report. |
void |
setReportLogo()
Sets the report logo for template when it is not used the default template. |
void |
setReportStyles()
Sets the template file in report and sets all styles. |
void |
setRowReportSyles()
Sets the background color for odd and even rows. |
void |
setShowedDateInReportFooter(boolean isShowedDateInReportFooter)
Allows to modify the variable that shows date in report footer. |
void |
setShowedPageInReportFooter(boolean isShowedPageInReportFooter)
Allows to modify the variable that shows page in report footer. |
void |
setTitleandSubtitleStyle()
Sets the styles for title and subtitle. |
void |
setTitleReport(java.lang.String text)
Sets the title of report. |
PreviewDialog |
showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.lang.String template,
java.net.URL base)
Implementation of this method for each engine must show a dialog with printed report. |
PreviewDialog |
showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.lang.String template,
java.net.URL base,
ReportProcessor rp)
Implementation of this method for each engine must show a dialog with printed report. |
PreviewDialog |
showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base)
Implementation of this method for each engine must show a dialog with printed report. |
PreviewDialog |
showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
ReportProcessor rp)
Implementation of this method for each engine must show a dialog with printed report. |
PreviewDialog |
showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc)
Implementation of this method for each engine must show a dialog with printed report. |
PreviewDialog |
showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor rp)
Implementation of this method for each engine must show a dialog with printed report. |
PreviewDialog |
showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor rp,
java.awt.print.PageFormat pf)
Implementation of this method for each engine must show a dialog with printed report. |
void |
updateReport(boolean force)
Generates the report again. |
void |
viewJasperDialog(java.awt.Component parent,
java.lang.String template,
java.lang.String title)
Fills and views jasper report from a compiled report template without jasper parameters. |
void |
viewJasperDialog(java.awt.Component parent,
java.net.URL template)
Fills and view report from template that contains compiled report without parameters. |
void |
viewJasperDialog(java.awt.Component parent,
java.net.URL template,
javax.swing.table.TableModel dataModel,
java.lang.String title,
java.util.Hashtable reportParameters)
Views jasper dialog from a URL where is the template. |
void |
viewJasperDialog(java.lang.String template)
Views jasper dialog from a .jrxml template. |
void |
viewJasperDialog(java.lang.String template,
java.lang.String title)
Fills and views jasper report from a compiled report template without jasper parameters. |
void |
viewJasperDialog(java.net.URL template)
Fills and view report from template that contains compiled report without parameters. |
void |
viewJasperDialog(java.net.URL template,
java.util.Hashtable data,
java.util.Hashtable reportParameters)
Views jasper dialog from a URL where is the template. |
void |
viewJasperDialog(java.net.URL template,
javax.swing.table.TableModel dataModel,
java.util.Hashtable reportParameters)
Views jasper dialog from a URL where is the template. |
void |
viewJasperDialog(java.net.URL template,
javax.swing.table.TableModel dataModel,
java.lang.String title,
java.util.Hashtable reportParameters)
Views jasper dialog from a URL where is the template. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TRACE
public static final java.lang.String DEBUG
public static final java.lang.String INFO
public static final java.lang.String WARN
public static final java.lang.String ERROR
public static final java.lang.String FATAL
public static java.lang.String logLevel
public static final java.lang.String GROUP_COUNT_LABEL
protected TableModelDataSource erDataSource
JRDataSource to store report data.
public static final int DEFAULT_PADDING_FOR_GROUPS
public static final int DEFAULT_WIDTH_ROW_NUMBERS
public static final int DEFAULT_COLUMN_WIDTH
public static int paddingForGroups
public static int widthRowNumbers
public static int columnWidth
public static boolean useTemplatesWithDefaultLogo
public static java.lang.String reportLogoPath
public static java.lang.String reportLogoOnlyForFirstPage
public java.lang.String dynamicGroupIdentifier
public static final java.lang.String DEFAULT_JRXML_TEMPLATE_PORTRAIT
public static final java.lang.String DEFAULT_JRXML_TEMPLATE_LANDSCAPE
public static final java.lang.String DEFAULT_JRXML_TEMPLATE_PORTRAIT_NO_LOGO
public static final java.lang.String DEFAULT_JRXML_TEMPLATE_LANDSCAPE_NO_LOGO
public static final java.lang.String JANUARY
public static final java.lang.String FEBRUARY
public static final java.lang.String MARCH
public static final java.lang.String APRIL
public static final java.lang.String MAY
public static final java.lang.String JUNE
public static final java.lang.String JULY
public static final java.lang.String AUGUST
public static final java.lang.String SEPTEMBER
public static final java.lang.String OCTOBER
public static final java.lang.String NOVEMBER
public static final java.lang.String DECEMBER
public static final java.lang.String FIRST_QUARTER
public static final java.lang.String SECOND_QUARTER
public static final java.lang.String THIRD_QUARTER
public static final java.lang.String FOURTH_QUARTER
public static java.lang.String dateNameSeparator
public static java.lang.String groupDateSeparator
public static java.lang.String groupOpenCharacter
public static java.lang.String groupCloseCharacter
public static java.lang.String GROUP_BY_DEFAULT
public static java.lang.String VIRTUAL_SUFFIX
public static java.lang.String VIRTUAL_ORDERING_SUFFIX
protected DefaultReportDialog reportDialog
protected CustomDynamicReportBuilder drb
protected DynamicReport dr
protected javax.swing.table.TableModel model
protected TableSorter sortermodel
protected EntityResult erData
protected boolean isfocusAdapterAdded
protected boolean bPreviousEvaluation
protected java.lang.String sHeaderGroupingDate
protected EntityResult resultmodel
protected java.util.Hashtable parameters
protected java.util.Hashtable hColsPositions
protected java.util.Hashtable hMultiGroupColumns
protected java.util.Hashtable hRenderColumns
protected CustomJasperViewer viewer
protected JasperPrint jp
protected GroupBuilder gb1
public java.util.List vMultiGroupColumns
protected java.util.Hashtable hVirtualColumns
Hashtable
is added an entry (original_column , original_column + VIRTUAL_SUFFIX).
protected Style defaultTitleStyle
protected Style defaultSubtitleStyle
protected Style defaultHeaderStyle
protected Style defaultHeaderForGroupStyle
protected Style defaultHeaderForMultiGroupStyle
protected Style defaultColumnDataStyle
protected Style oddRowBackgroundStyle
protected Style styleFooterVariable
protected Style styleGroupFooterVariable
protected Style styleGroupFooterNumberOcurrencesVariable
protected JRVirtualizer virtualizer
public static boolean useVirtualizerByDefault
public static boolean isShowedDateInReportFooterByDefault
public static boolean isShowedPageInReportFooterByDefault
public static boolean isShowedTitleByDefault
public static boolean isShowedSubtitleByDefault
public static int defaultVirtualizerCacheSize
protected boolean isUsedVirtualizer
protected boolean isRegisteredVirtualizer
protected boolean isShowedDateInReportFooter
protected boolean isShowedPageInReportFooter
protected boolean isShowedTitle
protected boolean isShowedSubtitle
public static java.lang.String numericPattern
protected static boolean checkJasperLibreries
protected static boolean jasperLibreries
| Constructor Detail |
public DynamicJasperEngine()
| Method Detail |
public static void setLogLevel(java.lang.String logLevel)
logLevel - the String with error level.public void close()
ReportEngine
close in interface ReportEnginepublic void dispose()
dispose in interface ReportEnginepublic BasicReportStoreDefinition generaReportStoreDefinition(java.lang.String pageTitle)
generaReportStoreDefinition in interface ReportEnginepageTitle - the title of page
protected LayoutManager getLayoutManager()
public void createModel()
{@link DefaultReportDialog#getOrderedDataModel(boolean)}public void createVirtualColumns()
public javax.swing.table.TableModel getDataModelWithVirtualColumns()
public java.lang.String getGroupingDateTimePattern()
public java.lang.String getGroupingDatePattern()
public AbstractColumn setPatterns(AbstractColumn column,
java.lang.Class columnClass)
public java.util.Vector generateVirtualColumnValues(java.lang.String column,
java.util.Vector originalColumnValues)
public void createReportBuilder()
public DynamicReport getDynamicReport()
public void setDynamicReport(DynamicReport dr)
public java.lang.Object generateReport(java.lang.String pageTitle,
java.lang.String description)
throws java.lang.Exception
generateReport in interface ReportEnginepageTitle - the title of reportdescription - subtitle of report
java.lang.Exception - A new Exceptionpublic void clearReportVariables()
public void setReportLogo()
public java.lang.Object getBaseTemplate()
getBaseTemplate in interface ReportEnginepublic java.lang.String getPageTitle()
getPageTitle in interface ReportEnginepublic java.lang.String getReportDescription()
getReportDescription in interface ReportEngine
public int getColumnIndex(java.lang.String columnName,
javax.swing.table.TableModel model)
columnName in a particular table model.
columnName - The name of columnmodel - Data model
protected javax.swing.table.TableModel getDataModel(boolean ascending)
getRealNumberOfGroups()).
ascending - the order for data
public TableSorter getOrderedDataModel(boolean ascending)
ascending - condition to ascending-descending order.
com.ontimize.report.TableSorter with orderpublic java.lang.String getTitle()
getTitle in interface ReportEnginepublic void setDefaultReportDialog(java.lang.Object reportDialog)
ReportEngine
setDefaultReportDialog in interface ReportEnginereportDialog - the report dialog to be used in engine.public void setTitleReport(java.lang.String text)
ReportEngine
setTitleReport in interface ReportEnginetext - the text to set in titlepublic void setReportDescription(java.lang.String text)
ReportEngine
setReportDescription in interface ReportEnginetext - the text to set in titlepublic void updateReport(boolean force)
updateReport in interface ReportEngineforce - The boolean to allow/deny dynamically updates when user presses the update dynamically button in report dialog.public void setParameters(java.util.Hashtable parameters)
parameters - public java.util.Hashtable getParameters()
public java.lang.String getDatePattern()
public void setDefaultParameters()
public boolean isUsedVirtualizer()
public void setIsUsedVirtualizer(boolean isUsedVirtualizer)
isUsedVirtualizer - Condition to use virtualizerspublic boolean isShowedDateInReportFooter()
public void setShowedDateInReportFooter(boolean isShowedDateInReportFooter)
isShowedDateInReportFooter - the variable to show/hide date in report footerpublic boolean isShowedPageInReportFooter()
public boolean isShowedTitle()
public boolean isShowedSubtitle()
public void setShowedPageInReportFooter(boolean isShowedPageInReportFooter)
isShowedPageInReportFooter - The variable to show/hide page in report footer
public void createViewer(JasperPrint jp,
DefaultReportDialog reportDialog)
jp - the jasperprint objectreportDialog - the dialog where viewer is addedpublic void refreshOntimizeViewer()
public void refreshOntimizeViewer(JasperPrint jp)
public java.util.List getDefaultTemplates()
com.ontimize.report.templates
these templates will be used.
Otherwise, default templates contain default parameters and default logo. To use a empty template (without logo), user
can set to "false" the static variable useTemplatesWithDefaultLogo.
getDefaultTemplates in interface ReportEngineList with default templates.public void setReportStyles()
public void setTitleandSubtitleStyle()
public void setColumnHeaderStyle()
public void setColumnDataStyle()
public void setColumnHeaderForGroupsStyle()
public void setColumnHeaderForMultiGroupsStyle()
public void setFooterVariableStyle()
public void setGroupFooterVariableStyle()
public void setGroupFooterNumberOcurrencesVariableStyle()
public void setRowReportSyles()
public void buildReportFooter()
setDefaultParameters() passed to report, so
this method is empty in this implementation
public void buildReportHeader()
public void buildReportDetail()
throws java.lang.Exception
java.lang.Exception - when an Exception is thrown.protected void configureColumnRenders()
public java.lang.String getPatternForColumn(java.lang.String columnName)
protected java.lang.String getColumnPatternFromRenderer(javax.swing.table.TableCellRenderer rendererColumn)
public java.lang.String createDatePattern(DateCellRenderer rendererColumn)
public java.lang.String createDecimalPattern(RealCellRenderer rendererColumn)
public void configureTemplate()
throws java.lang.Exception
java.lang.Exception - When template is not selected.public CustomExpression getExpressionForRowNumbers()
public void buildColumns()
throws java.lang.Exception
java.lang.Exception - when an Exception occurs
public CustomDynamicReportBuilder configureVirtualColumn(CustomDynamicReportBuilder drb,
java.lang.String columnName,
java.lang.Class columnClass)
throws java.lang.Exception
drb - columnName - columnClass -
java.lang.Exception
public CustomDynamicReportBuilder registerField(java.lang.String columnName,
java.lang.Class columnClass)
columnName - The column name referred to fieldcolumnClass - The class of column
public AbstractColumn configureColumn(AbstractColumn column,
java.lang.String columnName,
java.lang.Class columnClass)
column - The initial columncolumnName - The column name
public ColumnBuilder configureColumnBuilder(ColumnBuilder cb,
java.lang.String columnName,
java.lang.Class columnClass)
cb - The original column builder for this columncolumnName - The name of columncolumnClass - The class of column
public void keepOriginalColumnPositions(int i)
Hashtable hColsPositions the original order in columns. This order is required in layout to be
printed correctly.
i - Index of column
public void createRowNumberColumn()
throws ColumnBuilderException
ColumnBuilderExceptionpublic boolean existFunctionForColumn(AbstractColumn column)
column - the column to check
public boolean isNumericClass(java.lang.Object classparameter)
classparameter - the class to check
public java.lang.Class getColumnClassForColumn(java.lang.String columnName)
columnName - The name of column
public boolean isSelectedMultiGrouping()
public void applyFunctionForColumn(AbstractColumn column,
GroupBuilder group)
throws java.lang.Exception
java.lang.Exception
public java.lang.String getEvaluationValueForGroupingDate(java.util.Map fields,
java.lang.String groupColumn)
fields - All fields in reportgroupColumn - The column to be grouped
java.text.ParseException
protected java.lang.Object getMultigroupExpression(java.util.List groupColumns,
java.util.Map fields,
java.util.Map variables,
java.util.Map parameters)
groupColumns - The list of group columnsfields - Fields in reportvariables - Variables in reportparameters - Report parameters
protected GroupBuilder buildMultiGroup(int groupIndex,
java.util.Vector groupColumns,
java.util.Vector groupClasses,
boolean multiGroupContainsSubgroups)
throws java.lang.Exception
groupIndex - Index in group criteria in group columnsmultiGroupContainsSubgroups - This condition is true when a multigroup is parent of another groups
GroupBuilder with groups
java.lang.Exception - A Exception when group cannot be created.protected java.util.Vector configureMultiGroupColumnClasses(java.util.Vector groupClasses)
groupClasses - The group classes for a multi group
protected void generateOtherMultiGroupColumns(java.util.Vector groupColumns,
java.util.Vector groupClasses)
Hashtable hMultiGroupColumns with key the first
column of multigroup (first in group list) and value other multigroup columns.
groupColumns - Multi group columnsgroupClasses - Multi group classespublic java.util.Vector getMultiGroupColumnsForColumn(java.lang.String initialMultiColumn)
initialMultiColumn - The column
protected GroupBuilder buildGroup(int groupIndex,
java.lang.String groupColumn,
java.lang.Class groupClass)
throws java.lang.Exception
groupIndex - Index in group criteria in group columnsgroupColumn - Name of criteria to group bygroupClass - Class for group criteria
GroupBuilder with groups
java.lang.Exception - A Exception when group cannot be created.
public void configureGroupNumberOfOcurrencesLabel(GroupBuilder gb1,
java.lang.String groupColumn)
gb1 - The group buildergroupColumn - The group column
public void configureGroupFooterVariables(GroupBuilder gb1,
AbstractColumn column)
throws java.lang.Exception
gb1 - The group buildercolumn - Column that is the criteria for grouping
java.lang.Exception - when occurs an error configuring group builder
public GroupBuilder configureGroupBuilder(GroupBuilder gb1,
AbstractColumn column)
gb1 - The initial group buildercolumn - Column that is the criteria for grouping
public GroupBuilder configureMultiGroupBuilder(GroupBuilder gb1,
AbstractColumn column,
boolean multiGroupContainsSubgroups)
gb1 - The initial group buildercolumn - Column that is the criteria for groupingmultiGroupContainsSubgroups - Checks whether group contains nested subgroups
public AbstractColumn configureMultiGroupColumn(AbstractColumn column,
java.lang.String groupColumn,
java.lang.Class groupClass,
int groupIndex)
column - The column to be configuredgroupColumn - The group columngroupClass - The group class for columngroupIndex - The number of group in report (Used for set width and position)
public AbstractColumn configureGroupColumn(AbstractColumn column,
java.lang.String groupColumn,
java.lang.Class groupClass,
int groupIndex)
column - The column to be configuredgroupColumn - The group columngroupClass - The group class for columngroupIndex - The number of group in report (Used for set width and position)
public ColumnBuilder configureMultiGroupColumnBuilder(ColumnBuilder cb,
java.lang.String groupColumn,
java.lang.Class groupClass,
java.util.Vector groupColumns)
cb - The initial column buildergroupColumn - The group columngroupClass - The group classgroupColumns - Other group columns that belongs to multiple group
public ColumnBuilder configureGroupColumnBuilder(ColumnBuilder cb,
java.lang.String groupColumn,
java.lang.Class groupClass)
cb - The initial column buildergroupColumn - The group columngroupClass - The group class
public java.lang.String getGroupIdentifier(java.lang.String groupColumn)
groupColumn - The name of column
public ColumnBuilder setColumnGroupClass(ColumnBuilder cb,
java.lang.String groupColumn,
java.lang.Class groupClass)
cb - The column buildergroupColumn - The group columngroupClass - The group class
public ColumnBuilder setDateGroupingExpression(ColumnBuilder cb,
java.lang.String groupColumn)
String and date grouping expression to column builder.
cb - The column buildergroupColumn - Column to group
public java.lang.String getGroupedKey(java.lang.String groupColumn)
groupColumn - The name of group column
public void buildGroups()
throws java.lang.Exception
java.lang.Exception - Throws a ColumnBuilderException when occurs an Error building columns for groups.public java.lang.String getVirtualColumn(java.lang.String currentGroupItem)
currentGroupItem the suffix indicated by variable: VIRTUAL_SUFFIX
currentGroupItem - Name of group column
public java.lang.String getVirtualColumnForOrdering(java.lang.String virtualColumn)
virtualColumn the suffix indicated by variable: IRTUAL_ORDERING_SUFFIX
public java.lang.String getColumnFromVirtualColumn(java.lang.String virtualColumn)
virtualColumn - The name of virtual column
public boolean isMoreInternalGroup(int groupindex)
public GroupLayout getGroupLayoutForColumn(AbstractColumn column)
column - the column to compute the layout
GroupLayout,
CustomGroupLayout
public GroupLayout getGroupLayoutForMultiGroup(AbstractColumn column,
boolean multiGroupContainsSubgroups)
column - Group column to check the layoutmultiGroupContainsSubgroups - Condition about existence of subgroups for a determined group
public boolean isShowedGroupDetails()
public boolean existGroups()
public int getRealNumberOfGroups()
public boolean isGroupColumnPrinted(int column)
column - the index of column
public boolean existFunctions()
public boolean isShowedRowNumber()
public boolean isSelectedNumberOfOccurrences()
public boolean isSelectedUpdateDynamically()
public boolean isSelectedPrintColumnNames()
public boolean existVirtualColumns()
public boolean isVirtualColumn(java.lang.String column)
column - The name of column
public boolean isBaseColumnFromVirtualColumn(java.lang.String column)
public void clearVirtualColumns()
Hashtable..
public void buildOptions()
buildOptions in interface ReportEnginepublic boolean isImageColumn(java.lang.Class imageClass)
sun.awt.image.ToolkitImage. It is used
to allow rendering images in report.
imageClass - the class for image.
public boolean isDateColumn(java.lang.Class dateClass)
dateClass - the class for image.
public java.lang.String getTextOperation(java.lang.Integer operation)
operation - The operation
public DJCalculation getOperation(java.lang.Integer operation)
operation - the operation
DJCalculation object.public java.lang.String getReportEngineName()
getReportEngineName in interface ReportEnginepublic boolean checkLibraries()
checkLibraries in interface ReportEnginepublic static boolean checkJasperLibraries()
public static javax.swing.table.TableModel createTableModel(java.util.Hashtable res,
boolean returnEmptyStrings,
boolean convertBB2Im,
boolean convertBooleanToIm)
public void viewJasperDialog(java.lang.String template)
throws java.lang.Exception
template - the .jrxml template
java.lang.Exception - When a Jasper Exception occurs
public void viewJasperDialog(java.lang.String template,
java.lang.String title)
throws java.lang.Exception
template - Complete path to the compiled reporttitle - of window where report is showed
java.lang.Exception - When a Jasper Exception occurs
public void viewJasperDialog(java.awt.Component parent,
java.lang.String template,
java.lang.String title)
throws java.lang.Exception
template - Complete path to the compiled reporttitle - of window where report is showed
java.lang.Exception - When a Jasper Exception occurs
public void viewJasperDialog(java.net.URL template,
java.util.Hashtable data,
java.util.Hashtable reportParameters)
throws java.lang.Exception
template - URL where is the template.data - Hashtable or EntityResult with data.
java.lang.Exception - Never throws Exception. When an Exception occurs filling report is catched internally
public void viewJasperDialog(java.net.URL template,
javax.swing.table.TableModel dataModel,
java.util.Hashtable reportParameters)
throws java.lang.Exception
template - URL where is the template.
java.lang.Exception - Never throws Exception. When an Exception occurs filling report is catched internally
public void viewJasperDialog(java.net.URL template,
javax.swing.table.TableModel dataModel,
java.lang.String title,
java.util.Hashtable reportParameters)
throws java.lang.Exception
template - URL where is the template.
java.lang.Exception - Never throws Exception. When an Exception occurs filling report is catched internally
public void viewJasperDialog(java.awt.Component parent,
java.net.URL template,
javax.swing.table.TableModel dataModel,
java.lang.String title,
java.util.Hashtable reportParameters)
throws java.lang.Exception
template - URL where is the template.
java.lang.Exception - Never throws Exception. When an Exception occurs filling report is catched internallypublic java.util.List getMultiGroupColumns()
public java.util.Hashtable getVirtualColumns()
public boolean isColumnGroupInSimpleGroup(java.lang.String groupColumn)
public void viewJasperDialog(java.net.URL template)
throws java.lang.Exception
template - The complete url to compiled report
java.lang.Exception - When occurs an Exception filling report
public void viewJasperDialog(java.awt.Component parent,
java.net.URL template)
throws java.lang.Exception
parent - Parent component to reporttemplate - The complete url to compiled report
java.lang.Exception - When occurs an Exception filling report
public PreviewDialog showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.lang.String template,
java.net.URL base)
throws java.lang.Exception
ReportEngine
showPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base)
throws java.lang.Exception
ReportEngine
showPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.lang.String template,
java.net.URL base,
ReportProcessor rp)
throws java.lang.Exception
ReportEngine
showPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
ReportProcessor rp)
throws java.lang.Exception
ReportEngine
showPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc)
throws java.lang.Exception
ReportEngine
showPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor rp)
throws java.lang.Exception
ReportEngine
showPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog showPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor rp,
java.awt.print.PageFormat pf)
throws java.lang.Exception
ReportEngine
showPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
ReportProcessor r)
throws java.lang.Exception
ReportEngine
getPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base)
throws java.lang.Exception
ReportEngine
getPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc)
throws java.lang.Exception
ReportEngine
getPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor r)
throws java.lang.Exception
ReportEngine
getPreviewDialog in interface ReportEnginejava.lang.Exception
public PreviewDialog getPreviewDialog(java.awt.Component c,
java.lang.String title,
javax.swing.table.TableModel m,
java.net.URL template,
java.net.URL base,
java.lang.String[] order,
boolean[] asc,
ReportProcessor r,
java.awt.print.PageFormat pf)
throws java.lang.Exception
ReportEngine
getPreviewDialog in interface ReportEnginejava.lang.Exceptionpublic java.lang.String getMonthText(int month)
public java.lang.String getQuarterText(int quarter)
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||