Style Intelligence v12.0

inetsoft.report
Class ReportSheet

java.lang.Object
  extended by inetsoft.uql.asset.AbstractAssetEngine
      extended by inetsoft.report.internal.StyleCore
          extended by inetsoft.report.ReportSheet
All Implemented Interfaces:
inetsoft.report.internal.ParameterSheetRepository, StyleConstants, AssetRepository, XConstants, XFormulaRepository, XLocalQueryRepository, XQueryRepository, Serializable, Cloneable
Direct Known Subclasses:
CompositeSheet, StyleSheet, TabularSheet

public abstract class ReportSheet
extends inetsoft.report.internal.StyleCore
implements XLocalQueryRepository, XFormulaRepository

ReportSheet is the main class for report generation. Each report is represented as a ReportSheet object. Conceptually, a ReportSheet is a runtime report template that layout the formatting of a report. The actuall data in a concrete report can either be embedded in the report or be supplied with a lens object (e.g. TableLens, ChartLens...).

Creating a report involved a series of insertions of report elements into the report. During this process, a set of global report attributes can be set and consequently being adopted by the report elements inserted thereafter.

There are two types of properties in the ReportSheet. One is the regular property that affect all elements and settings. The other is the property that affect all elements added after the property is set. Any elements added before the call to set property are not affected by the new setting. The second group properties are always set by a method starts with 'setCurrent'.

There are two types of reports: StyleSheet and TabularSheet. ReportSheet defines the common API between this two types of reports. StyleSheet provides a purely flow based layout model. TabularSheet provides a grid based layout model. A report is divided into a tabular grid, and layout is done per grid cell.

Please refer to the Style Report Programming Guide for more details on the concepts and features of the ReportSheet.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class inetsoft.report.internal.StyleCore
inetsoft.report.internal.StyleCore.ActionScriptable
 
Nested classes/interfaces inherited from class inetsoft.uql.asset.AbstractAssetEngine
AbstractAssetEngine.ReportSheetDependencyFinder, AbstractAssetEngine.SheetTransformListener, AbstractAssetEngine.StorageChangeListener
 
Field Summary
static int BODY
          Flag to indicate the main report body section.
static int DEFAULT_FOOTER
          Flag to indicate the default page footer.
static int DEFAULT_HEADER
          Flag to indicate the default page header.
static int DOWN
          Flag to indicate element moving down direction.
static int EVEN_PAGE_FOOTER
          Flag to indicate the even page footer.
static int EVEN_PAGE_HEADER
          Flag to indicate the even page header.
static int FIRST_PAGE_FOOTER
          Flag to indicate the first page footer.
static int FIRST_PAGE_HEADER
          Flag to indicate the first page header.
static int ODD_PAGE_FOOTER
          Flag to indicate the odd page footer.
static int ODD_PAGE_HEADER
          Flag to indicate the odd page header.
static int PAINTER_BREAKABLE
          Painter layout policy.
static int PAINTER_NON_BREAK
          Painter layout policy.
static int TABLE_EQUAL_WIDTH
          Table layout policy.
static int TABLE_FIT_CONTENT
          Table layout policy.
static int TABLE_FIT_CONTENT_1PP
          Table layout policy.
static int TABLE_FIT_CONTENT_PAGE
          Table layout policy.
static int TABLE_FIT_PAGE
          Table layout policy.
static int UP
          Flag to indictate element moving up direction.
static int WRAP_BOTH
          Wrapping at both left and right.
static int WRAP_LEFT
          Wrapping at the left of the element.
static int WRAP_NONE
          No wrapping.
static int WRAP_RIGHT
          Wrapping at the right of the element.
static int WRAP_TOP_BOTTOM
          ReportElement occupies whole row.
 
Fields inherited from class inetsoft.report.internal.StyleCore
advanceLine, alignment, anchor, autosize, background, bg, bgimage, bglayout, bgsize, burstInfo, chartinfo, cmargin, COMPLETED, contexts, current, currFooter, currFrame, currHeader, DESIGN_MODE, elemFooter, elemHeader, evenFooter, evenHeader, firstFooter, firstHeader, font, footerElements, footerFromEdge, foreground, formatmap, frames, g_pmargin, header, headerElements, headerFromEdge, headingCnt, headingMap, hfFmt, hindent, horFlow, idmap, indent, initCalled, initCmd, initScript, justify, lastHead, lineH, LIVE_MODE, loadCmd, loadScript, locale, margin, MORE_ELEM, MORE_FLOW, nextOrient, npframes, nplayout, numHeadingMap, oddFooter, oddHeader, orphan, overrideFooter, overrideFooterContinue, overrideHeader, overrideHeaderContinue, padding, pageBox, pagebreakCmd, pagebreakScript, painterLayout, painterMargin, parameters, parentElem, pglayout, pgStart, pgTotal, pmargin, presentermap, printBox, printCmd, printHead, printMode, printScript, prop, psheet, queries, reportmode, rewinded, RUN_MODE, runningScript, runningTotals, scriptenv, secHeadingMap, secNumHeadingMap, sepadv, spacing, tableadv, tableorphan, tableW, tabStops, textadv, wrapping
 
Fields inherited from class inetsoft.uql.asset.AbstractAssetEngine
admin, catalog, editing, istore, LOCAL, parent, scopes
 
Fields inherited from interface inetsoft.uql.XQueryRepository
GLOBAL_SCOPE, LOCAL_QUERY, LOCAL_SCOPE, NORMAL_QUERY
 
Fields inherited from interface inetsoft.report.StyleConstants
ARROW_LINE_1, ARROW_LINE_2, ARROW_LINE_3, BACKGROUND_CENTER, BACKGROUND_TILED, BOX_RECTANGLE, BOX_ROUNDED_RECTANGLE, CENTER, CHART_3D_BAR, CHART_3D_BAR_3D, CHART_3D_PIE, CHART_3D_STACK_BAR, CHART_AREA, CHART_BAR, CHART_BUBBLE, CHART_CANDLE, CHART_CURVE, CHART_FILL_RADAR, CHART_GANTT, CHART_INV_BAR, CHART_INV_CURVE, CHART_INV_LINE, CHART_INV_POINT, CHART_INV_STACK_BAR, CHART_LINE, CHART_MAX_USER, CHART_PARETO, CHART_PIE, CHART_PIE_EXPLODED_ALL, CHART_PIE_EXPLODED_FIRST, CHART_PIE_EXPLODED_NONE, CHART_POINT, CHART_RADAR, CHART_RIBBON, CHART_SCATTER, CHART_SPEEDOMETER, CHART_STACK_AREA, CHART_STACK_BAR, CHART_STICK, CHART_STOCK, CHART_SURFACE, CHART_USER, CHART_VOLUME, CHART_WATERFALL, CHART_XY_LINE, CIRCLE, CROSS, CURRENCY, DASH_LINE, DASH_MASK, DEFAULT_PAGE_SIZE, DIAMOND, DOT_LINE, DOUBLE_3D_LOWERED, DOUBLE_3D_RAISED, DOUBLE_LINE, DOUBLE_MASK, FILL, FILLED_CIRCLE, FILLED_DIAMOND, FILLED_SQUARE, FILLED_TRIANGLE, FRACTION_WIDTH_MASK, H_ALIGN_MASK, H_CENTER, H_CURRENCY, H_LEFT, H_LINE, H_RIGHT, LANDSCAPE, LARGE_DASH, LEFT, LINECAP_BUTT, LINECAP_ROUND, LINECAP_SQUARE, LINEJOIN_BEVEL, LINEJOIN_MITER, LINEJOIN_ROUND, LOWERED_3D, LOWERED_MASK, LT_ANGLE, MEDIUM_DASH, MEDIUM_LINE, NIL, NO_BORDER, NONE, PAPER_10X11, PAPER_10X14, PAPER_11X17, PAPER_15X11, PAPER_9X11, PAPER_A_PLUS, PAPER_A2, PAPER_A3, PAPER_A3_EXTRA, PAPER_A3_EXTRA_TRANSVERSE, PAPER_A3_TRANSVERSE, PAPER_A4, PAPER_A4_EXTRA, PAPER_A4_PLUS, PAPER_A4_TRANSVERSE, PAPER_A4SMALL, PAPER_A5, PAPER_A5_EXTRA, PAPER_A5_TRANSVERSE, PAPER_B_PLUS, PAPER_B4, PAPER_B5, PAPER_B5_EXTRA, PAPER_B5_TRANSVERSE, PAPER_CSHEET, PAPER_DSHEET, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_ENV_14, PAPER_ENV_9, PAPER_ENV_B4, PAPER_ENV_B5, PAPER_ENV_B6, PAPER_ENV_C3, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65, PAPER_ENV_DL, PAPER_ENV_INVITE, PAPER_ENV_ITALY, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL, PAPER_ESHEET, PAPER_EXECUTIVE, PAPER_FANFOLD_LGL_GERMAN, PAPER_FANFOLD_STD_GERMAN, PAPER_FANFOLD_US, PAPER_FOLIO, PAPER_ISO_B4, PAPER_JAPANESE_POSTCARD, PAPER_LEDGER, PAPER_LEGAL, PAPER_LEGAL_EXTRA, PAPER_LETTER, PAPER_LETTER_EXTRA, PAPER_LETTER_EXTRA_TRANSVERSE, PAPER_LETTER_PLUS, PAPER_LETTER_TRANSVERSE, PAPER_LETTERSMALL, PAPER_NOTE, PAPER_QUARTO, PAPER_STATEMENT, PAPER_TABLOID, PAPER_TABLOID_EXTRA, PATTERN_0, PATTERN_1, PATTERN_10, PATTERN_11, PATTERN_12, PATTERN_13, PATTERN_14, PATTERN_15, PATTERN_16, PATTERN_17, PATTERN_18, PATTERN_19, PATTERN_2, PATTERN_3, PATTERN_4, PATTERN_5, PATTERN_6, PATTERN_7, PATTERN_8, PATTERN_9, PATTERN_NONE, PORTRAIT, RAISED_3D, RAISED_MASK, REMAINDER, RIGHT, RIGHT_ANGLE, SOLID_MASK, SQUARE, STAR, THICK_LINE, THIN_LINE, THIN_THIN_LINE, TRAY_AUTO, TRAY_CASSETTE, TRAY_ENVELOPE, TRAY_ENVMANUAL, TRAY_FORMSOURCE, TRAY_LARGECAPACITY, TRAY_LARGEFMT, TRAY_LOWER, TRAY_MANUAL, TRAY_MIDDLE, TRAY_ONLYONE, TRAY_SMALLFMT, TRAY_TRACTOR, TRAY_UPPER, TRIANGLE, ULTRA_THIN_LINE, V_ALIGN_MASK, V_ANGLE, V_BASELINE, V_BOTTOM, V_CENTER, V_LINE, V_TOP, WIDTH_MASK, X
 
