|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.RDC
public class RDC
This is the main class of the Runtime Designer Component of i-net Clear Reports. Use this
class to create a new, empty Engine (report).
RDC submits you to create a new report at runtime, to format a
report at runtime, bind fields at runtime, set the datasource at runtime, ... .
Further on you can use RDC
with an existing report file. Therefore create a new Engine in combination with the method setReportFile in
Engine.
In both cases (createEmptyEngine and new Engine() followed by setReportFile()) you can get and set the
areas, fields and datasources with the resulting Engine.
You can save your newly created or your changes on
existing report design as XML file and load them.
You can find a lot of samples in directory rdc of the sample directory.
Engine,
Area,
Section,
FieldElement,
DatabasePicture,
Box,
CrossTab,
CrossTabCell,
CrossTabColumn,
CrossTabRow,
Chart2,
Line,
Picture,
Subreport,
Text,
Paragraph,
TextPart,
FieldPart,
Element,
Field,
DatabaseField,
DatabaseField,
FormulaField,
PromptField,
SpecialField,
GroupField,
SummaryField,
SQLField,
SortField,
Serialized Form| Field Summary | |
|---|---|
static int |
COLOR_AQUA
ABGR Color constant for 'aqua color'. |
static int |
COLOR_BLACK
ABGR Color constant for 'black color'. |
static int |
COLOR_BLUE
ABGR Color constant for 'blue color'. |
static int |
COLOR_BROWN
ABGR Color constant for 'brown color'. |
static int |
COLOR_FUCHSIA
ABGR Color constant for 'fuchsia color'. |
static int |
COLOR_GRAY
ABGR Color constant for 'gray color'. |
static int |
COLOR_GREEN
ABGR Color constant for 'green color'. |
static int |
COLOR_LIME
ABGR Color constant for 'lime color'. |
static int |
COLOR_MAROON
ABGR Color constant for 'maroon color'. |
static int |
COLOR_NAVY
ABGR Color constant for 'navy color'. |
static int |
COLOR_NO_COLOR
ABGR Color constant for 'no color'. |
static int |
COLOR_OLIVE
ABGR Color constant for 'olive color'. |
static int |
COLOR_PINK
ABGR Color constant for 'pink color'. |
static int |
COLOR_PURPLE
ABGR Color constant for 'purple color'. |
static int |
COLOR_RED
ABGR Color constant for 'red color'. |
static int |
COLOR_SILVER
ABGR Color constant for 'silver color'. |
static int |
COLOR_TEAL
ABGR Color constant for 'teal color'. |
static int |
COLOR_WHITE
ABGR Color constant for 'white color'. |
static int |
COLOR_YELLOW
ABGR Color constant for 'yellow color'. |
| Method Summary | |
|---|---|
static Engine |
createEmptyEngine()
Creates a new empty Engine with a report and initialises new Areas (RH, PH, D, PF, RF) and new Sections (RH, PH,
D, PF, RF). |
static Engine |
createEmptyEngine(java.lang.String export_fmt)
Creates a new empty export Engine with a report and initialises new Areas (RH, PH, D, PF, RF)
and new Sections (RH, PH, D, PF, RF) and set the export format. |
static Engine |
createMailingLabel(Engine eng,
int labelWidth,
int labelHeight,
int labelHorizontalDistance,
int labelVerticalDistance,
boolean acrossThenDown,
java.util.Vector fields)
After creating a new Engine and setting a database connection you can use this method to create a report for mailing labels, where you have to specify the height and width for one label and the distance between labels (horizontal and vertical). |
static CertificateInfoFactory |
getCertificateFactory()
Returns the certificate factory that is used to sign PDF documents created with i-net Clear Reports. |
static Engine |
loadEngine(java.io.File file)
Reads the specified report template into a newly created Engine and returns this engine. |
static Engine |
loadEngine(java.net.URL reportURL,
java.io.InputStream in,
java.lang.String exportFormat,
java.util.Properties props)
Reads an engine from the input stream into a newly created Engine with the given export format. |
static Engine |
loadEngine(java.io.File file,
java.lang.String export_fmt)
Reads the specified report template into a newly created Engine with the given export format and returns this engine. |
static Engine |
loadEngine(java.io.File file,
java.io.BufferedReader in)
Deprecated. As of i-net Crystal-Clear 9, loadEngine(URL, InputStream, String, Properties) should be used instead. |
static Engine |
loadEngine(java.io.File file,
java.io.BufferedReader in,
java.util.Properties props)
Deprecated. As of i-net Crystal-Clear 9, loadEngine(URL, InputStream, String, Properties) should be used instead. |
static Engine |
loadEngine(java.io.File file,
java.io.BufferedReader in,
java.lang.String export_fmt)
Deprecated. As of i-net Crystal-Clear 9, loadEngine(URL, InputStream, String, Properties) should be used instead. |
static Engine |
loadEngineFromDir(java.io.File dir)
Deprecated. As of i-net Crystal-Clear 10.0, replaced by loadEngine(File) |
static void |
saveEngine(java.io.File file,
Engine engine)
Saves an Engine as report template into a file. |
static void |
saveEngine(java.io.OutputStream out,
Engine engine)
Saves an Engine as report template into an output stream. |
static void |
saveEngineToDir(java.io.File dir,
Engine engine)
Saves an Engine as report template into a directory. |
static void |
setCertificateInfoFactory(CertificateInfoFactory factory)
Sets the certificate factory that is used to sign PDF documents created with i-net Clear Reports. |
static int |
toCcColor(java.awt.Color color)
Returns the ABGR value representing the color (i.e. 0x000000FF for red). |
static java.awt.Color |
toJavaColor(int abgr)
Converts the ABGR color value (i.e. 0x000000FF for red) into a Java Color object. |
| Field Detail |
|---|
public static final int COLOR_AQUA
public static final int COLOR_BLACK
public static final int COLOR_BLUE
public static final int COLOR_FUCHSIA
public static final int COLOR_GRAY
public static final int COLOR_GREEN
public static final int COLOR_LIME
public static final int COLOR_MAROON
public static final int COLOR_NAVY
public static final int COLOR_NO_COLOR
public static final int COLOR_OLIVE
public static final int COLOR_PURPLE
public static final int COLOR_RED
public static final int COLOR_SILVER
public static final int COLOR_TEAL
public static final int COLOR_WHITE
public static final int COLOR_YELLOW
public static final int COLOR_PINK
public static final int COLOR_BROWN
| Method Detail |
|---|
public static Engine createMailingLabel(Engine eng,
int labelWidth,
int labelHeight,
int labelHorizontalDistance,
int labelVerticalDistance,
boolean acrossThenDown,
java.util.Vector fields)
throws ReportException
eng - The Engine that should be filled with mailing labelslabelWidth - - the width of one single labellabelHeight - - the height of one single labellabelHorizontalDistance - - the horizontal distance between two labelslabelVerticalDistance - - the vertical distance between two labelsacrossThenDown - - true if labels should be printed across page first, else if labels
should printed down page first set to falsefields - - a vector containing references to all fields that should be used in each label.
The height of each field in label depends on labelheight and count of fields in
label.
ReportException - If an error occurs while trying to create areas and fields on the passed enginepublic static Engine createEmptyEngine()
Engine with a report and initialises new Areas (RH, PH, D, PF, RF) and new Sections (RH, PH,
D, PF, RF). This returns the standard Engine for the java viewer.
Engine,
Area,
Sectionpublic static Engine createEmptyEngine(java.lang.String export_fmt)
Engine with a report and initialises new Areas (RH, PH, D, PF, RF)
and new Sections (RH, PH, D, PF, RF) and set the export format.
export_fmt - The export format. The following values are valid:Engine.NO_EXPORT,
Engine.EXPORT_PDF,
Engine.EXPORT_PS,
Engine.EXPORT_PS2,
Engine.EXPORT_PS3,
Engine.EXPORT_RTF,
Engine.EXPORT_XLS,
Engine.EXPORT_XML,
Engine.EXPORT_TXT,
Engine.EXPORT_HTML,
Engine.EXPORT_CSV,
Engine.EXPORT_DATA,
Engine.EXPORT_SVG,
Engine,
Area,
Section
public static void saveEngine(java.io.File file,
Engine engine)
throws ReportException
Engine as report template into a file. It must have been loaded from
an xml or rpt file previously or initialized using RDC or Engine.setReportFile(String). The file parameter specifies the
file in that the report template will be stored.Engine.execute().DatabaseTables.setSavePassword(boolean).
file - The file to save the report to. If it is a directory then it will be saved as directory.engine - The Engine which should be saved as a report template file.
ReportException - If there are problems while saving the engine, for example, if the engine
has already been executed.
public static void saveEngineToDir(java.io.File dir,
Engine engine)
throws ReportException
Engine as report template into a directory. It must have been loaded from
an xml or rpt file previously or initialized using RDC or Engine.setReportFile(String). The dir parameter specifies the
directory the report template will be stored. If dir does not exists, it will be created.Engine.execute().DatabaseTables.setSavePassword(boolean).
dir - The direcotry file to save the report to.engine - The Engine which should be saved as a report template file.
ReportException - If there are problems while saving the engine, for example, if the engine
has already been executed.
public static void saveEngine(java.io.OutputStream out,
Engine engine)
throws ReportException,
java.io.IOException
Engine as report template into an output stream.
The out parameter specifies the stream the report template should be stored into.Engine.execute().
DatabaseTables.setSavePassword(boolean).
out - The output stream to save the report template.engine - The Engine which should be saved as a report template.
ReportException - If there are problems while saving the engine, for example, if the engine has already been executed.
java.io.IOException - if there are problems writing to the stream
public static Engine loadEngine(java.io.File file)
throws ReportException
Engine and returns this engine.file parameter specifies the file or directory pathname from that the report template will be loaded.Engine.getLoadExceptions() to get all errors.Engine.setReportFile(String) instead. This method will detect the file format automatically.
file - The report template file or directory pathname that should be loaded into a new engine.
Engine, initialized with the report template from file.
ReportException - If the provided report template is a binary report template (e.g. from Crystal Reports) or another error occurred during loading the report.Engine.setReportFile(String),
saveEngine(File, Engine)
@Deprecated
public static Engine loadEngineFromDir(java.io.File dir)
throws java.io.IOException,
ReportException
loadEngine(File)
Engine and returns it.dir parameter specifies the directory pathname from that the report template will be loaded.Engine.getLoadExceptions() to get all errors.Engine.setReportFile(String) instead. This method will detect the file format automatically.
dir - The directory containing report template files that should be loaded into a new engine.
Engine, initialized with the template files from dir.
java.lang.IllegalArgumentException - If dir is null or not a directory file
ReportException - If any error occurred during loading the report.
java.io.IOException - Signals that an I/O exception has occurred.Engine.setReportFile(String),
saveEngineToDir(File, Engine)
public static Engine loadEngine(java.net.URL reportURL,
java.io.InputStream in,
java.lang.String exportFormat,
java.util.Properties props)
throws ReportException,
java.io.IOException
reportURL - URL to set as the engine's URL. See Engine.setReportFile(URL). May be null, in which case "file://" is set as the report's URL.in - Reader to read data fromexportFormat - The output format as string, must be one of the Engine "EXPORT" constants, e.g. Engine#NO_EXPORT for Java viewerprops - Properties such as export_fmt or prompts
ReportException - if there are issues with the engine
java.io.IOException - if there are issues reading the InputStreamEngine.EXPORT_CSV,
Engine.EXPORT_DATA,
Engine.EXPORT_HTML,
Engine.EXPORT_JAR,
Engine.EXPORT_JRA,
Engine.NO_EXPORT,
Engine.EXPORT_PDF,
Engine.EXPORT_PS,
Engine.EXPORT_PS2,
Engine.EXPORT_PS3,
Engine.EXPORT_RTF,
Engine.EXPORT_SVG,
Engine.EXPORT_TXT,
Engine.EXPORT_XLS,
Engine.EXPORT_XML
public static Engine loadEngine(java.io.File file,
java.lang.String export_fmt)
throws ReportException
Engine with the given export format and returns this engine.file parameter specifies the file or directory pathname from that the report template will be loaded.Engine.getLoadExceptions() to get all errors.Engine.setReportFile(String) instead. This method will detect the file format automatically.
file - The report template file or directory pathname that should be loaded into a new engine.export_fmt - The output format given as String. Use this for export only.
Engine, initialized with the report template from file.
ReportException - If the provided report template is a Crystal
Reports report or another error occurred during loading the report.Engine.NO_EXPORT,
Engine.EXPORT_PDF,
Engine.EXPORT_PS,
Engine.EXPORT_PS2,
Engine.EXPORT_PS3,
Engine.EXPORT_RTF,
Engine.EXPORT_XLS,
Engine.EXPORT_XML,
Engine.EXPORT_TXT,
Engine.EXPORT_HTML,
Engine.EXPORT_CSV,
Engine.EXPORT_DATA,
Engine.EXPORT_SVG,
Engine.setReportFile(String),
saveEngine(File, Engine)
@Deprecated
public static Engine loadEngine(java.io.File file,
java.io.BufferedReader in)
throws ReportException
loadEngine(URL, InputStream, String, Properties) should be used instead.
Engine
and returns it. The file parameter specifies the file that should be loaded. The file must have
been created with the i-net Report Designer or saved with one of the saveEngine methods.
After loading the report you can get all errors which occurred while loading the report
with the method Engine.getLoadExceptions(). The content is loaded from BufferedReader
in. If you do not know the file type
(whether your file is saved in a binary format such as Crystal Reports or in i-net Clear Reports format
format) use method setReportFile from class Engine. Then the file format is detected
automatically. If your file is saved in binary format the use of this method is wrong, use
Engine.setReportFile(String)
instead.
in - The stream with the report template file that should be loaded.file - set filename of report in in explicitely. The name from
file is used only. If no report file name should be used,
null is possible.
Engine, initialized with a report template, from in.
ReportException - If the provided report template is a Crystal
Reports report or another error occurred during loading the report.Engine.setReportFile(String),
saveEngine(File, Engine)
@Deprecated
public static Engine loadEngine(java.io.File file,
java.io.BufferedReader in,
java.util.Properties props)
throws ReportException
loadEngine(URL, InputStream, String, Properties) should be used instead.
Engine into a newly
created Engine and returns it. The file needs to have been
created with i-net Designer or saved with
saveEngine(File, Engine). This will also set all properties
provided by the Properties props to the created
Engine. The property "export_fmt" of props will decide which
export format will be set for the created Engine.
file - If in is null the content of the report template
will be read from this file. The file url will also be set as filename
for the created Engine. Can be set to null if
in is not null.in - If not null the content of the report template will be read
from this BufferedReader.props - The properties to be set for the created engine. This can
include the export format ("export_fmt%quot;), prompts or database
properties.
Engine object.
ReportException - If the provided report template is a Crystal
Reports report or another error occurred during loading the report.
@Deprecated
public static Engine loadEngine(java.io.File file,
java.io.BufferedReader in,
java.lang.String export_fmt)
throws ReportException
loadEngine(URL, InputStream, String, Properties) should be used instead.
Engine into a newly created Engine
and returns it. The file needs to have been created with the i-net Designer or saved with
one of the saveEngine methods. After loading report you can get all occurred errors with
method Engine.getLoadExceptions(). The content is loaded from BufferedReader
in. If you do not know the file type (whether your file is saved in binary format or in
i-net Clear Reports format)
use method setReportFile from class Engine. Then the file format is detected
automatically. If your file is saved in binary format the use of this method is wrong, use
setReportFile from class Engine instead.
file - set filename of report in in explicitly. The name from
reportFilename is used only. If no report file name should be used,
null is possible.in - BufferedReader initialised with content of fileexport_fmt - The output format given as String. Use this for export only.
Engine, initialized with data from in.
ReportException - If the provided report template is a Crystal
Reports report or another error occurred during loading the report.Engine.NO_EXPORT,
Engine.EXPORT_PDF,
Engine.EXPORT_PS,
Engine.EXPORT_PS2,
Engine.EXPORT_PS3,
Engine.EXPORT_RTF,
Engine.EXPORT_XLS,
Engine.EXPORT_XML,
Engine.EXPORT_TXT,
Engine.EXPORT_HTML,
Engine.EXPORT_CSV,
Engine.EXPORT_DATA,
Engine.EXPORT_SVG,
Engine.setReportFile(String),
saveEngine(File, Engine)public static java.awt.Color toJavaColor(int abgr)
abgr - the ABGR components of the color
COLOR_AQUA,
COLOR_BLACK,
COLOR_BLUE,
COLOR_FUCHSIA,
COLOR_GRAY,
COLOR_GREEN,
COLOR_LIME,
COLOR_MAROON,
COLOR_NAVY,
COLOR_NO_COLOR,
COLOR_OLIVE,
COLOR_PURPLE,
COLOR_RED,
COLOR_SILVER,
COLOR_TEAL,
COLOR_WHITE,
COLOR_YELLOWpublic static int toCcColor(java.awt.Color color)
color - Color object
COLOR_AQUA,
COLOR_BLACK,
COLOR_BLUE,
COLOR_FUCHSIA,
COLOR_GRAY,
COLOR_GREEN,
COLOR_LIME,
COLOR_MAROON,
COLOR_NAVY,
COLOR_NO_COLOR,
COLOR_OLIVE,
COLOR_PURPLE,
COLOR_RED,
COLOR_SILVER,
COLOR_TEAL,
COLOR_WHITE,
COLOR_YELLOWpublic static void setCertificateInfoFactory(CertificateInfoFactory factory)
factory - instance of certificate factory that will be used to get certificate info.public static CertificateInfoFactory getCertificateFactory()
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||