Fields inherited from interface inetsoft.uql.XConstants
AM_PM_DATE_GROUP, AM_PM_OF_DAY_DATE_GROUP, AVERAGE_FORMULA, CALC_FORMULA, COLUMN, CONCAT_FORMULA, CONDITION_EMPTY_STRING, CONDITION_NULL_STRING, CONDITION_NULL_VALUE, CONDITION_REAL_NULL, CORRELATION_FORMULA, COUNT_FORMULA, COVARIANCE_FORMULA, CURRENCY_FORMAT, CURRENT_REP_CHANGED, CURRENT_REP_WILL_CHANGE, DATE_FORMAT, DAY_DATE_GROUP, DAY_OF_MONTH_DATE_GROUP, DAY_OF_WEEK_DATE_GROUP, DAY_OF_YEAR_DATE_GROUP, DECIMAL_FORMAT, DISTINCTCOUNT_FORMULA, FIRST_FORMULA, FULL_JOIN, GREATER_EQUAL_JOIN, GREATER_JOIN, GROUP_OTHERS, HOUR_DATE_GROUP, HOUR_OF_DAY_DATE_GROUP, INNER_JOIN, JOIN, LAST_FORMULA, LEAVE_OTHERS, LEFT_JOIN, LESS_EQUAL_JOIN, LESS_JOIN, MAX_FORMULA, MEDIAN_FORMULA, MESSAGE_FORMAT, MILLISECOND_DATE_GROUP, MIN_FORMULA, MINUTE_DATE_GROUP, MODE_FORMULA, MONTH_DATE_GROUP, MONTH_OF_YEAR_DATE_GROUP, NONE_DATE_GROUP, NONE_FORMULA, NOT_EQUAL_JOIN, NTHLARGEST_FORMULA, NTHMOSTFREQUENT_FORMULA, NTHSMALLEST_FORMULA, PARAM_PREFIX, PART_DATE_GROUP, PERCENT_FORMAT, PERCENTAGE_BY_COL, PERCENTAGE_BY_ROW, PERCENTAGE_NONE, PERCENTAGE_OF_COL_GRANDTOTAL, PERCENTAGE_OF_COL_GROUP, PERCENTAGE_OF_GRANDTOTAL, PERCENTAGE_OF_GROUP, PERCENTAGE_OF_ROW_GRANDTOTAL, PERCENTAGE_OF_ROW_GROUP, POPULATIONSTANDARDDEVIATION_FORMULA, POPULATIONVARIANCE_FORMULA, PRODUCT_FORMULA, PTHPERCENTILE_FORMULA, QUARTER_DATE_GROUP, QUARTER_OF_YEAR_DATE_GROUP, RIGHT_JOIN, SECOND_DATE_GROUP, SET_FORMULA, SORT_ASC, SORT_DESC, SORT_NONE, SORT_ORIGINAL, SORT_SPECIFIC, SORT_VALUE_ASC, SORT_VALUE_DESC, STANDARDDEVIATION_FORMULA, SUB_QUERY_PARAM, SUM_FORMULA, SUMSQ_FORMULA, SUMWT_FORMULA, VARIANCE_FORMULA, WEEK_DATE_GROUP, WEEK_OF_MONTH_DATE_GROUP, WEEK_OF_YEAR_DATE_GROUP, WEIGHTEDAVERAGE_FORMULA, YEAR_DATE_GROUP
 
Fields inherited from interface inetsoft.report.internal.ParameterSheetRepository
EMBED_PARAMETER_SHEET, EMBED_SECTION
 
Fields inherited from interface inetsoft.uql.asset.AssetRepository
ASSET_ERRORS, COMPONENT_SCOPE, GLOBAL_SCOPE, IGNORE_PERM, LOCAL_QUERY, QUERY_SCOPE, REPORT_SCOPE, REPORT_WORKSHEET, REPOSITORY_SCOPE, TEMPORARY_SCOPE, USER_SCOPE
 
Constructor Summary
ReportSheet()
           
 
Method Summary
 void addExecuteListener(ExecuteListener listener)
          Add an execute listener.
 String addFooterBreak()
          Add a break to the document footer.
 String addFooterElement(ReportElement e)
          Add an element to the document footer.
 String addFooterImage(Image image)
          Add an image to the document footer.
 String addFooterImage(Image image, double winch, double hinch)
          This is same as addFooterImage() exception an explicit size of the painter area is specified.
 String addFooterImage(URL image)
          Add an image to the document footer.
 String addFooterNewline(int n)
          Add one or more newline to the document footer.
 String addFooterObject(Object obj)
          Add an object to the document footer.
 String addFooterPainter(Painter area)
          Add a pinter element to the document footer.
 String addFooterPainter(Painter area, double winch, double hinch)
          This is same as addFooterPainter() exception an explicit size of the painter area is specified.
 String addFooterRightTab()
          Add a right aligned tab.
 String addFooterSection(SectionLens section)
          Add a section element to the document footer.
 String addFooterSection(SectionLens section, TableLens table)
          Add a section element to the document footer.
 String addFooterSeparator(int style)
          Add a separator to footer.
 String addFooterSpace(int pixels)
          Add horizontal space to the document footer.
 String addFooterTab(int fill)
          Add a tab.
 String addFooterTable(TableLens table)
          Add a table to the document footer.
 String addFooterText(String text)
          Add a text string to the document footer.
 String addFooterText(TextLens text)
          Add a text element to the document footer.
 String addFooterTextBox(TextLens text)
          Add a text box to the document footer.
 String addFooterTextBox(TextLens text, int border, double winch, double hinch, int talign)
          Add a text box to the document footer.
 void addFormat(Class type, Format p)
          Register a format for the specified class.
 void addFormat(String id, Class type, Format format)
          Add a format to a table element.
 void addFormula(inetsoft.report.internal.binding.FormulaInfo info)
          Add a formula from the repository.
 String addHeaderBreak()
          Add a break to the document header.
 String addHeaderElement(ReportElement e)
          Add an element to the document header.
 String addHeaderImage(Image image)
          Add an image to the document header.
 String addHeaderImage(Image image, double winch, double hinch)
          This is same as addHeaderImage() exception an explicit size of the painter area is specified.
 String addHeaderImage(URL image)
          Add an image to the document header.
 String addHeaderNewline(int n)
          Add one or more newline to the document header.
 String addHeaderObject(Object obj)
          Add an object to the document header.
 String addHeaderPainter(Painter area)
          Add a pinter element to the document header.
 String addHeaderPainter(Painter area, double winch, double hinch)
          This is same as addHeaderPainter() exception an explicit size of the painter area is specified.
 String addHeaderRightTab()
          Add a right aligned tab.
 String addHeaderSection(SectionLens section)
          Add a section element to the document header.
 String addHeaderSection(SectionLens section, TableLens table)
          Add a section element to the document header.
 String addHeaderSeparator(int style)
          Add a separator to header.
 String addHeaderSpace(int pixels)
          Add horizontal space to the document header.
 String addHeaderTab(int fill)
          Add a tab.
 String addHeaderTable(TableLens table)
          Add a table to the document header.
 String addHeaderText(String text)
          Add a text string to the document header.
 String addHeaderText(TextLens text)
          Add a text element to the document header.
 String addHeaderTextBox(TextLens text)
          Add a text box to the document header.
 String addHeaderTextBox(TextLens text, int border, double winch, double hinch, int talign)
          Add a text box to the document header.
 void addPageBreakListener(PageBreakListener l)
          Add a pagebreak listener.
 void addParameter(int index, UserVariable param)
          Add a new parameter to the report.
 void addParameter(UserVariable param)
          Add a new parameter to the report.
 void addPresenter(Class type, Presenter p)
          Register a presenter for the specified class.
 void addPresenter(String id, Class type, Presenter presenter)
          Add a presenter to a table element.
 void addRefreshListener(ActionListener listener)
          Add the refresh listener for local query.
 void addRunningTotal(RunningTotal total)
          Add a new running total to the report.
 void clear()
          Remove all report elements.
 void clearFormat()
          Clear the format registry.
 void clearPresenter()
          Clear the presenter registry.
 Object clone()
          Make a copy of this report.
 Object clone(boolean deep)
          Make a copy of this report.
 boolean containsFormula(inetsoft.report.internal.binding.FormulaInfo info)
          Check if an attribute or expression is already defined in the selection.
 void copyFormulas(ReportSheet report)
          Copy formulas.
protected  void copyReportSheet(ReportSheet report, boolean flag)
          Copy report sheet to report
protected  void copyReportSheet(ReportSheet report, boolean flag, boolean deep)
          Copy report sheet to report
 void exportQueries(boolean overwrite)
          Export the queries.
 void fireExecuteEvent(ExecuteEvent event)
          Fire an execute event.
 void firePageBreakEvent(StylePage pg, boolean more)
          Fire a pagebreak event.
 int getAllFooterElementCount()
          Return the number of the elements in the document footer, include the elements in a section which in the document footer.
 int getAllHeaderElementCount()
          Return the number of the elements in the document header, include the elements in a section which in the document header.
 Object getBackground()
          Get the report background.
 int getBackgroundLayout()
          Get the background layout of the page.
 Dimension getBackgroundSize()
          Get the background image size.
 String getContextName()
          Get the context name.
 String getCSSLocation()
          Get the location of the css style sheet used by this report.
 int getCurrentAlignment()
          Get the current setting of the alignment.
 Color getCurrentBackground()
          Get the current document background color.
 Insets getCurrentCellPadding()
          Get the current table cell padding.
 Font getCurrentFont()
          Get the current font setting.
 Color getCurrentForeground()
          Get the current document foreground color.
 double getCurrentIndent()
          Get the current indentation in inches.
 short getCurrentLineId()
          Get the current line id.
 int getCurrentLineSpacing()
          Get the current line spacing setting.
 Margin getCurrentMargin()
          Get the margin of the current page in inches.
 int getCurrentPainterLayout()
          Get the current painter layout policy.
 Insets getCurrentPainterMargin()
          Get the fixed size element external space.
 int getCurrentSeparatorAdvance()
          Get the separator vertical trailing advance.
 int getCurrentTableAdvance()
          Get the advance of table elements.
 int getCurrentTableLayout()
          Get the current table layout mode.
 double getCurrentTableWidth()
          Get the current table width setting.
 double[] getCurrentTabStops()
          Return the current tab stop setting.
 int getCurrentTextAdvance()
          Get the advance of text elements.
 int getCurrentWrapping()
          Get the current wrapping style.
 DataSet getDataSet(String id)
          Get the chart of the specified chart element.
 String getDirectory()
          Get the current directory of this report.
 ReportElement getElement(String id)
          Find the index of the specified element.
 Vector getElements(int type)
          Get the elements of the specified type.
 Enumeration getExecuteListeners()
          Get all registered execute listeners.
 List getExportInfo()
          Get the export query info.
 Rectangle getFooterBounds(Dimension pgsize)
          Get the page footer bounds.
 ReportElement getFooterElement(int idx)
          Get the specified element in the footer.
 int getFooterElementCount()
          Return the number of elements in the document footer.
 int getFooterElementIndex(ReportElement e)
          Get the index of the specified element.
 double getFooterFromEdge()
          Get the page footer position from the bottom of the page.
 FormLens getForm(String id)
          Get the form lens of the specified form element.
 Format getFormat(Class type)
          Get the format object registered for this class or one of it's super classes.
 inetsoft.report.internal.binding.FormulaInfo getFormula(String source, String fname)
          Get a formula matches a formula name.
 inetsoft.report.internal.binding.FormulaInfo[] getFormulas()
          Get all the formulas.
 inetsoft.report.internal.binding.FormulaInfo[] getFormulas(String source, int stype)
          Get formula infos according the source.
 Rectangle getHeaderBounds(Dimension pgsize)
          Get the page header bounds.
 ReportElement getHeaderElement(int idx)
          Get the specified element in the header.
 int getHeaderElementCount()
          Return the number of elements in the document header.
 int getHeaderElementIndex(ReportElement e)
          Get the index of the specified element.
 double getHeaderFromEdge()
          Get the page header position from the top of the page.
 List getImportInfo()
          Get the import query info.
 Locale getLocale()
          Get the locale used in this report.
 Margin getMargin()
          Get the page margin in inches.
 int getMaxPages()
          Get the max pages.
 int getMaxPages(boolean isUsedGlobal)
          Get the max pages.
 String getMetaTemplate()
          Get the meta template name.
 Integer getNextOrientation()
          Get the page orientation for the next page.
 String getOnInit()
          Get the report initialization Javascript handler.
 String getOnLoad()
          Get the report creation Javascript handler.
 String getOnPageBreak()
          Get the page break Javascript handler.
 String getOnPrint()
          Get the onPrint script handler.
 int getOrientation()
          Get the orientation of current report.
 int getPageNumberingStart()
          Get the page numbering start index.
 Size getPageSize()
          Get the page size of current report.
 UserVariable getParameter(int idx)
          Get a report parameter definition.
 int getParameterCount()
          Get the number of parameters defined in this report.
 Vector getParameters()
          Get the report parmaters.
 inetsoft.report.parameter.ParameterSheetFlow getParameterSheetFlow()
          Get parameter sheet flow which contains parameter sheet information and parameter sheet link information.
 String[] getParameterSheets()
          Deprecated. use getParameterSheetFlow instead.
 ReportSheet getParentReport()
          Get parent report.
 Presenter getPresenter(Class type)
          Get the presenter object registered for this class or one of it's super classes.
static Margin getPrinterMargin()
          Get the current printer margin.
 String getProperty(String name)
          Get a property value.
 Enumeration getQueries()
          Get all the queries.
 XQuery getQuery(String qname)
          Get an embedded query definition.
 Enumeration getQueryNames()
          Get the names of embedded queries.
 int getQueryType()
          Get query type in the query repository.
 RunningTotal getRunningTotal(int idx)
          Get a report running total definition.
 int getRunningTotalCount()
          Get the number of running totals defined in this report.
 SharedFilter getSharedFilter()
          Gets the shared filter mappings defined for this report.
 TableLens getTable(String id)
          Get the table lens object for the specified table.
 inetsoft.report.style.TableStyle getTableStyle(String id)
          Get the table style object for the specified table.
 String getText(String id)
          Get the text contents of a text or text box element.
 String getVersion()
          Get the Style Report version.
 void importQueries(boolean overwrite)
          Import the queries.
 void insertFooterElement(int idx, ReportElement e)
          Insert the element at specified position (before).
 void insertHeaderElement(int idx, ReportElement e)
          Insert the element at specified position (before).
 boolean isCurrentJustify()
          Check if text is justified.
 boolean isCurrentOrphanControl()
          Check the current widow/orphan control setting.
 boolean isCurrentTableOrphanControl()
          Check the current widow/orphan control setting.
 boolean isExportSinglePage()
          Check the top report is export in single page or not.
 boolean isFromMetaTemplate()
          Check if the report is created from a meta template.
 boolean isHorizontalWrap()
          Check the horizontal flow option.
 boolean isLandscape()
          Check if the page of this report is set to landscape.
 boolean isParameterPrompting()
          Get parameter prompting option.
 boolean isSinglePageForTopReport()
          Check the top report is single page report or not.
 boolean isVisible()
          Check if the local query repository is visible.
 void keepWithNext(StylePage pg, int ocurrent, Vector elements)
          Handle keep with next.
 void mergeInto(String id, TableLens table)
          Merge a table into an existing table element.
 void moveAnchor(Position anchor)
          Move the anchor to the new position.
abstract  void moveElement(String id, int direction)
          Move element up or down.
protected  void moveHeaderFooterElement(ReportElement elem, int direction)
          Move header or footer element up or down.
 void print()
          Print this report with the PrintJob.
 void print(PrintJob job)
          Print this document to the printer.
protected  void printHeaderFooter(StylePage pg)
          Print the header and footer of the page.
abstract  boolean printNext(StylePage pg)
          Print one page.
 boolean printNextArea(StylePage pg, Vector elements, boolean flow)
          Print the next page area.
protected  boolean printNextLine(StylePage pg, Vector elements, boolean flow)
          Print the next line or next block element.
abstract  boolean printNextPage(StylePage pg)
          Print the next page.
protected  void printNonFlowAreas(StylePage pg, PageArea[] areas, boolean first)
          Print the content of non-flow areas and area borders.
 void refreshFormats()
          Refresh all formats.
 void removeAllParameters()
          Removes all the parameters from the report parameter list.
protected abstract  void removeContents()
          Remove all elements from the contents area.
 void removeContext(String name)
          Removed the named context from the repository.
abstract  void removeElement(String id)
          Remove the specified element.
protected  void removeElementHeaderFooter(String id)
          Remove specified element from element header/footer list.
 void removeExecuteListener(ExecuteListener listener)
          Remove an execute listener.
 void removeExecuteListeners()
          Remove all the execute listeners.
 void removeFooterElement(int idx)
          Remove the specified element.
 void removeFormat(Class type)
          Remove the specified format from the registry.
 void removeFormula(inetsoft.report.internal.binding.FormulaInfo info)
          Remove a formula from the repository.
 void removeHeaderElement(int idx)
          Remove the specified element.
protected  void removeHeaderFooterElement(ReportElement elem)
          Remove the specified header or footer element.
 void removePageBreakListener(PageBreakListener l)
          Remove a pagebreak listener.
 void removeParameter(int idx)
          Remove a parameter from the report parameter list.
 void removePresenter(Class type)
          Remove the specified presenter from the registry.
 void removeQuery(String qname)
          Remove the named embedded query.
 void removeRunningTotal(int idx)
          Remove a running total from the report running total list.
protected abstract  void replaceElement(String id, ReportElement elem)
          replace a element.
 void replaceFooterElement(int idx, ReportElement e)
          Replace the specified element.
 void replaceFormulaInfo(inetsoft.report.internal.binding.FormulaInfo ninfo, inetsoft.report.internal.binding.FormulaInfo oinfo)
          Replace formula info.
 void replaceHeaderElement(int idx, ReportElement e)
          Replace the specified element.
protected  void replaceHeaderFooterElement(ReportElement elem, ReportElement nelem)
          Replace the specified header or footer element.
 void reset()
          Reset the printing.
protected abstract  void resetContents()
          Reset all elemnts in the contents.
 void resetPageNumbering()
          Reset the page numbering so the numbering and count starts from beginning.
 void saveContext(String name)
          Save the current report context in the context repository.
 void selectContext(String name)
          Retrieve the context values from the named context and set the values in the report.
 void setBackground(Object bg)
          Set the background of this report.
 void setBackgroundLayout(int layout)
          Set the background layout of the page.
 void setBackgroundSize(Dimension d)
          Set the background image size.
 void setBackgroundSize(int width, int height)
          Set the background size of the page.
 void setContextName(String name)
          Set the context name.
 void setCSSLocation(String cssLoc)
          Set the location of a css style sheet to be applied to the report.
 void setCurrentAlignment(int align)
          Set the current alignment of the report elements.
 void setCurrentBackground(Color bg)
          Set the current document background color.
 void setCurrentCellPadding(Insets padding)
          Set the cell padding space around the cell contents.
 void setCurrentFont(Font font)
          Set the current font of the document.
 void setCurrentFooter(int hflag)
          Set the currently worked on footer.
 void setCurrentFooter(String eid)
          Set the currently worked on footer.
 void setCurrentForeground(Color fg)
          Set the current document foreground color.
 void setCurrentHeader(int hflag)
          Set the currently worked on header.
 void setCurrentHeader(String eid)
          Set the currently worked on header.
 void setCurrentIndent(double inch)
          Set the current indentation level.
 void setCurrentJustify(boolean justify)
          If justify is set to true, text lines are fully justified.
 void setCurrentLineId(short id)
          Set the current line id.
 void setCurrentLineSpacing(int spacing)
          Set the current line spacing in pixels.
 void setCurrentOrphanControl(boolean orphan)
          Set the widow/orphan line control option.
 void setCurrentPainterLayout(int policy)
          Set the layout policy for painter.
 void setCurrentPainterMargin(Insets margin)
          Set the space around the painter elements.
 void setCurrentSeparatorAdvance(int adv)
          Set the amount to advance below a separator element.
 void setCurrentTableAdvance(int tableadv)
          Set the amount to advance following each table element.
 void setCurrentTableLayout(int autosize)
          Set the current table layout mode.
 void setCurrentTableOrphanControl(boolean orphan)
          Set the table widow/orphan control option.
 void setCurrentTableWidth(double inch)
          Set the width of the table in inches.
 void setCurrentTabStops(double[] pos)
          Set the tab stops.
 void setCurrentTextAdvance(int textadv)
          Set the amount to advance following each text element.
 void setCurrentWrapping(int wrapping)
          Set the current wrapping style.
 void setDirectory(String dir)
          Set the directory where this template is saved.
 void setElement(String id, Object data)
          This method can be used the set the data source/content of elements already in the report.
 void setFooterFromEdge(double inch)
          Set the page footer position from the bottom of the page.
 void setFormulaInfos(ArrayList infos)
          Set formula infos.
 void setHeaderFromEdge(double inch)
          Set the page header position from the top of the page.
 void setHorizontalWrap(boolean hor)
          Set the flow direction to horizontal.
 void setLocale(Locale locale)
          Set the locale used in this report.
 void setMargin(Margin margin)
          Set the page margin.
 void setMaxPages(int pages)
          Set the max pages.
 void setMetaTemplate(String meta)
          Set the meta template name.
 void setOnInit(String cmd)
          Set the initialization Javascript handler.
 void setOnLoad(String cmd)
          Set the creation Javascript handler.
 void setOnPageBreak(String cmd)
          Set the page break Javascript handler.
 void setOnPrint(String cmd)
          Set the onPrint script handler.
 void setOrientation(int orient)
          Set the orientation of the report page.
 void setPageNumberingStart(int idx)
          Set the page index where the page numbering starts.
 void setPageSize(Size size)
          Set the report page size.
 void setParameterPrompting(boolean prompting)
          Set parameter prompting option.
 void setParameterSheet(ParameterSheet paraSheet)
          Set the embeded paramter sheet.
 void setParameterSheetFlow(inetsoft.report.parameter.ParameterSheetFlow pflow)
          Set parameter sheet flow which contains parameter sheet information and parameter sheet link information.
 void setParameterSheets(String[] sheets)
          Deprecated. use setParameterSheetFlow instead.
 void setParentReport(ReportSheet preport)
          Set parent report.
static void setPrinterMargin(Margin pmargin)
          This method is provided to work around the jdk 1.1 win32 bug.
 void setProperty(String name, String val)
          Set a property.
 void setQuery(String qname, XQuery query)
          Add or remove an embedded query to the report.
 void setSharedFilter(SharedFilter sharedFilter)
          Sets the shared filter mappings defined for this report.
 void setTableStyle(String id, inetsoft.report.style.TableStyle style)
          Set the table style object for the specified table.
 void setVersion(String version)
          Set the Style Report version.
 void setVisible(String id, boolean vis)
          Set the visibility of an element.
 void syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo, inetsoft.uql.util.XSourceInfo ninfo)
          Synchronize the source info.
 void syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo, inetsoft.uql.util.XSourceInfo ninfo, boolean syncSource)
          Synchronize the source info.
 void updateQuery(XQuery dx, String oname)
          Add or replace a query in the repository.
 
Methods inherited from class inetsoft.report.internal.StyleCore
addChangeListener, addr, addScriptObject, advance, alignLine, append, append, calcGrid, checkDataSourceFolderPermission, checkDataSourcePermission, checkQueryFolderPermission, checkQueryPermission, cloneElements, cloneElements, complete, completeElement, copyQueries, copyStyleCore, createFinder, createFormatMap, createPresenterMap, deleteScriptEnv, fireEvent, format, format, getActionScriptable, getAllElements, getAllFooterElements, getAllHeaderElements, getBackgroundImageLocation, getBuildNumber, getBurstInfo, getCompositeElement, getDefaultFooter, getDefaultHeader, getDependencyFile, getDependencyFileName, getElementFooters, getElementHeaders, getElementWidth, getElemInfoBoundsMap, getElemInfoMap, getFinder, getFormat, getFormats, getFrames, getHeadingNumberArray, getHFTextFormatter, getLocalQueryRepository, getNextHeadingNumberArray, getNextID, getNumHeadingMap, getOnLoadResult, getOutputType, getPageTotalStart, getPagingLock, getParameterSheet, getParentScope, getPresenter, getProperties, getQueryManager, getReportManager, getReportMode, getScriptEnv, getScriptObject, getSecNumHeadingMap, getSheet, getTextSize, getTopReport, getVariableTable, hasOnPrint, isDesignTime, isLimited, isPrintMode, isReusePages, isRunTime, isSubreport, parseAssetRepository, printFixedContainer, printFixedContainer, processHF, processHF, putElemWarnings, removeChangeListener, renameQuery, renameQuery, resetCache, resetHeadingNumberArray, resetOnLoad, resetScriptEnv, restoreHeadingNumberArray, runOnInit, runOnLoad, runOnPrint, setBackgroundImageLocation, setBurstInfo, setDesignTime, setElemInfoBoundsMap, setFooterContinue, setHeaderContinue, setHeadingNumberArray, setHFTextFormatter, setHindent, setOverrideFooter, setOverrideHeader, setPageTotalStart, setParentScope, setPrintMode, setReportMode, setReportMode, setReusePages, setScriptEnv, setSubreport, setValue, setVariableTable, skip, toString, updateParameterSheet, writeAssetRepository
 
Methods inherited from class inetsoft.uql.asset.AbstractAssetEngine
addAssetChangeListener, addFolder, allowsFolderScopeChange, allowsSheetScopeChange, changeFolder, changeFolder0, changeSheet, changeSheet0, checkAssetPermission, checkDependencyValidity, checkFolderRemoveable, checkPermission, clearCache, clearVSBookmark, closeStorages, containsEntry, createPhysicalEntry, dispose, finalize, fireEvent, getAssetPrefix, getDependencyFileKey, getDesignView, getEntries, getEntries, getEntryIdentifier, getParent, getParentFolder, getQueryEntries, getQuotaManager, getReportSheetDependencies, getReportStorage, getSession, getSheetDependencies, getStorage, getStorage, getStorages, getVSBookmark, getWorksheetEntries, initFinder, isEntryAvailable, removeAssetChangeListener, removeFolder, removeFolder0, removeSheet, removeSheet0, removeUser, renameUser, setParent, setSheet, setSheet, setVSBookmark, supportsScope
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_FIT_CONTENT

public static final int TABLE_FIT_CONTENT
Table layout policy. Size column width to fit contents. Allow table rows to wrap.

See Also:
Constant Field Values

TABLE_FIT_PAGE

public static final int TABLE_FIT_PAGE
Table layout policy. Fit the table width to page width.

See Also:
Constant Field Values

TABLE_EQUAL_WIDTH

public static final int TABLE_EQUAL_WIDTH
Table layout policy. Table with equal width columns and fit in one page.

See Also:
Constant Field Values

TABLE_FIT_CONTENT_1PP

public static final int TABLE_FIT_CONTENT_1PP
Table layout policy. Size column width to fit contents. If the table rows wrap, print one table segment per page.

See Also:
Constant Field Values

TABLE_FIT_CONTENT_PAGE

public static final int TABLE_FIT_CONTENT_PAGE
Table layout policy. Size column width to fit the contents just like TABLE_FIT_CONTENT. Each table segment is then sized (by adjusting the last column) to fit the page width.

See Also:
Constant Field Values

PAINTER_NON_BREAK

public static final int PAINTER_NON_BREAK
Painter layout policy. Always paint the painter in one area.

See Also:
Constant Field Values

PAINTER_BREAKABLE

public static final int PAINTER_BREAKABLE
Painter layout policy. Allow a painter to be printed across pages.

See Also:
Constant Field Values

DEFAULT_HEADER

public static final int DEFAULT_HEADER
Flag to indicate the default page header. This flag is used to change the currently worked header. All subsequent call to addHeader???() methods add the elements to the default header.

See Also:
Constant Field Values

FIRST_PAGE_HEADER

public static final int FIRST_PAGE_HEADER
Flag to indicate the first page header. This flag is used to change the currently worked header. All subsequent call to addHeader???() methods add the elements to the first page header.

See Also:
Constant Field Values

EVEN_PAGE_HEADER

public static final int EVEN_PAGE_HEADER
Flag to indicate the even page header. This flag is used to change the currently worked header. All subsequent call to addHeader???() methods add the elements to the even page header.

See Also:
Constant Field Values

ODD_PAGE_HEADER

public static final int ODD_PAGE_HEADER
Flag to indicate the odd page header. This flag is used to change the currently worked header. All subsequent call to addHeader???() methods add the elements to the odd page header.

See Also:
Constant Field Values

DEFAULT_FOOTER

public static final int DEFAULT_FOOTER
Flag to indicate the default page footer. This flag is used to change the currently worked footer. All subsequent call to addFooter???() methods add the elements to the default footer.

See Also:
Constant Field Values

FIRST_PAGE_FOOTER

public static final int FIRST_PAGE_FOOTER
Flag to indicate the first page footer. This flag is used to change the currently worked footer. All subsequent call to addFooter???() methods add the elements to the first page footer.

See Also:
Constant Field Values

EVEN_PAGE_FOOTER

public static final int EVEN_PAGE_FOOTER
Flag to indicate the even page footer. This flag is used to change the currently worked footer. All subsequent call to addFooter???() methods add the elements to the even page footer.

See Also:
Constant Field Values

ODD_PAGE_FOOTER

public static final int ODD_PAGE_FOOTER
Flag to indicate the odd page footer. This flag is used to change the currently worked footer. All subsequent call to addFooter???() methods add the elements to the odd page footer.

See Also:
Constant Field Values

BODY

public static final int BODY
Flag to indicate the main report body section.

See Also:
Constant Field Values

WRAP_NONE

public static final int WRAP_NONE
No wrapping. Text flows on top of element.

See Also:
Constant Field Values

WRAP_LEFT

public static final int WRAP_LEFT
Wrapping at the left of the element.

See Also:
Constant Field Values

WRAP_RIGHT

public static final int WRAP_RIGHT
Wrapping at the right of the element.

See Also:
Constant Field Values

WRAP_BOTH

public static final int WRAP_BOTH
Wrapping at both left and right.

See Also:
Constant Field Values

WRAP_TOP_BOTTOM

public static final int WRAP_TOP_BOTTOM
ReportElement occupies whole row. No text is allowed at left or right.

See Also:
Constant Field Values

UP

public static final int UP
Flag to indictate element moving up direction.

See Also:
Constant Field Values

DOWN

public static final int DOWN
Flag to indicate element moving down direction.

See Also:
Constant Field Values
Constructor Detail

ReportSheet

public ReportSheet()
Method Detail

getLocale

public Locale getLocale()
Get the locale used in this report.


setLocale

public void setLocale(Locale locale)
Set the locale used in this report. If locale is not set, the default locale of the operating system is used.


getBackgroundLayout

public int getBackgroundLayout()
Get the background layout of the page.

Returns:
background layout.

setBackgroundLayout

public void setBackgroundLayout(int layout)
Set the background layout of the page. for the int layout parameter, use StyleConstants StyleConstants.BACKGROUND_TILED or StyleConstants.BACKGROUND_CENTER

Parameters:
layout - background layout.

getBackgroundSize

public Dimension getBackgroundSize()
Get the background image size.

Returns:
background image size.

setBackgroundSize

public void setBackgroundSize(Dimension d)
Set the background image size.

Parameters:
d - background imae size.

setBackgroundSize

public void setBackgroundSize(int width,
                              int height)
Set the background size of the page.

Parameters:
width - background width.
height - background height.

getParameterCount

public int getParameterCount()
Get the number of parameters defined in this report. The runtime parameters of a report is the union of the parameters defined in the report, and the parameters defined in the queries used in the report. If a parameter is defined in both places, the definition in the report is used.

Returns:
number of parameters defined in the report.

getParameters

public Vector getParameters()
Get the report parmaters.


getParameter

public UserVariable getParameter(int idx)
Get a report parameter definition.

Parameters:
idx - parameter index.
Returns:
parameter definition.

addParameter

public void addParameter(UserVariable param)
Add a new parameter to the report. If a parameter with the same name already exists, the existing definition is replaced by the name parameter definition.


addParameter

public void addParameter(int index,
                         UserVariable param)
Add a new parameter to the report. If a parameter with the same name already exists, the existing definition is replaced by the name parameter definition.


removeAllParameters

public void removeAllParameters()
Removes all the parameters from the report parameter list.


removeParameter

public void removeParameter(int idx)
Remove a parameter from the report parameter list.


setParameterPrompting

public void setParameterPrompting(boolean prompting)
Set parameter prompting option.

Parameters:
prompting - true if use parameter prompting dialog to gather parameters, false if use parameter sheet to gather parameters.

isParameterPrompting

public boolean isParameterPrompting()
Get parameter prompting option.

Returns:
true if use parameter prompting dialog to gather parameters, false if use parameter sheet to gather parameters.

setParameterSheetFlow

public void setParameterSheetFlow(inetsoft.report.parameter.ParameterSheetFlow pflow)
Set parameter sheet flow which contains parameter sheet information and parameter sheet link information.

Parameters:
pflow - the specified parameter sheet flow.

getParameterSheetFlow

public inetsoft.report.parameter.ParameterSheetFlow getParameterSheetFlow()
Get parameter sheet flow which contains parameter sheet information and parameter sheet link information.

Returns:
parameter sheet flow if any, null otherwise.

setParameterSheets

public void setParameterSheets(String[] sheets)
Deprecated. use setParameterSheetFlow instead.

Set the parameter sheets for prompting parameter values. One or more parameter sheets (defined in LibManager) can be specified. The parameter sheets are used to prompt for parameter values when a report is opened. If more than one parameter sheets are specified, they are chained and the parameter values are accumulated.


getParameterSheets

public String[] getParameterSheets()
Deprecated. use getParameterSheetFlow instead.

Get the parameter sheets for this parameter. If no parameter sheet is specified, a default parameter prompting dialog is generated from the report parameter definition.


addRefreshListener

public void addRefreshListener(ActionListener listener)
Add the refresh listener for local query.

Specified by:
addRefreshListener in interface XLocalQueryRepository

isVisible

public boolean isVisible()
Check if the local query repository is visible.

Specified by:
isVisible in interface XLocalQueryRepository

exportQueries

public void exportQueries(boolean overwrite)
Export the queries.

Specified by:
exportQueries in interface XLocalQueryRepository

importQueries

public void importQueries(boolean overwrite)
Import the queries.

Specified by:
importQueries in interface XLocalQueryRepository

getExportInfo

public List getExportInfo()
Get the export query info.

Specified by:
getExportInfo in interface XLocalQueryRepository

getImportInfo

public List getImportInfo()
Get the import query info.

Specified by:
getImportInfo in interface XLocalQueryRepository

syncSourceInfo

public void syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo,
                           inetsoft.uql.util.XSourceInfo ninfo)
Synchronize the source info.

Specified by:
syncSourceInfo in interface XLocalQueryRepository

syncSourceInfo

public void syncSourceInfo(inetsoft.uql.util.XSourceInfo oinfo,
                           inetsoft.uql.util.XSourceInfo ninfo,
                           boolean syncSource)
Synchronize the source info.


getQueryType

public int getQueryType()
Get query type in the query repository.

Specified by:
getQueryType in interface XQueryRepository
Returns:
query type which is one of the predefined types in query repository.

getQueryNames

public Enumeration getQueryNames()
Get the names of embedded queries.


getQuery

public XQuery getQuery(String qname)
Get an embedded query definition.

Specified by:
getQuery in interface XQueryRepository
Parameters:
qname - the specified query name.
Returns:
query matches the specified query name.

getQueries

public Enumeration getQueries()
Get all the queries.

Specified by:
getQueries in interface XQueryRepository
Returns:
all the queries.

setQuery

public void setQuery(String qname,
                     XQuery query)
Add or remove an embedded query to the report. If the query object is null, the named query is removed from the report.


updateQuery

public void updateQuery(XQuery dx,
                        String oname)
                 throws Exception
Add or replace a query in the repository.

Specified by:
updateQuery in interface XQueryRepository
Parameters:
dx - new query.
oname - old name of the query, if the name has been changed. Otherwise it should be null.
Throws:
Exception

removeQuery

public void removeQuery(String qname)
Remove the named embedded query.

Specified by:
removeQuery in interface XQueryRepository

removeFormula

public void removeFormula(inetsoft.report.internal.binding.FormulaInfo info)
Remove a formula from the repository.

Specified by:
removeFormula in interface XFormulaRepository

addFormula

public void addFormula(inetsoft.report.internal.binding.FormulaInfo info)
Add a formula from the repository.

Specified by:
addFormula in interface XFormulaRepository

replaceFormulaInfo

public void replaceFormulaInfo(inetsoft.report.internal.binding.FormulaInfo ninfo,
                               inetsoft.report.internal.binding.FormulaInfo oinfo)
Replace formula info.

Parameters:
ninfo - the new FormulaInfo.
oinfo - the old FormulaInfo.

setFormulaInfos

public void setFormulaInfos(ArrayList infos)
Set formula infos.


getFormulas

public inetsoft.report.internal.binding.FormulaInfo[] getFormulas()
Get all the formulas.

Specified by:
getFormulas in interface XFormulaRepository
Returns:
all the formulas.

getFormula

public inetsoft.report.internal.binding.FormulaInfo getFormula(String source,
                                                               String fname)
Get a formula matches a formula name.

Specified by:
getFormula in interface XFormulaRepository
Parameters:
fname - the specified formula name.
Returns:
formula matches the specified formula name.

getFormulas

public inetsoft.report.internal.binding.FormulaInfo[] getFormulas(String source,
                                                                  int stype)
Get formula infos according the source.

Specified by:
getFormulas in interface XFormulaRepository
Returns:
formula matches the specified formula name.

copyFormulas

public void copyFormulas(ReportSheet report)
Copy formulas.

Parameters:
report - the specified report to copy formulas from.

containsFormula

public boolean containsFormula(inetsoft.report.internal.binding.FormulaInfo info)
Check if an attribute or expression is already defined in the selection.

Specified by:
containsFormula in interface XFormulaRepository

getRunningTotalCount

public int getRunningTotalCount()
Get the number of running totals defined in this report.

Returns:
number of running totals defined in the report.

getRunningTotal

public RunningTotal getRunningTotal(int idx)
Get a report running total definition.

Parameters:
idx - running total index.
Returns:
running total definition.

addRunningTotal

public void addRunningTotal(RunningTotal total)
Add a new running total to the report. If a running total with the same name already exists, the existing definition is replaced by the new running total definition.


removeRunningTotal

public void removeRunningTotal(int idx)
Remove a running total from the report running total list.


setMargin

public void setMargin(Margin margin)
Set the page margin. The unit is in inches.

Parameters:
margin - page margin.

getMargin

public Margin getMargin()
Get the page margin in inches.

Returns:
page margin.

getBackground

public Object getBackground()
Get the report background.


setBackground

public void setBackground(Object bg)
Set the background of this report. The background can be either a Color or an Image object.

Parameters:
bg - report background.

setHeaderFromEdge

public void setHeaderFromEdge(double inch)
Set the page header position from the top of the page. The unit is in inches.

Parameters:
inch - header position.

getHeaderFromEdge

public double getHeaderFromEdge()
Get the page header position from the top of the page. The unit is in inches.

Returns:
header position.

setFooterFromEdge

public void setFooterFromEdge(double inch)
Set the page footer position from the bottom of the page. The unit is in inches.

Parameters:
inch - footer position.

getFooterFromEdge

public double getFooterFromEdge()
Get the page footer position from the bottom of the page. The unit is in inches.

Returns:
footer position.

getHeaderBounds

public Rectangle getHeaderBounds(Dimension pgsize)
Get the page header bounds.

Parameters:
pgsize - page size in pixels.
Returns:
header region.

getFooterBounds

public Rectangle getFooterBounds(Dimension pgsize)
Get the page footer bounds.

Parameters:
pgsize - page size in pixels.
Returns:
footer region.

getCurrentMargin

public Margin getCurrentMargin()
Get the margin of the current page in inches.

Returns:
page margin.

setPageNumberingStart

public void setPageNumberingStart(int idx)
Set the page index where the page numbering starts.

Parameters:
idx - the page index where the page numbering starts. The page would be page one.

getPageNumberingStart

public int getPageNumberingStart()
Get the page numbering start index.

Returns:
page index of the first page.

setHorizontalWrap

public void setHorizontalWrap(boolean hor)
Set the flow direction to horizontal. This controls how text wraps around an anchored painter. If the direction is horizontal, the text lines are flow left to right, on both sides of the image, and then downward. If the horizontal flow is false, the text flows in the left size of the image first, then advance to the right side of the image after the left size area is exhausted.


isHorizontalWrap

public boolean isHorizontalWrap()
Check the horizontal flow option.


saveContext

public void saveContext(String name)
Save the current report context in the context repository. If the named context already exists, it is replaced with the current context values. A context contains all values set with the setCurrent...() methods.

Parameters:
name - context name.

selectContext

public void selectContext(String name)
Retrieve the context values from the named context and set the values in the report.

Parameters:
name - context name.

removeContext

public void removeContext(String name)
Removed the named context from the repository.

Parameters:
name - context name.

setCurrentAlignment

public void setCurrentAlignment(int align)
Set the current alignment of the report elements. The alignment is effective after the call, and will be used by all elements added after the call upto the next call of this method.

Parameters:
align - alignment flag, a bitwise OR of the H_LEFT, H_CENTER, H_RIGHT, and V_TOP, V_CENTER, V_BOTTOM.

getCurrentAlignment

public int getCurrentAlignment()
Get the current setting of the alignment.

Returns:
alignment flag.

getCurrentLineId

public short getCurrentLineId()
Get the current line id.

Returns:
line id.

setCurrentLineId

public void setCurrentLineId(short id)
Set the current line id.


setCurrentIndent

public void setCurrentIndent(double inch)
Set the current indentation level. The value is in inches. The indent is effective after the call, and will be used by all elements added after the call upto the next call of this method.

Parameters:
inch - indentation size.

getCurrentIndent

public double getCurrentIndent()
Get the current indentation in inches.

Returns:
indentation.

setCurrentTabStops

public void setCurrentTabStops(double[] pos)
Set the tab stops.

Parameters:
pos - tab stops in inches.

getCurrentTabStops

public double[] getCurrentTabStops()
Return the current tab stop setting.

Returns:
tab stop positions in inches.

setCurrentWrapping

public void setCurrentWrapping(int wrapping)
Set the current wrapping style. This affects how the text around a Painter/Image/TextBox is wrapped.

Parameters:
wrapping - one of the WRAP_NONE, WRAP_LEFT, WRAP_RIGHT, WRAP_BOTH, and WRAP_TOP_BOTTOM.

getCurrentWrapping

public int getCurrentWrapping()
Get the current wrapping style.

Returns:
wrapping option.

moveAnchor

public void moveAnchor(Position anchor)
Move the anchor to the new position. The anchor is relative to the bottom of the last element, and the left paintable edge of the page. If the anchor Y is negative, it's treated as the distance from the top of the last element. If the anchor X is positive, it's the distance from the left edge of the page area, otherwise, it's the distance from the right edge of the page area. The next element is placed at the new anchor position. This only affects fixed size elements, Painter, Chart, Component, and Image.

Parameters:
anchor - anchor position.

setCurrentLineSpacing

public void setCurrentLineSpacing(int spacing)
Set the current line spacing in pixels. The line spacing is the space between the two lines. The line spacing parameter is effective after the call, and will be used by all elements added after the call upto the next call of this method.

Parameters:
spacing - line spacing.

getCurrentLineSpacing

public int getCurrentLineSpacing()
Get the current line spacing setting.

Returns:
line spacing.

setCurrentFont

public void setCurrentFont(Font font)
Set the current font of the document. The font will be used by the text elements and possibly table elements. In the case of table, if a font is returned from the TableLens, it's always used. Otherwise, the current font is used. The font is effective after the call, and will be used by all elements added after the call upto the next call of this method.

Parameters:
font - current document font.

getCurrentFont

public Font getCurrentFont()
Get the current font setting.

Returns:
current document font.

setCurrentForeground

public void setCurrentForeground(Color fg)
Set the current document foreground color. The foreground color is effective after the call, and will be used by all elements added after the call upto the next call of this method.

Parameters:
fg - foreground color.

getCurrentForeground

public Color getCurrentForeground()
Get the current document foreground color.

Returns:
foreground color.

setCurrentBackground

public void setCurrentBackground(Color bg)
Set the current document background color. The background color is effective after the call, and will be used by all elements added after the call upto the next call of this method.

Parameters:
bg - background color.

getCurrentBackground

public Color getCurrentBackground()
Get the current document background color.

Returns:
background color.

setCurrentTableLayout

public void setCurrentTableLayout(int autosize)
Set the current table layout mode. The available modes are: TABLE_FIT_PAGE, TABLE_FIT_CONTENT, TABLE_EQUAL_WIDTH, and TABLE_FIT_CONTENT_1PP. The table layout mode is effective after the call, and will be used by all elements added after the call upto the next call of this method.

If the layout is set to TABLE_FIT_PAGE, the width of the table is set to the width of the page, or to the table width explicitly set by the user. The space is distributed to the columns proportional to the preferred width of the columns. The preferred width of a column is returned by the TableLens, or if it's -1, calculated by the ReportSheet based on the contents in the column cells.

If the layout is set to TABLE_EQUAL_WIDTH, the width of the table is set to the width of the page, or to the table width explicitly set by the user. All columns are set to equal width.

If the layout is set to TABLE_FIT_CONTENT, the widht of the columns are determined by the TableLens.getColWidth() return value, or if it's -1, calculated by the ReportSheet based on the contents in the column cells. If a row is wider than the page width, the rows are wrapped. When rows are wrapped, the header columns (determined by TableLens' getHeaderColCount() function) are always drawn at each table segment. When table is wrapped, the ReportSheet tries to fit as many table regions on a page as possible. It can be forced to print one table region per page by using TABLE_FIT_CONTENT_1PP as the table layout.

Parameters:
autosize - layout mode.

getCurrentTableLayout

public int getCurrentTableLayout()
Get the current table layout mode.

Returns:
layout mode.

setCurrentPainterLayout

public void setCurrentPainterLayout(int policy)
Set the layout policy for painter. If the layout is set to the PAINTER_NON_BREAK, the painter is always printed in one area. If the painter's preferred size is greater than the space left in the current page, the painter is printed on the top of the next page. If the layout is set to the PAINTER_BREAKABLE, the painter is printed with whatever space in the page, and may possibly span across multiple pages.

Parameters:
policy - painter layout policy.

getCurrentPainterLayout

public int getCurrentPainterLayout()
Get the current painter layout policy.

Returns:
painter layout policy.

setCurrentPainterMargin

public void setCurrentPainterMargin(Insets margin)
Set the space around the painter elements. This controls the painter, text box, and chart elements' external spacing.

Parameters:
margin - painter external space.

getCurrentPainterMargin

public Insets getCurrentPainterMargin()
Get the fixed size element external space.

Returns:
space around painter elements.

setCurrentCellPadding

public void setCurrentCellPadding(Insets padding)
Set the cell padding space around the cell contents. The default is 1 pixel on top and bottom, and 2 pixel at each side. Padding is only applied to cells where the content is presented as string text. If the content of the cell is other types, such as Image, or if the content has registered presenters, the padding is ignored. In this case the space around the cell content is controlled by the getInsets() in the TableLens only. The padding is effective after the call, and will be used by all elements added after the call upto the next call of this method.

Parameters:
padding - cell padding space.

getCurrentCellPadding

public Insets getCurrentCellPadding()
Get the current table cell padding.

Returns:
cell padding setting.

setCurrentTableWidth

public void setCurrentTableWidth(double inch)
Set the width of the table in inches. This parameter is only used if the table layout is set to TABLE_FIT_PAGE or TABLE_EQUAL_WIDTH.

Parameters:
inch - table width.

getCurrentTableWidth

public double getCurrentTableWidth()
Get the current table width setting.

Returns:
table width.

setCurrentJustify

public void setCurrentJustify(boolean justify)
If justify is set to true, text lines are fully justified.

Parameters:
justify - text justification.

isCurrentJustify

public boolean isCurrentJustify()
Check if text is justified.

Returns:
justification setting.

setCurrentTextAdvance

public void setCurrentTextAdvance(int textadv)
Set the amount to advance following each text element. The default advance is 3 pixels.

Parameters:
textadv - text element advance pixels.

getCurrentTextAdvance

public int getCurrentTextAdvance()
Get the advance of text elements.

Returns:
text advance in pixels.

setCurrentSeparatorAdvance

public void setCurrentSeparatorAdvance(int adv)
Set the amount to advance below a separator element. The default is 4 pixels.

Parameters:
adv - advance in pixels.

getCurrentSeparatorAdvance

public int getCurrentSeparatorAdvance()
Get the separator vertical trailing advance.

Returns:
advance distance in pixels.

setCurrentTableAdvance

public void setCurrentTableAdvance(int tableadv)
Set the amount to advance following each table element. The default advance is 3 pixels.

Parameters:
tableadv - table element advance pixels.

getCurrentTableAdvance

public int getCurrentTableAdvance()
Get the advance of table elements.

Returns:
table advance in pixels.

setCurrentTableOrphanControl

public void setCurrentTableOrphanControl(boolean orphan)
Set the table widow/orphan control option.

Parameters:
orphan - true to eliminate widow/orphan rows.

isCurrentTableOrphanControl

public boolean isCurrentTableOrphanControl()
Check the current widow/orphan control setting.

Returns:
widow/orphan control option.

setCurrentOrphanControl

public void setCurrentOrphanControl(boolean orphan)
Set the widow/orphan line control option.

Parameters:
orphan - true to eliminate widow/orphan lines.

isCurrentOrphanControl

public boolean isCurrentOrphanControl()
Check the current widow/orphan control setting.

Returns:
widow/orphan control option.

addPresenter

public void addPresenter(Class type,
                         Presenter p)
Register a presenter for the specified class. The presenter is used to paint the visual representation of all values of the specified type.

Parameters:
type - type of the values to present.
p - presenter object.

getPresenter

public Presenter getPresenter(Class type)
Get the presenter object registered for this class or one of it's super classes.

Parameters:
type - class to search for.
Returns:
the presenter for this object.

removePresenter

public void removePresenter(Class type)
Remove the specified presenter from the registry. Objects added before the call are not affected.

Parameters:
type - object type.

clearPresenter

public void clearPresenter()
Clear the presenter registry.


addFormat

public void addFormat(Class type,
                      Format p)
Register a format for the specified class. The format is used to convert an object to a string for all values of the specified type.

Parameters:
type - type of the values to present.
p - format object.

getFormat

public Format getFormat(Class type)
Get the format object registered for this class or one of it's super classes.

Overrides:
getFormat in class inetsoft.report.internal.StyleCore
Parameters:
type - class to search for.
Returns:
the format for this object.

removeFormat

public void removeFormat(Class type)
Remove the specified format from the registry. Objects added before the call are not affected.

Parameters:
type - object type.

clearFormat

public void clearFormat()
Clear the format registry.


setCurrentHeader

public void setCurrentHeader(int hflag)
Set the currently worked on header. All subsequent calls to addHeader???() methods will add the element to the current header. The headers can be either DEFAULT_HEADER, FIRST_PAGE_HEADER, EVEN_PAGE_HEADER, or ODD_PAGE_HEADER.

Parameters:
hflag - header flag.

setCurrentHeader

public void setCurrentHeader(String eid)
Set the currently worked on header. The new header is associated with the specified element. The header is used on all pages where this element is printed. If a page contains more than one element with associated header, the header of the last element on the page is used.

Parameters:
eid - element ID.

setCurrentFooter

public void setCurrentFooter(int hflag)
Set the currently worked on footer. All subsequent calls to addFooter???() methods will add the element to the current footer. The footers can be either DEFAULT_FOOTER, FIRST_PAGE_FOOTER, EVEN_PAGE_FOOTER, or ODD_PAGE_FOOTER.

Parameters:
hflag - footer flag.

setCurrentFooter

public void setCurrentFooter(String eid)
Set the currently worked on footer. The new footer is associated with the specified element. The footer is used on all pages where this element is printed. If a page contains more than one element with associated footer, the footer of the last element on the page is used.

Parameters:
eid - element ID.

addHeaderObject

public String addHeaderObject(Object obj)
Add an object to the document header. First the ReportSheet checks if a presenter is register for this type of object. If there is a presenter, a PresenterPainter is created to paint the object using the presenter.

If there is no presenter registered at the document for this type of object, the ReportSheet then check if a Format is register for this class. If there is a Format, it's used to format the object into string and treated as a regular text.

If there is no format registered for this object type, the object is converted to a string (toString()). The string is process in the same way as the addHeaderText() string.

Parameters:
obj - object value.
Returns:
element id.

addHeaderText

public String addHeaderText(String text)
Add a text string to the document header. The header string could be a plain text string, or a text format string similar to the format used by the java.text.MessageFormat class. If a plain string is used, it's printed as the header. Variables can be inserted into the string to construct a message format. The following variables are supported:

Parameters:
text - text string.
Returns:
element id.

addHeaderText

public String addHeaderText(TextLens text)
Add a text element to the document header. The contents of the TextLens is processed in the same way as the addHeaderText(String) parameter.

Parameters:
text - text content lens.
Returns:
element id.

addHeaderTextBox

public String addHeaderTextBox(TextLens text)
Add a text box to the document header. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well. The text is not translated as the plain text elements.

Parameters:
text - text content.
Returns:
element id.

addHeaderTextBox

public String addHeaderTextBox(TextLens text,
                               int border,
                               double winch,
                               double hinch,
                               int talign)
Add a text box to the document header. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well. The text is not translated as the plain text elements.

Parameters:
text - text content.
border - border line style. One of the line styles defined in the StyleConstants class.
winch - area width in inches.
hinch - area height in inches.
talign - text alignment
Returns:
element id.

addHeaderPainter

public String addHeaderPainter(Painter area)
Add a pinter element to the document header. A painter is a self contained object that can paint a document area. It can be used to add any content to the document, through which the program has full control on exact presentation on the document. Painter is the general mechanism used to support some of the more common data types. For example, Component and Image are handled internally by a painter object. The program is free to define its own painter.

Parameters:
area - the painter element.
Returns:
element id.

addHeaderPainter

public String addHeaderPainter(Painter area,
                               double winch,
                               double hinch)
This is same as addHeaderPainter() exception an explicit size of the painter area is specified. The specified size (in inches) is the preferred size of this painter on paper, where as the preferred size of the Painter object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The image is scaled from the pixel size (returned by Painter.getPreferredSize) to the area defined.

Parameters:
area - the painter element.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addHeaderImage

public String addHeaderImage(Image image)
Add an image to the document header.

Parameters:
image - image object.
Returns:
element id.

addHeaderImage

public String addHeaderImage(Image image,
                             double winch,
                             double hinch)
This is same as addHeaderImage() exception an explicit size of the painter area is specified. The specified size (in inches) is the preferred size of this painter on paper, where as the preferred size of the Painter object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The image is scaled from the pixel size (returned by Painter.getPreferredSize) to the area defined.

Parameters:
image - image to paint.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addHeaderImage

public String addHeaderImage(URL image)
Add an image to the document header.

Parameters:
image - image URL.
Returns:
element id.

addHeaderSpace

public String addHeaderSpace(int pixels)
Add horizontal space to the document header. The space is added after the current element.

Parameters:
pixels - space in pixels.
Returns:
element id.

addHeaderNewline

public String addHeaderNewline(int n)
Add one or more newline to the document header.

Parameters:
n - number of newline.
Returns:
element id.

addHeaderBreak

public String addHeaderBreak()
Add a break to the document header.

Returns:
element id.

addHeaderSeparator

public String addHeaderSeparator(int style)
Add a separator to header. A separator is a horizontal line in either 3D or plain mode.

Parameters:
style - the line style (defined in StyleConstants).
Returns:
element id.

addHeaderTab

public String addHeaderTab(int fill)
Add a tab. The fill specifies a line style to fill the tab space.

Parameters:
fill - a line style defined in StyleConstants.
Returns:
element id.

addHeaderRightTab

public String addHeaderRightTab()
Add a right aligned tab. A right aligned tab causes the text preceding the tab to be right aligned at the next tab stop.

Returns:
element id.

addHeaderTable

public String addHeaderTable(TableLens table)
Add a table to the document header. Because the header contents do not wrap, make sure the table is fairly small and fits into one header area.

Parameters:
table - table lens.
Returns:
element id.

addHeaderSection

public String addHeaderSection(SectionLens section)
Add a section element to the document header. A section contains fixed positioned elements that are printed relative to the frame position.

Parameters:
section - section lens.
Returns:
element id.

addHeaderSection

public String addHeaderSection(SectionLens section,
                               TableLens table)
Add a section element to the document header. A table is bound to the section. The table header is used to populate the section header element values. The table rows are used to populate the section content element values. The section content band is repeated for each row in the table.

Parameters:
section - section lens.
table - table lens.
Returns:
element id.

addFooterObject

public String addFooterObject(Object obj)
Add an object to the document footer. First the ReportSheet checks if a presenter is register for this type of object. If there is a presenter, a PresenterPainter is created to paint the object using the presenter.

If there is no presenter registered at the document for this type of object, the ReportSheet then check if a Format is register for this class. If there is a Format, it's used to format the object into string and treated as a regular text.

If there is no format registered for this object type, the object is converted to a string (toString()). The string is process in the same way as the addFooterText() string.

Parameters:
obj - object value.
Returns:
element id.

addFooterText

public String addFooterText(String text)
Add a text string to the document footer. The footer string could be a plain text string, or a text format string similar to the format used by the java.text.MessageFormat class. If a plain string is used, it's printed as the footer. Variables can be inserted into the string to construct a message format. The following variables are supported:

Parameters:
text - text string.
Returns:
element id.

addFooterText

public String addFooterText(TextLens text)
Add a text element to the document footer. The contents of the TextLens is processed in the same way as the addFooterText(String) parameter.

Parameters:
text - text content lens.
Returns:
element id.

addFooterTextBox

public String addFooterTextBox(TextLens text)
Add a text box to the document footer. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well. The text is not translated as the plain text elements.

Parameters:
text - text content.
Returns:
element id.

addFooterTextBox

public String addFooterTextBox(TextLens text,
                               int border,
                               double winch,
                               double hinch,
                               int talign)
Add a text box to the document footer. A text box is a standalone area on the document that contains a text string. It has a border around by default. The text box element is similar to the painter elements in that they both use the painter layout and wrapping options. The current setting of the painter layout and wrapping are used by the text box elements as well. The text is not translated as the plain text elements.

Parameters:
text - text content.
border - border line style. One of the line styles defined in the StyleConstants class.
winch - area width in inches.
hinch - area height in inches.
talign - text alignment.
Returns:
element id.

addFooterPainter

public String addFooterPainter(Painter area)
Add a pinter element to the document footer. A painter is a self contained object that can paint a document area. It can be used to add any content to the document, through which the program has full control on exact presentation on the document. Painter is the general mechanism used to support some of the more common data types. For example, Component and Image are handled internally by a painter object. The program is free to define its own painter.

Parameters:
area - the painter element.
Returns:
element id.

addFooterPainter

public String addFooterPainter(Painter area,
                               double winch,
                               double hinch)
This is same as addFooterPainter() exception an explicit size of the painter area is specified. The specified size (in inches) is the preferred size of this painter on paper, where as the preferred size of the Painter object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The image is scaled from the pixel size (returned by Painter.getPreferredSize) to the area defined.

Parameters:
area - the painter element.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addFooterImage

public String addFooterImage(Image image)
Add an image to the document footer.

Parameters:
image - image object.
Returns:
element id.

addFooterImage

public String addFooterImage(Image image,
                             double winch,
                             double hinch)
This is same as addFooterImage() exception an explicit size of the painter area is specified. The specified size (in inches) is the preferred size of this painter on paper, where as the preferred size of the Painter object is treated as the preferred pixels of the area. The pixels in the specified area may be different depending on the resolution of the output media. The image is scaled from the pixel size (returned by Painter.getPreferredSize) to the area defined.

Parameters:
image - image to paint.
winch - area width in inches.
hinch - area height in inches.
Returns:
element id.

addFooterImage

public String addFooterImage(URL image)
Add an image to the document footer.

Parameters:
image - image URL.
Returns:
element id.

addFooterSpace

public String addFooterSpace(int pixels)
Add horizontal space to the document footer. The space is added after the current element.

Parameters:
pixels - space in pixels.
Returns:
element id.

addFooterNewline

public String addFooterNewline(int n)
Add one or more newline to the document footer.

Parameters:
n - number of newline.
Returns:
element id.

addFooterBreak

public String addFooterBreak()
Add a break to the document footer.

Returns:
element id.

addFooterSeparator

public String addFooterSeparator(int style)
Add a separator to footer. A separator is a horizontal line in either 3D or plain mode.

Parameters:
style - the line style (defined in StyleConstants).
Returns:
element id.

addFooterTab

public String addFooterTab(int fill)
Add a tab. The fill specifies a line style to fill the tab space.

Parameters:
fill - a line style defined in StyleConstants.
Returns:
element id.

addFooterRightTab

public String addFooterRightTab()
Add a right aligned tab. A right aligned tab causes the text preceding the tab to be right aligned at the next tab stop.

Returns:
element id.

addFooterTable

public String addFooterTable(TableLens table)
Add a table to the document footer. Because the footer contents do not wrap, make sure the table is fairly small and fits into one footer area.

Parameters:
table - table lens.
Returns:
element id.

addFooterSection

public String addFooterSection(SectionLens section)
Add a section element to the document footer. A section contains fixed positioned elements that are printed relative to the frame position.

Parameters:
section - section lens.
Returns:
element id.

addFooterSection

public String addFooterSection(SectionLens section,
                               TableLens table)
Add a section element to the document footer. A table is bound to the section. The table header is used to populate the section header element values. The table rows are used to populate the section content element values. The section content band is repeated for each row in the table.

Parameters:
section - section lens.
table - table lens.
Returns:
element id.

getElement

public ReportElement getElement(String id)
Find the index of the specified element. An element is identified by an unique ID. Null IDs are ignored.

Parameters:
id - element ID.
Returns:
element object or null if not found.

addHeaderElement

public String addHeaderElement(ReportElement e)
Add an element to the document header. Classes extending the ReportSheet can extend element classes from the Element, and use this method for adding the element to the document.

Parameters:
e - document element.
Returns:
element id.

getHeaderElementCount

public int getHeaderElementCount()
Return the number of elements in the document header.

Returns:
number of elements.

getAllHeaderElementCount

public int getAllHeaderElementCount()
Return the number of the elements in the document header, include the elements in a section which in the document header.

Returns:
number of elements.

getHeaderElement

public ReportElement getHeaderElement(int idx)
Get the specified element in the header.

Parameters:
idx - element index.
Returns:
document header element.

getHeaderElementIndex

public int getHeaderElementIndex(ReportElement e)
Get the index of the specified element.

Parameters:
e - element.
Returns:
element index.

removeHeaderElement

public void removeHeaderElement(int idx)
Remove the specified element.

Parameters:
idx - element index.

replaceHeaderElement

public void replaceHeaderElement(int idx,
                                 ReportElement e)
Replace the specified element.

Parameters:
idx - element index.

insertHeaderElement

public void insertHeaderElement(int idx,
                                ReportElement e)
Insert the element at specified position (before).

Parameters:
idx - position to insert.
e - element.

addFooterElement

public String addFooterElement(ReportElement e)
Add an element to the document footer. Classes extending the ReportSheet can extend element classes from the Element, and use this method for adding the element to the document.

Parameters:
e - document element.
Returns:
element id.

getFooterElementCount

public int getFooterElementCount()
Return the number of elements in the document footer.

Returns:
number of elements.

getAllFooterElementCount

public int getAllFooterElementCount()
Return the number of the elements in the document footer, include the elements in a section which in the document footer.

Returns:
number of elements.

getFooterElement

public ReportElement getFooterElement(int idx)
Get the specified element in the footer.

Parameters:
idx - element index.
Returns:
document footer element.

getFooterElementIndex

public int getFooterElementIndex(ReportElement e)
Get the index of the specified element.

Parameters:
e - element.
Returns:
element index.

removeFooterElement

public void removeFooterElement(int idx)
Remove the specified element.

Parameters:
idx - element index.

replaceFooterElement

public void replaceFooterElement(int idx,
                                 ReportElement e)
Replace the specified element.

Parameters:
idx - element index.

insertFooterElement

public void insertFooterElement(int idx,
                                ReportElement e)
Insert the element at specified position (before).

Parameters:
idx - position to insert.
e - element.

moveHeaderFooterElement

protected void moveHeaderFooterElement(ReportElement elem,
                                       int direction)
Move header or footer element up or down.

Parameters:
elem - the element.
direction - the moving direction. ReportSheet.UP or ReportSheet.DOWN.

removeHeaderFooterElement

protected void removeHeaderFooterElement(ReportElement elem)
Remove the specified header or footer element.

Parameters:
elem - the element being removed.

removeElementHeaderFooter

protected void removeElementHeaderFooter(String id)
Remove specified element from element header/footer list.

Parameters:
id -

replaceHeaderFooterElement

protected void replaceHeaderFooterElement(ReportElement elem,
                                          ReportElement nelem)
Replace the specified header or footer element.

Parameters:
elem - the element being removed.

getElements

public Vector getElements(int type)
Get the elements of the specified type. The type is one of the header or footer types, or zero for the body.

Parameters:
type - element type.
Returns:
elements of specified type.

getMaxPages

public int getMaxPages()
Get the max pages.

Returns:
the max pages of this report sheet.

getMaxPages

public int getMaxPages(boolean isUsedGlobal)
Get the max pages.

Parameters:
isUsedGlobal - get global max pages if max pages is undefine.
Returns:
the max pages of this report sheet.

setMaxPages

public void setMaxPages(int pages)
Set the max pages.

Parameters:
pages - the specified max pages.

print

public void print()
           throws Exception
Print this report with the PrintJob.

Throws:
Exception

print

public void print(PrintJob job)
Print this document to the printer. The PrintJob is obtained from the AWT Toolkit.

Parameters:
job - print job to print document to.

setElement

public void setElement(String id,
                       Object data)
                throws NoSuchElementException,
                       IllegalArgumentException
This method can be used the set the data source/content of elements already in the report. Elements are identified with an unique ID. It's the report creator's responsibility to make sure the IDs are unique and the name exists (IDs are normally assigned in the Report Designer GUI dialogs).

The acceptable type of data depends on the type of the element identified by the ID. The following table lists the element type and data types.

TableTableLens, Object[][]
SectionTableLens, Object[][]
FormFormLens
ChartChartLens, TableLens
Text, TextBoxString, TextLens, Object
Painter (or Image, Component)Image, Component, Painter
CompositeElementContainer
ButtonString
CheckBoxString
ChoiceObject or Object[]
TextFieldString
TextAreaString

If an element is not found for the specified ID, a NoSuchElementException if thrown. If the data type does not match the element type, an IllegalArgumentException is thrown.

Parameters:
id - element ID.
data - element content/data source.
Throws:
NoSuchElementException
IllegalArgumentException

replaceElement

protected abstract void replaceElement(String id,
                                       ReportElement elem)
replace a element.


mergeInto

public void mergeInto(String id,
                      TableLens table)
               throws NoSuchElementException,
                      IllegalArgumentException
Merge a table into an existing table element. The combined table has a size equal to the maximum number of rows or columns of the two table. If a cell in the supplied table is not null or blank, it is always used in the result table. Otherwise, the existing values are preserved.

Only table data is merged. All cell attributes are ignored. This is primarily used by a program to supply data to a table on a template that has static header and attributes entered using the designer.

Parameters:
id - element ID.
table - data table.
Throws:
NoSuchElementException
IllegalArgumentException

getTableStyle

public inetsoft.report.style.TableStyle getTableStyle(String id)
Get the table style object for the specified table. If the element does not exist, or the element with the ID is not a table, a NoSuchElementException is thrown. The table style report is the table style defined in the template. If no table style is defined in the template, it returns null.

Parameters:
id - table element ID.

setTableStyle

public void setTableStyle(String id,
                          inetsoft.report.style.TableStyle style)
Set the table style object for the specified table. If the element does not exist, or the element with the ID is not a table, a NoSuchElementException is thrown. The supplied table style overrides the table style defined in the template.

Parameters:
id - table element ID.
style - new table style.

getTable

public TableLens getTable(String id)
Get the table lens object for the specified table. If the element does not exist, or the element with the ID is not a table, a NoSuchElementException is thrown.

Parameters:
id - table element ID.
Returns:
table lens object.

getDataSet

public DataSet getDataSet(String id)
Get the chart of the specified chart element. The ID must refer to an unique chart element created from a report template. If the chart element is defined in a report template, the chart data returned by this method is an Dataset, can be used to set various chart attributes using the AttributeDataSet API.

Parameters:
id - chart element ID.
Returns:
chart data set.

getForm

public FormLens getForm(String id)
Get the form lens of the specified form element. The ID must refer to an unique chart element created from a report template. If the form element is defined in a report template, it returns a form attribute lens, which can be used to change the form attributes.

Parameters:
id - form element ID.
Returns:
form attribute lens.

getText

public String getText(String id)
Get the text contents of a text or text box element.

Parameters:
id - element ID.
Returns:
element contents.

addPresenter

public void addPresenter(String id,
                         Class type,
                         Presenter presenter)
Add a presenter to a table element. If the element does not exist, or the element with the ID is not a table, a NoSuchElementException is thrown.

Parameters:
id - table element ID.
type - data type.
presenter - presenter for the data type.

addFormat

public void addFormat(String id,
                      Class type,
                      Format format)
Add a format to a table element. If the element does not exist, or the element with the ID is not a table, a NoSuchElementException is thrown.

Parameters:
id - table element ID.
type - data type.
format - format for the data type.

setDirectory

public void setDirectory(String dir)
Set the directory where this template is saved. This affects the relative path of images. It serves as the current directory when resolving a relative file path.

Parameters:
dir - directory full path.

getDirectory

public String getDirectory()
Get the current directory of this report.


printNext

public abstract boolean printNext(StylePage pg)
Print one page. Return true if more contents need to be printed. Normally print(PrintJob) should be used for printing. This function is used by print() to print individual pages.

A StylePage contains information on how to print a particular page. Its print() method can be used to perform the actual printing of the page contents to a printer graphics.

Parameters:
pg - style page.

printNextPage

public abstract boolean printNextPage(StylePage pg)
Print the next page. It may be called to print from a middle of of page provided the printBox is setup correctly before the call. For regular printing, printNext() should be used.


getNextOrientation

public Integer getNextOrientation()
Get the page orientation for the next page. The page orientation can be changed in middle of a report by setting it in PageLayout for StyleSheet, or setting the row orientation in a TabularSheet.

Returns:
the next page orientation. Null if using default orientation.

printNextArea

public boolean printNextArea(StylePage pg,
                             Vector elements,
                             boolean flow)
Print the next page area. The area is pointed by printBox. The printHead pointer is NOT reset in this method. It should point to the point where the printing should start.

Specified by:
printNextArea in class inetsoft.report.internal.StyleCore
Parameters:
pg - page to print.
flow - true to flow the next page if full.
Returns:
true if more to print.

printNextLine

protected boolean printNextLine(StylePage pg,
                                Vector elements,
                                boolean flow)
Print the next line or next block element.

Parameters:
flow - true to flow the next page if full.
Returns:
true if more to print and end of area is reached.

setParameterSheet

public void setParameterSheet(ParameterSheet paraSheet)
Set the embeded paramter sheet.

Overrides:
setParameterSheet in class inetsoft.report.internal.StyleCore

printHeaderFooter

protected void printHeaderFooter(StylePage pg)
Print the header and footer of the page. The header and footer are printed in printNext(). This method does not need to be called by users.

Parameters:
pg - a style page.

printNonFlowAreas

protected void printNonFlowAreas(StylePage pg,
                                 PageArea[] areas,
                                 boolean first)
Print the content of non-flow areas and area borders.

Parameters:
first - true if the page area is printed at first time

addExecuteListener

public void addExecuteListener(ExecuteListener listener)
Add an execute listener. The listener is invoked when a report is processed using XSessionManager.execute(). The execute listener can contain programmatic queries. It can be used to mix visual query and programmatic query in one report.


removeExecuteListener

public void removeExecuteListener(ExecuteListener listener)
Remove an execute listener.


getExecuteListeners

public Enumeration getExecuteListeners()
Get all registered execute listeners.


removeExecuteListeners

public void removeExecuteListeners()
Remove all the execute listeners.


fireExecuteEvent

public void fireExecuteEvent(ExecuteEvent event)
Fire an execute event.


addPageBreakListener

public void addPageBreakListener(PageBreakListener l)
Add a pagebreak listener. The listener is notified at end of each page.


removePageBreakListener

public void removePageBreakListener(PageBreakListener l)
Remove a pagebreak listener.


getOnPageBreak

public String getOnPageBreak()
Get the page break Javascript handler.


setOnPageBreak

public void setOnPageBreak(String cmd)
Set the page break Javascript handler. This must be a valid Javascript script. The script is executed at the end of every page.


getOnPrint

public String getOnPrint()
Get the onPrint script handler.

Returns:
on print script handler.

setOnPrint

public void setOnPrint(String cmd)
Set the onPrint script handler. The script is executed when print or export the report.


getOnLoad

public String getOnLoad()
Get the report creation Javascript handler.


setOnLoad

public void setOnLoad(String cmd)
Set the creation Javascript handler. This must be a valid Javascript script. The script is executed at the start of report generation.


getOnInit

public String getOnInit()
Get the report initialization Javascript handler.


setOnInit

public void setOnInit(String cmd)
Set the initialization Javascript handler. This script is executed once per report before the report parameters and page generation are processed. This script is not executed again on subsequent prints.


firePageBreakEvent

public void firePageBreakEvent(StylePage pg,
                               boolean more)
Fire a pagebreak event.


removeContents

protected abstract void removeContents()
Remove all elements from the contents area.


removeElement

public abstract void removeElement(String id)
Remove the specified element.

Parameters:
id - element id in string format.

moveElement

public abstract void moveElement(String id,
                                 int direction)
Move element up or down.

Parameters:
id - element id in string format.
direction - move direction, can be one of ReportSheet.UP or ReportSheet.DOWN.

clear

public void clear()
Remove all report elements.


resetContents

protected abstract void resetContents()
Reset all elemnts in the contents.


reset

public void reset()
Reset the printing. If there is a partially printed job, the rest of the contents are ignored. The next printNext starts from first page.

Overrides:
reset in class inetsoft.report.internal.StyleCore

resetPageNumbering

public void resetPageNumbering()
Reset the page numbering so the numbering and count starts from beginning. This method could be called to create multiple sub-documents in one report.


setVisible

public void setVisible(String id,
                       boolean vis)
Set the visibility of an element.

Parameters:
id - element id.
vis - true to show element and false to hide it.

getProperty

public String getProperty(String name)
Get a property value.

Parameters:
name - property name.
Returns:
property value.

setProperty

public void setProperty(String name,
                        String val)
Set a property. Properties are attributes in a report template that can be used to store any arbitrary information. It is often used by visual designers for configuration information. The properties may serve as hints on how report is presented at runtime. The currently recognized runtime properties are:

 report.title
 report.subject
 report.author
 report.keywords
 report.comments
 report.created
 report.modified
 date.format
 time.format
 date.time.format
 

Parameters:
name - property name.
val - property value.

refreshFormats

public void refreshFormats()
Refresh all formats. Get date/time format patterns from the report property or the report env, create a format with locale and then set to the format map. If the locale is changed, it should refresh all formats.

Overrides:
refreshFormats in class inetsoft.report.internal.StyleCore

getPageSize

public Size getPageSize()
Get the page size of current report. If the report is not a top level report such as a bean sheet or sub report sit in another report sheet. Use the parent sheet's page size instead.

Returns:
report page size.

setPageSize

public void setPageSize(Size size)
Set the report page size.

Parameters:
size - page size in inches.

getOrientation

public int getOrientation()
Get the orientation of current report. If the report is not a top level report such as a bean sheet or sub report sit in another report sheet. Use the parent sheet's orientation instead.


setOrientation

public void setOrientation(int orient)
Set the orientation of the report page.


isLandscape

public boolean isLandscape()
Check if the page of this report is set to landscape.

Returns:
true if is landscape.

keepWithNext

public void keepWithNext(StylePage pg,
                         int ocurrent,
                         Vector elements)
Handle keep with next. The current printing index is adjusted if if the keepWithNext causes elements to be moved to the next page.

Parameters:
pg - the page that is printed.
ocurrent - element index before cell is printed.
elements - the list of elements used to print the page.

setPrinterMargin

public static void setPrinterMargin(Margin pmargin)
This method is provided to work around the jdk 1.1 win32 bug. The PrintJob on win32 does not adjust the origin with the printer margin, resulting printout being shifted to the right. We assume a 0.25 inch margin if application is running on win32 with jdk1.1.6 and earlier (the bug should be fixed in jdk1.1.7). However, if a printer is set to another margin value, this method must be explicitly called to change it. Since this method will not be needed once the bug is fixed in jdk, it will become obsolete in the future. Since 0.25inch is the default printer margin on most printers, this method should not need to be called in most cases.

Since the same bug reappeared in jdk1.2 after being fixed in jdk1.1.7, it is reactivated and will probably be needed (unfortunately) much longer than its original anticipated usage.


getPrinterMargin

public static Margin getPrinterMargin()
Get the current printer margin. See setPrinterMargin().


getVersion

public String getVersion()
Get the Style Report version. The version is in dot separated format, e.g. 1.3.1.

Returns:
Style Report version.

setVersion

public void setVersion(String version)
Set the Style Report version.


setCSSLocation

public void setCSSLocation(String cssLoc)
Set the location of a css style sheet to be applied to the report.

Parameters:
cssLoc - a url, a resource path or a file path.

getCSSLocation

public String getCSSLocation()
Get the location of the css style sheet used by this report.


isFromMetaTemplate

public boolean isFromMetaTemplate()
Check if the report is created from a meta template.


getMetaTemplate

public String getMetaTemplate()
Get the meta template name.


setMetaTemplate

public void setMetaTemplate(String meta)
Set the meta template name.


getContextName

public String getContextName()
Get the context name.


setContextName

public void setContextName(String name)
Set the context name.


clone

public Object clone()
Make a copy of this report.

Overrides:
clone in class inetsoft.report.internal.StyleCore

clone

public Object clone(boolean deep)
Make a copy of this report.


copyReportSheet

protected void copyReportSheet(ReportSheet report,
                               boolean flag)
Copy report sheet to report

Parameters:
report - the report copied to.
flag - if true flag all copied elements as from template.

copyReportSheet

protected void copyReportSheet(ReportSheet report,
                               boolean flag,
                               boolean deep)
Copy report sheet to report

Parameters:
report - the report copied to.
flag - if true flag all copied elements as from template.

setParentReport

public void setParentReport(ReportSheet preport)
Set parent report.


getParentReport

public ReportSheet getParentReport()
Get parent report.


isSinglePageForTopReport

public boolean isSinglePageForTopReport()
Check the top report is single page report or not.


isExportSinglePage

public boolean isExportSinglePage()
Check the top report is export in single page or not.


getSharedFilter

public SharedFilter getSharedFilter()
Gets the shared filter mappings defined for this report.

Returns:
the shared filter.

setSharedFilter

public void setSharedFilter(SharedFilter sharedFilter)
Sets the shared filter mappings defined for this report.

Parameters:
sharedFilter - the shared filter.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.