Welcome to the JReport Enterprise Server User'

Welcome to the JReport Enterprise Server User's
Guide
This User's Guide describes JReport Enterprise Server. JReport Enterprise Server is a 100% Java report
generation and management tool that can be deployed to any Java EE application server. By leveraging
its high performance report generation engine and clustering capabilities, JReport scales to meet the
most demanding requirements. Using the report scheduling, distributing and alerting capabilities of the
JReport Enterprise Server, reporting can be integrated into the workflow of the application.
This guide is written for report administrators or system administrators of Java application that embed
JReport reports into their application.
How to use this guide
There are two ways you can navigate through the guide by using the navigation panel to the left of this
text:
●
●
From the Contents tab, scan through the chapters and topic titles to see the tasks that you can
perform with JReport Enterprise Server. The chapters at the end of the guide are reference chapters.
From the Search tab, enter a term you want to search for and press Enter. Topics that contain the
term are listed. To search within a particular topic, use your web browser's Search feature. For
example, in Internet Explorer, right-click in the topic pane and choose Edit > Find. You can
synchronize the Contents tab with the current topic by pressing the Synchronize TOC button
the top of the Contents tab.
Other JReport documentation
This guide is one in the complete JReport documentation set. The documentation set includes the
following:
●
JReport Designer User's Guide
●
JReport Tutorial
●
JReport Viewer User's Guide
●
JReport Server Monitor User's Guide
●
Server API Javadoc
●
Designer and Catalog API Javadoc
at
What's New in This Release
This document describes the new features of JReport in this release.
JReport Enterprise Server
Performance Improvements with the advanced report engine are focused on faster response time
and better scalability. Through internal system tuning and minimizing redundancy, JReport now has a
smaller footprint with faster response time for on-demand report generation, report delivery, and
interactive reporting and analysis.
●
Multiple Report Bursting. JReport now supports multiple bursting schema in a report so reports
can be burst to multiple schema at the same time plus optionally a non-bursting result. So with one
run of the report a complete report with all the data can be produced as well as multiple delivery
criteria. In addition, two built-in functions, Boolean isRunBursting() and String currentBurstingSchema
(), are provided for bursting. You can find them in the Others category in the Functions panel of the
Formula Editor in JReport Designer.
For details, see Report Bursting in the JReport Designer User's Guide and Scheduling a task
containing a bursting report in the JReport Enterprise Server User's Guide.
●
Greatly Enhanced Report Delivery Using Page-level Security. Two page-level security
properties Groups and Roles are added on the group panel in JReport Designer. You can now decide
which data can be viewed by each group of users or each role as well as by each user. In JReport
Enterprise Server, when scheduling a report with page-level security to publish it to HTML and/or
DHTML format, all pages will be included in the scheduled result. Then when end users view the
result, they will only be able to see the data they are privileged to see according to the page-level
security setting. They can perform interactive actions on the scheduled DHTML result as on other
DHTML results, and the formulas, summaries and other similar data will be recalculated based on the
privileged data.
In addition, for compatibility with versions earlier than V9, a property server.enable.pagelevelsecurity
has been added in server.properties in the <server_install_root>\bin directory. It allows you to
decide whether to use the logic of the previous versions for page-level security for the scheduled
HTML and DHTML results.
●
●
●
JReport Encoding Optimization. Data structures in JReport engine are improved with optimized
encoding that results in improved footprint and performance.
Optimized RMI API. A separate new jar JRSRMI.jar is provided in <server_install_root>\lib for
RMI API invocation from the client side. JRSRMI.jar is a combination of JREngine.jar and
JRESServlets.jar, keeping all necessary classes for RMI environment (not for RMI integration which
requires more) and excluding unused classes. This will improve performance and footprint when
using the popular RMI interface to JReport.
Enhanced Default Settings of JReport Connection Pool. The default settings of MaxCount_URL
and MaxShare_URL in the JReport connection pool are tuned for improved performance. However,
you should still tune the connection pool for your application. For details, see Configuring a
connection pool in the JReport Enterprise Server User's Guide.
Usability is improved with a simpler interface and more tools that enhance productivity.
●
●
●
●
●
●
●
●
JReport Web UI Enhancement. The toolbars and menu commands are better organized to
improve usability. For details, see JReport Web window elements in the JReport Enterprise Server
User's Guide.
Highlighting Unviewed Version Results. A property web.version.mark_unviewed was added in
server.properties in the <server_install_root>\bin directory. The property controls whether to
highlight unviewed version results. By default, the server does not show color difference between
viewed and un-viewed version results.
Saving Parameter Values for Reuse. When specifying parameter values, two options Use
Previously Saved Auto Complete Parameters and Save Current Parameters in Auto Complete List, are
provided for saving the specified values for the selected reports as a list and reusing them next time.
For details, see Parameters in the JReport Enterprise Server User's Guide. In addition, the maximum
number of saved parameter value lists can be specified on the JReport Administration/Console page
> Profile > Customize Server Preferences > Advanced tab.
Support Calendar for Specifying DateTime Parameter Values. When specifying value for
parameter of DateTime type in JReport Enterprise Server, a calendar button is provided next to the
text input box, which helps you to set a DateTime value more easily.
Using a Combo Box on Parameter Pages. In all automatically generated parameter pages, the
dropdown lists and input boxes have been merged into combo boxes so you don't see both a text
field and a dropdown list for each parameter.
Boolean Parameter Using Checkbox. When viewing a report which contains a Boolean parameter,
in the Enter Parameter Value dialog a checkbox is provided for specifying the parameter value. The
text after the checkbox is specified as the parameter prompting text when the Boolean parameter is
created.
Support Multiple Parameter Values. The option Allow Multiple Values is added in the creating/
editing parameter dialogs, with which you can specify whether to allow multiple values for a
parameter. See Enter Values dialog in the JReport Enterprise Server User's Guide for how to specify
multiple values. JReport also supports multiple parameter values used in a dataset filter and query
filter.
Input Parameter Value Validation. You can type in values when setting parameter values and
predefine a criterion when the typed values are out of the predefined value list. There are three
choices: the input values are used; the default values are used; a warning message is displayed. For
details, see the two options Allow Type-in of Value and When Out of Value Range in Create
Parameter dialog in the JReport Designer User's Guide. In addition, JReport also support parameter
values validation via user logic. Two methods, public Vector getParamDescs() and public void
validateParameter (ServerInfo serverInfo) were added in the Server API, with which you can plug in
your own parameter validation logic. JReport Enterprise Server will then validate the input parameter
values via the customized logic. For details about their usage, see the JReport Enterprise Server
Javadoc located in <server_install_root>\help\server\en\api.
New Functional Features to provide enhanced capabilities in security, report output and more.
●
●
Improved Network Security. Sensitive information is removed from error messages in order to
reduce the security exposure. Detailed information about the errors will be placed in the log files.
New Security API to Determine Ownership between Users, Groups and Roles. Five methods
are added in the security API jet.server.api.admin.SecurityAdminService for finding out whether a
user belongs to a role or a group, whether a group belongs to a role or another group, and whether a
role belongs to another role. For details about the usage of the methods, see the JReport Enterprise
Server Javadoc located in <server_install_root>\help\server\en\api.
●
●
●
●
●
●
●
Specifying Dynamic Parameter Values with Expression. When running a report set in the
advanced mode or scheduling to run a report set, if the specified reports in the report set contain
parameters of Date, DateTime or Time format, you can now use an expression to set a dynamic date
or time as the parameter value. For details, see Parameters in the JReport Enterprise Server User's
Guide.
Dataset Sharing Enhancement with Parameter Support. When multiple reports or components
in a report set share the same dataset and the Cache property is true, they can share the cached
data. Now JReport also supports sharing the cached data when the dataset has parameters and the
parameter values are the same.
XHTML Supported in JReport's HTML Report Results.
Excel Export with Columned Format Control. When exporting report result to Excel format, you
can now use the option Normal Formatting together with the Columned property of a report to
control whether the exported Excel file will be in Columned format or not.
PDF File Attachment Can be Split by Page. Previously, when sending a report set result to e-mail
as a PDF file attachment, users can specify to split the PDF file by file size if the file is too large. Now
besides by size, users can choose to split the PDF file by page boundaries via the new Maximum File
Page option. For details, see Split PDF in the JReport Enterprise Server User's Guide.
Improved Publishing Result to FTP. Besides Standard FTP Protocol, four more secure protocol
types are also supported. For details, see To FTP in the JReport Enterprise Server User's Guide.
Tracking Frequencies Report Sets are Accessed. JReport Server Monitor can record how many
times a report is accessed since it is first published to JReport Enterprise Server. For details, see
Status of all report sets in the JReport Enterprise Server User's Guide.
Standards Support is further enhanced in JReport 9.
●
●
JSR 168 Support to Further Enhance Portlet Usage. Users can run reports as standard portlets
to enable dashboard applications. APIs are provided to access the system through SOA for better
interoperability.
NLS Support Enables Multiple Language Localizations.
JReport Live (Ad hoc reporting and analysis)
●
●
●
Conditional Formatting Supported. You can now add conditional formats based on calculations to
specific fields in a report, and then the format will be applied to values of the field when the specified
condition is fulfilled. For details, see Adding conditional formats to fields in the JReport Enterprise
Server User's Guide.
Using Dynamic Resources in Ad Hoc Reports. End users analyzing ad hoc reports can create
dynamic resources such as measures and formulas and use them in reports to present the data in
the way they desire. For details, see Using dynamic resources in the JReport Enterprise Server User's
Guide.
Parameter Form as a New Web Control. A parameter form can be used to launch other report
sets from a report running in DHTML. User can use it as an entry to other report sets. For details, see
Using a parameter form to run report sets in the JReport Designer User's Guide. Moreover, when
defining a parameter web action to run a report set, you can obtain the report set name from a web
control and specify the window in which the report set will be opened. For details, see Parameter Web Action Builder dialog in the JReport Designer User's Guide.
●
●
●
●
●
Redesigned Report Wizards. They are now presented in a workflow fashion, which makes the
report creating process easier.
Better Default Focusing Rules. When adding and moving a component in ad hoc reports, the
component is always focused unless you cancel the focusing, so that you can easily locate the
component to make other operations.
Support Showing and Hiding Save Criteria Dialog. When the template of a report is changed
ever since it is opened in JReport Web, for example, when the report has been filtered, sorted,
drilled, etc, you can configure whether to ask JReport to prompt you to save the criteria when you
save the report by setting the option Pop Up Save Criteria Dialog in the Configure DHTML Profile page.
Support Filtering Data for All Components. Filtering in JReport Web takes effect not only for
banded objects and tables, but also crosstabs and charts now. For details, see Filtering report data in
the JReport Enterprise Server User's Guide. Also, the filter dialogs are redesigned in order to make
the user interface more intuitive and support complex conditions with multi-level groups. In addition,
you can now apply filters to a report while creating it with the report wizard.
Chart Enhancement. Better control of label font and orientation, flexible axis label and tick marks,
and other chart properties.
JReport Designer
●
●
●
●
●
●
Map Definitions Can be Imported from ESRI Shapefiles or Defined by Developers. This
version now provides interactive map support. With the conditional formatting the appearance of the
map and each area can be fully customized and controlled. Also, you can import an .xml file or .shp
file to create or format a map, and save the map definition to an .xml file for future use.
Showing Detailed Structure of Subreport. The option Show real view of subreport in the Options
dialog allows you to decide whether or not to show the detailed structure of a subreport in its primary
report in design mode, instead of only showing the subreport placeholder and name.
Support Vertical Group Header in Table. A new option, Use vertical group header to detail panel
in table, is added to the Component category of the Options dialog, which helps you to control
whether to place the group header in a table vertically with the detail panel. You can also use the
property Vertical to Detail Panel on the table group header panel to control the group header
alignment in specific table components.
Sort Properties Alphabetically. Properties for objects in both the Catalog Browser and the Report
Inspector are listed alphabetically now for easy searching.
Putting UDF Implementation in Any Package. In previous versions JReport only supports putting
the implementation of UDF (user defined formula) in jet.formula.javaformula, in which case there is
no need to provide the package information when importing the class file in formulas. Now you can
also put the UDF implementation in your own package, in which case you should write package
information in formulas. For more, see User defined formula functions in the JReport Designer
User's Guide.
Improved Publish to JReport Enterprise Server Dialog. Improvements have been made to the
Publish to JReport Enterprise Server dialog to make it more intuitive and easy to use. For details, see
Publish to JReport Enterprise Server dialog in the JReport Designer User's Guide.
Classify Parameters into Three Types.
●
❍
❍
❍
●
Type-in Parameter: Predefine parameter values or allow the user to type new values in manually.
Bind with Single Column: Bind a parameter with a DBField. The values of the DBField will be
retrieved as the parameter values.
Bind with Cascading Columns: Create a group of cascading parameters so as to achieve the
function of filtering parameters with parameters in a simple way.
Oracle Stored Procedure UDS Enhancement. JReport now supports Oracle stored procedure UDS
(User-defined Data Source) without the connection information. In this case, JReport will get the
connection information from its data source as the default connection, and the connection can be
changed at runtime via datasource.xml, Engine API or Server API in JReport Enterprise Server.
In addition, in order to support seamless Oracle stored procedure UDS, the different format of the
PARAMETER string is provided, which indicates the value, datatype and index.
●
●
●
BigDecimal Support to Control the SQL Type of Formulas or Summaries.
Complex Join Conditions Supported in Data Source Pre-joins, Business Cube and Query. For
details, see Join Options dialog in the JReport Designer User's Guide.
Report Designer for Eclipse Plug-in. Allowing report design directly within the Eclipse IDE
(Interactive Development Environment).
Resolved/Known Issues in This Release
This document describes the resolved issues and any known issues for JReport Enterprise Server in this
release.
Resolved issues
Case Number
Bug ID
Issue
[Jinfonet
#48601]
33558
JReport Enterprise Server can be stopped on Tomcat now.
[Jinfonet
#49229]
33384
Users are now able to establish more than 20 connections with URL in a
JReport connection pool.
[Jinfonet
#49229]
34542
In an RMI integration environment, the last modified time can now be
displayed on the JReport Enterprise Server pages even if the RMI
environment and the standalone server are not in the same machine.
[Jinfonet
#49229]
34543
The Set Fetch Size property in JdbcDriversConfig.properties works well
on JReport Enterprise Server now.
[Jinfonet
#49229]
34545
Support information is now caught for user connection to optimize
performance.
[Jinfonet
#49229]
34548
Correct exception is thrown out when the Server API tries to get a user
that hasn't an existing user name.
[Jinfonet
#49229]
34552
When using banded column parameter in a report, user does not need
to remove the additional SQL statement for each calling getParam() now.
[Jinfonet
#49229]
34555
The logic of validation connection has been changed to optimize
performance.
[Jinfonet
#49488]
32508
JReport now supports calling the API String[] sqls = dr.getSQLs(); String
[] sqlColumns = cat.getSQLColumns(sqls[0]) instead of throwing a java.
lang.ClassCastException.
[Jinfonet
#49655]
32246
Parameters provided in the DHTML tag library are now sufficient enough
to run a report set, such as jrs.auth_uid, jrs.auth_pwd, jrs.
authentication.
[Jinfonet
#49799]
32439
When user sets server.rmi.host to be the virtual IP address in server.
properties, he can use RMI services well now.
[Jinfonet
#49821]
32541
When user sets the option to repeat the group header in a banded
object, if there is not enough space for the group header in the first
page, it will be shown on the second page.
[Jinfonet
#49869]
32313
Catalogs published from real paths can also be used as linked catalog to
run reports.
[Jinfonet
#49973]
34331
The embedded fonts in subreports can now be displayed in the whole
report.
[Jinfonet
#49977]
34254,
34255
When a report with summary is exported to Excel and the format is
selected to be Preserve Report Formatting, the result is correct now.
[Jinfonet
#50112]
32430
Users can set pwd=null in a catalog connection now.
[Jinfonet
#50188]
32648
Reports run well on JReport Enterprise Server that is upgraded from
previous version to V8.2.
[Jinfonet
#50216]
32550
When the user sets "Duser.language -Duser.country -Dfile.encoding="
in JREntServer.bat, the corresponding characters will now be displayed
correctly.
[Jinfonet
#50310]
32660
The new feature of using scroll wheel to go to the next page in DHTML
now has its option setting in the DHTML Preference page.
[Jinfonet
#50310]
34270
When user clicks the Sort button on the DHTML toolbar to sort the
report, even with the instance name of a component in the report
contains space, he no longer gets the JRSInvalidParameterException.
[Jinfonet
#50406]
33683,
33685
When a crosstab is inserted into the group header panel of a banded
report, if the crosstab contains more rows than fit on one page, the
rows will be displayed on the next page.
[Jinfonet
#50427]
32835
If user runs DHTML report by a very long URL, he will no longer get
exception when creating .param file in RMI integration environment.
[Jinfonet
#50458]
33065
The SQL exception is displayed on DHTML error information page now.
[Jinfonet
#50477]
33296
The logic of the current parse parameter value has been modified more
canonical.
[Jinfonet
#50480]
33559
If user calls HttpUtil.checkAdminLogin(request, response) and the
parameter is non serializable, he no longer gets Non Serializable
attribute exception.
[Jinfonet
#50552]
33107
When user runs a DHTML report by URL, the URL is now correctly
displayed and the report can work perfectly well.
[Jinfonet
#50555]
33071
Ad hoc reports can be saved to any folder other than where the catalog
it uses locates and run well from the saved folder.
[Jinfonet
#50555]
35071
When saving an ad hoc report with the same name as an existing
report, the linked catalog now is updated based on the actual catalog
the newly saved report uses.
[Jinfonet
#50606]
34264
User can cancel the search operation on a DHTML report as desired.
[Jinfonet
#50717]
35550
Although the user's key does not support ad hoc feature, but he still can
move components in DHTML report in V8.2.
[Jinfonet
#50719]
35042
When an ad hoc report applies a business filter which contains
parameters, end users now will be asked to specify the parameter
values each time he runs the report.
[Jinfonet
#50732]
33585
When using the IN operator to set filter condition on a DHTML report, if
user chooses to type in the values manually separated by ",", the filter
condition can now be successfully applied to the report.
[Jinfonet
#50760]
34999
The DSPage instances now use less memory when user exports the
report to Excel.
[Jinfonet
#50894]
35296
Now the accurate error message is shown in the Error Message column
of the completed table and in JReport Enterprise Server log file.
[Jinfonet
#50899]
34537
Much shorter time is now required to open the Search dialog when a
report contains a large amount of data.
[Jinfonet
#51197]
34790
The box border now does not overlap the page footer and page header
panels in PDF results.
[Jinfonet
#51216]
34818
In RMI environment, if user selects the Single File option when he
schedules an HTML report to version, he is now able to visit the HTML
result file via URL.
[Jinfonet
#51238]
34949
The True Type Font (TTF) can get bold in HTML and DHTML results.
[Jinfonet
#51250]
35254
When users print labels in Margin or Landscape format, they can get the
expected exporting result.
[Jinfonet
#51260]
35310
Users can now change the database connection information for business
cubes at report runtime.
[Jinfonet
#51347]
35204
While accessing JReport Enterprise Server from JReport Viewer Bean
and calling zoom to view report, the report now displays well.
[Jinfonet
#51398]
35340
When exporting a report which has a subreport with the On New Sheet
property enabled to Excel, the sheet name of the subreport displays as
specified by the Sheet Name property now.
[Jinfonet
#51322]
35342
Two subreports that are inserted side by side in the banded footer panel
and returning different values from the database can now show their
own data after the main report is published to JReport Enterprise Server.
[Jinfonet
#51387]
35366
When using the datasource.xml file to redirect the connection to a JNDI
connection pool defined by the web server, reports can run with the new
connection well in JReport Enterprise Server now.
[Jinfonet
#51405]
32445
JReport can now release the left-off connections well.
[Jinfonet
#51509]
35554
Data of a subreport can be fully displayed in its main report now.
Known issues
Compiling formulas in JReport under JDK 1.5 or higher gets warnings
Since generic type is introduced to JDK 1.5 or higher version, when compiling formulas in JReport
under JDK 1.5 or higher, you may come across warning messages as follows:
●
Note: Test.java uses unchecked or unsafe operations.
●
Note: Recompile with -Xlint:unchecked for details.
You may see that the situations are logged as Javac errors. However, the warning messages do not
prevent Javac from creating .class files and reports can still run correctly.
In this case, you can simply ignore the messages and logged errors.
Image sometimes is exported to different formats
If the resolution in which a report is designed is different from the one in which the report runs, when
you export the report to HTML with the default settings, you may find that the image in the report
sometimes is exported to GIF format but sometimes to PNG format. This problem is caused by the
different algorithm of different resolutions, and JReport will have it solved in next release.
TOC Browser tree doesn’t work well for reports with Page-level Security
When end user runs a report which has been defined with some page-level security policy in JReport
Web, if he opens the TOC Browser, he will be displayed with all the groups the report has instead of the
ones he is supposed to view. In addition, no matter a group is allowed for him or not, he cannot click
the group name from the TOC tree to get corresponding details. JReport will further enhance the Pagelevel Security feature in future release to resolve this issue.
JReport Product Overview
JReport is a complete Java reporting solution that provides sophisticated enterprise reporting, ad hoc
reporting, and data analysis. A 100% Java EE architecture and a rich set of APIs allow JReport to be
seamlessly embedded into any application, providing end users with a transparent interface to easily
generate reports, share information, and analyze data. With JReport, any report can be made
interactive, extending the "life" of a report by allowing users to easily sort, group, navigate, and filter
via the Web. This wide range of functionality, including the ability to drill down on data, enables users
to quickly derive value from their business intelligence.
This chapter describes the JReport product in the following sections:
●
Features of JReport
●
JReport product architecture
●
Reporting a problem or requesting a feature
●
Visiting our web pages for more information
Features of JReport
JReport Designer supports report development. JReport Designer provides the following features:
●
Interactive IDE
●
Sophisticated report design
●
Precise, flexible layout
●
Reusable report objects
●
Access any data source
JReport Enterprise Server supports report generation and management. JReport Enterprise Server has
the following features:
●
High performance engine
●
Scale to any workload
●
Seamless integration SDK
●
Pure Java EE deployment
●
Scheduling, distribution, alerting & versioning
JReport Live supports information delivery. JReport Live has the following features:
●
Interactive DHTML technology
●
Dynamic sort, filter, drill, pivot, convert
●
Ad hoc reporting
●
Taglib to customize JSPs
●
Flexible output formats: PDF, Excel, XML, RTF, e-mail and more
JReport product architecture
The JReport solution spans a 3-tier architecture.
JReport Designer is a Swing-based Integrated Development Environment (IDE) that enables
sophisticated report design and presentation of critical business data. It provides an intuitive interface,
reusable report components, flexible layout, and a toolset for designing and testing reports. With
JReport Designer, you can build reports using simple drag and drop techniques or by using the Report
Wizard. Data can be accessed from any data source to design and preview reports in order to deliver
information to end users in the most relevant and intuitive manner. Rapid creation and modification of
report templates is accomplished by toggling between design mode and view mode where the report
will be displayed with the actual dataset. Once report design is complete, the template is published to
the JReport Enterprise Server for generation, delivery, and management.
JReport Enterprise Server is a 100% Java report generation and management tool. The JReport
Enterprise Server reliably and robustly performs the duties of an enterprise-level reporting service. It
enables efficient management, sharing, scheduling, versioning, and delivery of reports and enables
reporting to be integrated into the workflow of any Java application. The high-performance engine can
scale to any workload. Report results can be saved to a versioning system, sent to enterprise/
workgroup printers, or e-mailed. With JReport, reports can be viewed in any modern enterprise format
including DHTML, HTML and standard business documents, such as PDF, Excel, and RTF.
JReport Live enables reports to be accessed through a web browser via Dynamic HTML. With JReport
Live technology, reports can be modified using dynamic filter, sort, and drill capabilities. Using JReport
Live's advanced capabilities, users can drag and drop columns to and from an existing report,
dynamically change chart types, pivot crosstabs, add groups, convert report components or create an
entirely new report.
JReport SDK
All JReport functionality can be accessed through Java APIs using JSP pages, servlets, or standalone
applications.
Reporting a problem or requesting a feature
If you are having trouble running JReport Enterprise Server or encounter any problems during
reporting, take the following steps.
1. Check whether the system on which JReport Enterprise Server is running meets the system
requirements.
2. Check the JReport FAQ pages for frequently-asked questions and their solutions.
If the problem persists, report it to Jinfonet Support (support@jinfonet.com) with the following
information:
1. Describe the precise steps leading to the problem.
2. Run the batch file jrenv.bat in the <install_root>\bin subdirectory. Running this batch file will
generate a file called report.env in the current directory. Send this file to Jinfonet Support. Also,
describe the operating environment, including machine type, CPU, memory, OS, and Java version.
3. If you are running JReport in an integrated Java application server, click the Server Information
button
on the JReport Administration page to list the environment.
4. Send Jinfonet Support the log file with the recorded JReport Enterprise Server problems.
❍
❍
For a standalone server: Start JReport with the batch file DJREntServer.bat (.sh on UNIX).
Running this batch file will record the most detailed logging information and write them to the
log files in the <install_root>\logs directory. Try to reproduce the problem, and send the log
files along with the other information.
For an integrated JReport Enterprise Server: If your JReport Enterprise Server runs as a servlet
inside a Java application server, send the log files generated by the JReport Engine in the
application server. When the JReport Servlet is installed, a property file is generated which is
used to define the class and arguments of the JRServlet. For example, if you integrated JReport
Enterprise Server into WebLogic, find the WebLogic properties file located in the installation path
of WebLogic. Edit the file to use the option -vDebug -vError. Your file should then contain the
following content:
vError=true
vDebug=true
In addition, you can also directly add the java option -Dlogall=true (or -DvError=true, DvDebug=true) to the java command line within the launch file of the application server.
After restarting your application server, reproduce the problem and send the log files to Support.
5. Send Support the log files recording all of the logging information of engine and server (including
event, error, debugging, access, management, and performance).
❍
Change the configuration to record all logging events by starting the server and accessing the
JReport Administration page through http://localhost:8889.
a. Go to the Configuration > Logs tab.
b. Set the trace level of all logs to TRIVIAL, and set the error level of all logs to WARN.
c. After that, reproduce your problem and send Support the log files in <install_root>
\logs. In addition, you can also directly modify the logging configuration file LogConfig.
properties in <install_root>\bin. If you set the server property log.config.update to true
(all server properties are managed within the file server.properties in <install_root>
\bin), any changes to the configuration file will automatically take effect at runtime after
the specified update interval (set by the server property log.config.update.interval).
❍
If your JReport Enterprise Server runs as a servlet within a Java application server, in the
address bar of a web browser, type in http://<hostname>/jreport/admin, where jreport is the
servlet context path.
6. To reproduce your problem of running reports with JReport Enterprise Server, we will often need
your report, catalog and data information.
a. Send Support the catalog file (*.cat and *.fml) and the report set file *.cls that you are
having problems with.
b. In order to resolve technical issues that you have reported, we will need to access your
report data so that we can recreate and analyze the problem. Your database may be very
large. However, we will only require access to the data returned by the query of the
troublesome report, and if necessary we will sign a confidentiality agreement with you. To
extract the report data, in the Catalog Browser of JReport Designer, right-click the query that
your report is using, select the menu item Create Cached Query Result. Then, input the
data file name and click the Save button. The query result will then be saved in this file.
Send Support all of the files generated (including the description file).
Visiting our web pages for more information
●
●
●
●
●
Products and release information
http://www.jinfonet.com/products/designer.htm
Products download center
http://www.jinfonet.com/downloadjreport/
JReport product documentation
http://www.jinfonet.com/kbase.htm
JReport Javadoc
http://www.jinfonet.com/kbase.htm
JReport technical support center
http://www.jinfonet.com/support/
Installing and Uninstalling
This chapter presents how to install JReport Enterprise Server using a variety of different methods. It
covers issues associated with installing, removing and solving problems encountered during installation.
●
System requirements
●
Installing using the Installation Wizard
●
Installing silently
●
Installing using the console interface
●
Installing on UNIX manually
●
Uninstalling
●
Solving installation problems
●
JReport Enterprise Server reporthome directory overview
System requirements
The following table displays the basic system requirements for installing JReport Enterprise Server.
Check your system to make sure that all the requirements are met before installation.
JReport Enterprise Server System Requirements
Recommended Requirements
OS:
Windows, Unix, Linux
CPU:
Intel Dual Core Xeon 2.8GHz
Memory:
3GB
Disk:
1GB free
JDK:
1.5 or above
Minimum Requirements
OS:
Windows, Unix, Linux
CPU:
Intel P4 Xeon 3.0GHz
Memory:
2GB
Disk:
1GB free (500MB free for a slave server)
JDK:
1.4.2 or above
Client Requirements Recommended
Internet Explorer 6 or above, Firefox 2 or above
You can download a JDK version at http://java.sun.com/javase/downloads/index.jsp.
Note: Jinfonet supports Java VMs released by Sun and IBM to run with JReport Enterprise Server. You
can try using other Java VMs, but their compatibility cannot be guaranteed. Reports of any problems
you find with other Java VMs are welcome.
Installing using the Installation Wizard
Installing JReport Enterprise Server with the Installation Wizard is intuitive. You only need to follow the
screens and enter the required information. This section shows you how to install the server to different
systems with the Installation Wizard.
●
Installation types
●
Installing on Windows 2000/XP/2003
●
Installing on UNIX
Installation types
The Installation Wizard provides two installation types:
●
●
Typical Installation for Standalone Server
Installs JReport Enterprise Server with the default configuration and settings.
Custom Installation for Standalone Server
Installs JReport Enterprise Server in a standalone environment. If you choose this installation type,
you can configure the server in the Installation Wizard.
Configuration options for Custom Installation type
When installing JReport Enterprise Server using the Installation Wizard, if you choose Custom
Installation for Standalone Server, you can configure the server according to your requirements
during the installation. You can configure the following items:
●
Service
●
Cluster
●
E-mail
●
Cache
●
Performance
●
Advanced
●
System Data Source
Cache
Cache Loaded Catalogs
Specifies whether to keep a catalog in memory, or to remove it from memory after a report set is
completed.
Normally, after a report set has been generated, the catalog that is used to generate the report set will
be removed from memory. However, if you specify this option, the catalog will be cached rather than
removed.
Cache Loaded Report Sets
Specifies whether to keep the report sets in memory or remove them from memory after they have
been generated.
Performance
Pre-loading the Java classes and fonts which are used by catalogs, report sets and JReport Engine at
startup time will improve performance when these classes are needed at runtime.
Preload Catalog Referred Classes
Pre-loads the Java classes that are used for a catalog.
Preload Report Set Referred Classes
Pre-loads the Java classes that are used for a report set.
Preload Engine Referred Classes
Pre-loads the Java classes that are used by JReport Engine to generate reports.
Preload Fonts
Specifies to load the fonts when JReport Enterprise Server is started rather than when they are first
used.
Maximum Number of Concurrent Report Sets in the Queue
Specifies the maximum number of concurrent report sets in the queue, which must be less than or
equal to the number that the license permits.
System Data Source
Database Type
Specifies the database type.
JDBC URL
Specifies the URL that can be used to establish a connection to your database.
JDBC Driver Class Name
Specifies the name of the JDBC driver.
JDBC Driver Class Path
Displays the JDBC driver path. It can be null, which means that the server will load the driver from the
VM's class path.
User Name
Specifies the JDBC user name for connecting to the database.
Password
Specifies the user password.
Installing on Windows 2000/XP/2003
To install JReport Enterprise Server on a Windows platform, take the following steps:
1. Download the JReport Enterprise Server installation file for Windows EntSvrSetup.exe from the
Jinfonet download center: http://www.jinfonet.com/downloadjreport/.
2. Run EntSvrSetup.exe and follow the prompts to install.
During installation, pay attention to the following:
●
●
For detailed information about installation types, see Installation types.
The InstallShield Wizard will first find a JVM to get started. If no JVM is found, the JReport installer
will fail to launch. To solve this issue, you can install JReport Enterprise Server from a DOS command
by specifying the -is:javahome option for the InstallShield Wizard as follows:
EntSvrSetup.exe -is:javahome c:\j2sdk1.4.2_02
●
●
The installer provides a chance for you to add additional class paths. You can also choose to add
them manually into the setenv.bat in <install_root>\bin after installation.
If you select to install JReport Enterprise Server in a folder that already contains an existing copy,
the installer will replace the packages and create new batch/script files. Meanwhile, a copy of the old
batch/script files will be kept for your reference. You should use the batch/script files that come with
the installer in order to make sure that all new packages are added to the class path and manually
merge any changes you made into the new version.
An issue on Vista (a platform of Windows)
Problem
When running JReport Enterprise Server's installer on Vista, the installer cannot find the installed JDKs.
Reason
By default vista's security settings are stricter than Win XP, 2003 and 2000. The children processes do
not inherit the execution right from their parent process.
Solution
Make the compatibility property of the installer file (.exe) available:
1. Right-click the installer file, and select Properties from the shortcut menu.
2. In the Compatibility mode panel of the Compatibility tab, check the Run this program in
compatibility mode for option, and then select Windows 2000 from the drop-down list.
3. Click OK.
4. Run the installer.
Installing on UNIX
JReport Enterprise Server supports Solaris, Linux, HP-UNIX, and AIX. In the following process, an X
server is running and Java 1.4.2 or above is available, otherwise ask your administrator for help.
Installing and running JReport Enterprise Server requires that an X server has been configured.
1. Download the JReport Enterprise Server installation file for UNIX EntSvrSetup.sh from the Jinfonet
download center: http://www.jinfonet.com/downloadjreport/.
If you need to transfer the installation file from your download machine to your UNIX box, you
should transfer it using FTP in binary mode. Although the installation file is named with a .sh
suffix, it is a binary file.
2. Click the executable file EntSvrSetup.sh to launch the InstallShield Wizard. Alternatively, you can
open a console window, and change the directory to the location of the EntSvrSetup.sh file.
Following are examples of the commands that can be used:
$ cd /opt/JReport/Server (or your preferred install location)
To make EntSvrSetup.sh executable, type the command:
$ chmod +x EntSvrSetup.sh
Run EntSvrSetup.sh:
$ ./EntSvrSetup.sh
The InstallShield Wizard will first locate a JVM to get started. If no JVM is found, the installer will
fail to launch. To solve this issue, you can specify a JVM for InstallShield Wizard with the option is:javahome as follows:
$ ./EntSvrSetup.sh -is:javahome /opt/j2sdk1.4.2_02
Note: The option -is:help (only for UNIX) can be used to list all the InstallShield Command
Line Options:
$ ./EntSvrSetup.sh -is:help
3. Once the InstallShield Wizard has successfully loaded, you can follow the standard prompts to
install JReport Enterprise Server.
Installing silently
JReport provides four script files for installing JReport Enterprise Server silently without user
participation in the installation process. They are ServerV9_typical.script for the Typical Installation for
Standalone Server type, ServerV9_custom.script for the Custom Installation for Standalone Server
type, and ServerV9.script using which you can specify either of the two installation types. You can
choose a script file according to your requirements.
Follow the steps below to install JReport Enterprise Server silently:
1. Download a script file from the Jinfonet website, for example, ServerV9_typical.script.
2. Some built-in demo report sets (\SampleReports\*.cls) with HSQLDB as the data source (server\db
\demo.script) have been provided. At the end of the installation, the installer will configure the
report sets and catalog to the correct data path. This calls some AWT classes that require GUI
support.
So, if you have an X server installed, you should set the Display variable so that this step can be
performed successfully.
$ DISPLAY=hostname(or IP address):0.0
$ export DISPLAY
Note: If you do not have X server or a pure text environment, this step can be ignored.
However, you may find that the demo report sets will not be able to run after you start the
JReport Enterprise Server due to having the wrong default data source path. In which case,
you can use JReport Designer to publish some working report sets for testing purposes.
3. Run the following command, and JReport Enterprise Server will be installed in the designated
path:
$ sh EntSvrSetup.sh -options ServerV9_typical.script -silent
Notes:
●
●
When installing JReport Enterprise Server silently, make sure you do not use overwrite installation,
instead, install the server to a new directory.
When you install the Update or Service Pack silently, edit the script file update.script in
<install_root>\help\server\en\samples to your own requirements. This file is used to create an
option file (i.e. response file) for the Installation Wizard. It predefines all the information that is
required for the installation.
You can also create a script file and save it as follows:
-W
-W
-W
-W
bean13.selection=1
spcheck.installdir="/usr/local/JReport/Server"
KeyCheckBean.uid=UID
KeyCheckBean.key=Password
Modify the above lines according to your own environment and configurations.
Installing using the console interface
JReport enables you to perform an interactive installation from a command prompt on platforms that
do not have GUI. In this way, you are able to see the installation status and follow the installation
process.
Take the following steps to perform console installation:
1. Launch the installation program (EntSvrSetup.sh for UNIX/Solaris, EntSvrSetup.exe for Windows)
from the Jinfonet download center: http://www.jinfonet.com/downloadjreport/.
2. Run the following command:
For UNIX/Solaris:
$ chmod +x EntSvrSetup.sh
$ sh EntSvrSetup.sh -console
For Windows:
$ EntSvrSetup -console
3. Make decisions following the installation process.
Installing on UNIX manually
In some rare cases, JReport Enterprise Server may fail to install on UNIX directly. In this case, follow
the steps below to install it manually:
1. Install JReport Enterprise Server on Windows following the steps in section Installing on Windows
2000/XP/2003, but don't start it.
2. Prepare a directory on UNIX where you will copy the installation, for example /opt/JReport/
Server.
3. Modify javahome and reporthome in the following files to the UNIX directory to which you are
going to copy the release. Be sure to modify them carefully. Any mistake may cause problems.
report.ini
servlet.properties
setenv.sh
4. Delete the file server.properties from <install_root>\bin if it exists and remember to reset the
required configuration settings on the JReport Administration page (8889 as the default port) after
launching JReport Server on Unix. The server.properties file is created if you use the custom
format to install.
5. Make a zip or jar archive of the above folders, and then copy it to your UNIX system (use binary
format if using FTP).
6. Extract the folder in the destination directory in accordance with the path defined in the property
files.
7. Use the dos2unix command to convert all the .sh files under <install_root>/bin to the format that
can be recognized by Unix. You can execute the command like this:
$ dos2unix *.sh
8. Use the chmod command to set the converted files under <install_root>/bin to have read, write
and execute permission. You can execute the command like this:
$ chmod 777 *.sh
9. Start a shell (Console) and login as root or become the root user by running the su command.
Make JREntServer.sh executable and then start JReport Enterprise Server by running ./
JREntServer.sh.
Uninstalling
Use either of the following methods to remove JReport Enterprise Server:
●
●
From the Control Panel, open Add or Remove Programs, and then select JReport Enterprise
Server 9.0.0.900 to uninstall it.
Run uninstaller.exe (uninstaller.sh) in <install_root>\_uninst.
Note: The uninstaller will remove all the files generated by the installer, while the files that are created
later by the program will be retained. They should be removed manually.
Solving installation problems
Below are some known problems you may encounter during the installation. In the event of this
happening, see this section first before seeking help.
JReport Enterprise Server installer cannot find JVM
To perform the installation, the JReport Enterprise Server installer must find and verify a suitable JVM.
However, in rare cases, the installer cannot pass the JVM verification procedure. You will get an error
such as JVM not found even when there is already a JDK installed. The steps below describe a method
for bypassing the JVM verification process during installation. Here JReport Enterprise Server for UNIX
is used as the example for the steps:
1. Download the JReport Enterprise Server installation file EntSvrSetup.sh into a directory from the
Jinfonet download center: http://www.jinfonet.com/downloadjreport/.
2. Open a console and go to the directory where you saved your installation file. Then use the
command:
$ sh EntSvrSetup.sh -is:extract
to extract the installation file. This option creates a temporary folder (for example, named
istemp39400) in the current directory, and then extracts installation files into the new directory.
Note: For a Windows machine, no folder will be created. You will find the extracted files in
the current directory.
3. Go to the new directory, and run $ java -jar EntSvrSetup.jar.
This will launch a GUI installer. Follow the steps in section Installing using the Installation Wizard
to finish the installation.
No enough space for the temp directory
The InstallShield Wizard will generate temporary files during installation. You can specify the temp
directory with the -is:tempdir option as below. Otherwise, a system temp directory will be used, in
which case, make sure that there is enough space for the temporary files. If there is not enough space,
a warning dialog will be shown. The temporary files are removed automatically once the installation is
complete.
EntSvrSetup.exe -is:tempdir c:\temp
or
$ sh EntSvrSetup.sh -is:tempdir /tmp
If you run into any problems when installing JReport Enterprise Server, you can use this command to
log the debug messages:
EntSvrSetup.exe -is:log c:\DebugMessage.txt
or
$ sh EntSvrSetup.sh -is:log /tmp/DebugMessage.txt
Feel free to send your questions to support@jinfonet.com.
JReport Enterprise Server reporthome directory overview
This section provides a general view of the directories in the JReport Enterprise Server installation root,
including what they contain, what they are used for, and how to set their location if possible.
The following is a list of the server reporthome directories (the directories in italic are demo related):
Directory
Contents
Directory location Configurability
_uninst
Files used for uninstalling the JReport
Enterprise Server
Fixed.
bin
Command, configuration, and
properties files
Fixed.
db
Demo report sets' database
Optional.
Demo
Demo report sets used in Tutorial
lessons
Fixed.
dynamicclasses
UDS jar/zip files
The directory location can be specified by
the server.dynamic.class.dir property in
the server.properties file in
<install_root>\bin.
font
TTF font
The directory location can be specified by
-Djreport.server.font.path or by the
server.font.path property in the server.
properties file in <install_root>\bin.
help
Help documents introducing the
function, features and usage of the
JReport Enterprise Server and JReport
Designer together with tutorial
lessons.
Fixed.
history
Version files
The directory location can be specified by
the servlet.jrserver.initArgs property in
the servlet.properties file in
<install_root>\bin.
If it is in a clustered environment, the
directory location can be specified by the
resource.share.hist.dir property in the
server.properties file in <install_root>
\bin.
images
Public images for DHTML
Fixed.
jreports
Demo report sets.
Fixed.
When scheduling a task to disk, the
directory refers to the destination root
of the server resource tree.
lib
Library files required by JReport
runtime
Fixed.
logs
Log files
The directory is the default location for
log files.
ntservice
Files for C program and for writing a
Windows NT-service to run JReport
Enterprise Server
Fixed.
prestart
Reads customized configuration for
launching JReport Console and
Administration pages from the Start
menu.
Fixed.
profiling
Profiling related files
Fixed.
properties
Default location for JReport Enterprise
Server system database
The directory location can be specified
using the URL option in the System DB's
Configuration tab of the JReport
Administration > Data page.
public_html
Standalone web app folder
Fixed.
realm
Realm files
Fixed, except in a clustered environment.
The directory location can be specified by
the resource.share.realm.dir property in
the server.properties file in
<install_root>\bin.
resources
Language packages for specifying
JReport Enterprise Server and JReport
Web UI language.
Fixed.
scratchdir
Output files of compiled JSPs
The directory location can be specified by
the servlet.jspservlet.initArgs property in
the servlet.properties file in
<install_root>\bin.
script_files
Script files for creating and deleting
system database tables
Fixed.
style
CSS style files and style group files
The directory location can be specified by
stylePath in the report.ini file in
<install_root>\bin.
temp
Engine temp files and Server temp
result files
For Engine temp files, the directory
location can be specified by tempPath in
the report.ini file in <install_root>\bin.
Fixed for Server temp result files, except
in a clustered environment:
The directory location can be specified by
the resource.share.temp.dir property in
the server.properties file in
<install_root>\bin.
txtdriver
Demo report sets' flat data files
Optional.
Upgrading from a Previous Version
Upgrading a standalone JReport Enterprise Server and an integrated JReport Enterprise Server involves
different processes while sharing some common steps. Both updated JReport Enterprise Servers require
converting the report resources in the old version in order to comply with the new server version.
Upgrading in a standalone environment
JReport Enterprise Server 9 provides two migration tools in <install_root>\bin folder, which can help
you to convert all the resources on the previous version of JReport Enterprise Server before version
6.0. Resources the migration tools cover include the security information (realm, user, group,
protection, and ACL), report resources (catalog and report sets), scheduled tables, completed tables,
version and version tables, and other relevant information (such as fonts, NLS, and style groups).
For versions later than V6.0 (included), the upgrade is performed automatically by JReport Enterprise
Server 9. You need only install JReport Enterprise Server 9 into the same directory as the old server
version.
Note: When installing the JReport Enterprise Server 9 into the same directory as the old version, the
report level resources in the old version will be maintained and not be replaced by the report resources
of V9.
Upgrading a version between V5.2 Build 590 (included) and V6 (excluded) to
V9
You can make the upgrade using the migration tool MigrationV52.bat (MigrationV52.sh for UNIX) that is
available in the <install_root>\bin folder. This tool is used to convert all the resources of the
versions between V5.2 Build 590 (included) and V6 (excluded) to the resources of JReport Enterprise
Server 9. If you install the new version to the same folder as the old one, the parameter can be
omitted.
●
Usage
MigrationV52 [orgReportHome]
Options
●
❍
orgReporthome
The reporthome of the original JReport Enterprise Server. If this parameter is not provided, the
reporthome of JReport Enterprise Server 9 will be used as its value.
Case 1: Installing JReport Enterprise Server 9 to a new folder (recommended)
1. Provided that the old JReport Enterprise Server is located in C:\JREntServer595. Install JReport
Enterprise Server 9 to a new folder C:\JReport\ServerV9. DO NOT start the newly installed
JReport Enterprise Server.
2. In the DOS window, switch to <install_root>\bin, and run MigrationV52 C:\JREntServer595.
Case 2: Installing JReport Enterprise Server 9 to the folder where the old version resides
1. Provided that the old JReport Enterprise Server is located in C:\JREntServer595. Install JReport
Enterprise Server 9 to the same location. DO NOT start the newly installed JReport Enterprise
Server.
2. In the DOS window, switch to <install_root>\bin, and run MigrationV52.bat.
Upgrading a version earlier than V5.2 Build 590 (excluded) to V9
You can do the upgrade using the migration tool MigrationBV52.bat (MigrationBV52.sh for UNIX) that is
available in the <install_root>\bin folder. This tool is used to convert all the resources of versions
lower than V5.2 Build 590 to the resources of JReport Enterprise Server 9. If you install the new
version to the same folder as the old one, the parameter can be omitted.
●
Usage
MigrationBV52 [orgReportHome]
Options
●
❍
orgReporthome
The reporthome of the original JReport Enterprise Server. If the parameter is not provided, the
reporthome of JReport Enterprise Server 9 will be used as its value.
Case 1: Installing JReport Enterprise Server 9 to a new folder (recommended)
1. Provided that the old JReport Enterprise Server is located in C:\JREntServer580. Install JReport
Enterprise Server 9 to a new folder C:\JReport\ServerV9. DO NOT start the newly installed
JReport Enterprise Server.
2. In the DOS window, switch to <install_root>\bin, and run MigrationBV52 C:\JREntServer580.
Case 2: Installing JReport Enterprise Server 9 to the folder where the old version resides
1. Provided that the old JReport Enterprise Server is located in C:\JREntServer580. Install JReport
Enterprise Server 9 to the same location. DO NOT start the newly installed JReport Enterprise
Server.
2. In the DOS window, switch to <install_root>\bin, and run MigrationBV52.bat.
Upgrading in an integration environment
1. Suppose that you already have a standalone JReport Enterprise Server 9, whether it is installed
directly or upgraded from a previous version. In this step you need not convert the old version
reports.
2. Use the JReport Enterprise Server 9 to create a self-contained WAR/EAR file. If your JReport
Enterprise Server 9 is installed directly, you can use the Installation Wizard to generate the WAR
during installation. For information on how to create the WAR/EAR, see Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
3. Use the Java application server that integrates the previous version of JReport Enterprise Server
to deploy the new self-contained WAR/EAR and update the old WAR/EAR with the new.
By now, if the previous version of JReport Enterprise Server is later than V6.0 (included), the
integrated JReport Enterprise Server has already upgraded to V9. But if the previous version is
earlier than V6.0, go to step 4 and you need do further upgrade.
4. For a previous version between V5.2 Build 590 (included) and V6 (excluded): in the DOS window,
switch to <reporthome>\bin, and run MigrationV52.bat.
For a previous version earlier than V5.2 Build 590 (excluded): in the DOS window, switch to
<reporthome>\bin, and run MigrationBV52.bat.
Launching
After you have installed JReport Enterprise Server, you must set up the reporting environment and
start it before you can access it via a web browser. This chapter provides you with detailed information
of how to run JReport Enterprise Server in different running modes.
The following topics are discussed in this chapter:
●
Setting up the reporting environment
●
Running as a standalone server
●
Running as an OS service
●
Running within an application server
Setting up the reporting environment
Now that you have installed JReport Enterprise Server, you can start it. However, it is better to first
check the reporting environment to see whether you have published the report sets including the
catalog files, added the necessary class paths, and set up the data sources.
Report set publishment & creation
The separation of the report set file and the data is powerful. It facilitates easy re-use of the report
set's layout. Report set files built with JReport Designer can then be published to JReport Enterprise
Server for running in the thin-client/server mode. Today, computing is a service-based model in which
web based applications are rapidly replacing monolithic fat-client hosted and maintained software
applications. JReport Enterprise Server is a high performance server for running report sets on demand
or unattended on a scheduled basis. In this environment, thousands of clients may view, print and
generate new report sets.
JReport Enterprise Server has its own resource tree with each node mapping to a folder or file in your
physical drive. So when publishing report set files to the server, it is recommended that you check:
●
Whether the report set files reside somewhere in the server machine.
●
Whether the files are mapped in the resource tree.
●
That not only the report set files, but also the catalog files (including the .fml file) exist and are in
the same directory. In addition, one directory can only contain one catalog. However, it can contain
many report set files which use that catalog.
Data sources
You may have your own catalogs and report sets that you developed, and want them to be run and be
distributed by JReport Enterprise Server. In order to do this, the data sources used by your catalogs
must be correctly set to the runtime environment of JReport Enterprise Server.
User data source
Append the class path of your user class files to the first item of the class path set in your batch file or
command line that starts JReport Enterprise Server. If you are using JReport Enterprise Server
embedded in an application server, add your user class files to the WAR file used to deploy JReport
Enterprise Server.
Additional class paths
If your report sets reference any external classes, you will need to add them to the class path option in
the batch file and command line that starts JReport Enterprise Server. For example, if your report sets
contain user defined objects (UDO) or user defined formula functions, do not forget to add them to the
class path or to the WAR file.
Running as a standalone server
JReport Enterprise Server can be started from the web application server contained in the JReport
Enterprise Server package. This section explains how to start JReport Enterprise Server as a standalone
report server, how to send commands to the server and how to use the batch files in the
<install_root>\bin directory.
●
Starting using launch files
●
Starting using Java
●
Sending commands to JReport Enterprise Server from Java
●
Running without a GUI
Starting using launch files
After you have installed JReport Enterprise Server, many batch files are automatically generated in
<install_root>\bin. They are for assisting you with using and maintaining JReport Enterprise Server.
All of these batch files can be edited to suit different circumstances. However, make sure that you
understand their functions when you want to edit them.
The following are the JReport Enterprise Server launch files.
browser.bat
This tool detects the default client browser and installation path. It is invoked by launchpad.bat.
CmdSender.bat/CmdSender.sh
This tool is for sending commands to JReport Enterprise Server. If the option "-s" or "-p" is not used,
the JVM system property "reporthome" must be defined so that CmdSender.bat/CmdSender.sh will use
it to get data from the local machine.
Usage
cmdsender [-s:<server> -p:<port> -u:<user>] -w:<password>
admin|shutdown|localshutdown|(local:on|off)
Options
●
●
●
●
●
●
●
●
-s
The server host name.
-p
The administration port.
-u
The admin user name.
-w
The admin password.
shutdown
Shuts down the server.
localshutdown
Shuts down the local server.
local
The administration tasks are available to local host only.
gc
Run the Java garbage collector.
DBMaintain.bat/DBMaintain.sh
This tool is for administrators to backup and restore JReport Enterprise Server data. It is invoked by
the following command line:
Usage
DBMaintain -[?|cleanup|B<[systables|profiling]:<filename>>|R<[systbales|profiling]:<filename>>]
Options
●
●
●
-?
Displays the usage information and then exits.
-cleanup
Checks integrality of the server data and cleans up the invalid data.
-Bsystables:<filename>/-Bprofiling:<filename>
Backup the data in the systable database with the related data to a specified file.
For example, for backing up the server data systables to file c:\jsback.dat, you can type:
DBMaintain -Bsystables:c:\jsback.dat
●
●
-B0systables:<filename>/-B0profiling:<filename>
Only backup the data in the systable database.
-Rsystables:<filename>/-Rprofiling:<filename>
Restore the data including the related data outside the systable database from a specified file.
For example, for restoring server data systables from the file c:\jsback.dat, you can type:
DBMaintain –Rsystables:c:\jsback.dat
●
-R0systables:<filename>/-R0profiling:<filename>
Only restore the data in the systable database.
DJREntServer.bat/DJREntServer.sh
This tool is used to launch JReport Enterprise Server with debug and log information. The output log
files are in the <install_root>\logs directory. In case of problems, you may run this batch to
reproduce the problem. Open the files to see the detail information and find out the problem. Send the
log files to support@jinfonet.com if you are unable to resolve the problem.
Usage
DJREntServer [-?|-p <port>|-ap <adminport>|-realm <realmname>|-l backlog|-m <max>
|-t <timeout>|-s <filename>|-web <directory>|-env|-silent|
|-local|-vDebug|-vError|-jrs.admin.server <host:port>|-cleanup]
Options
●
●
●
-?
Prints this help message.
-p <port>
The port number to listen on.
-ap <adminport>
The port number which is used by the administration tools.
●
●
●
●
●
●
●
●
●
●
●
●
●
-realm <realmname>
Specifies the active realm.
-l <backlog>
The maximum queue length for incoming connections.
-m <max>
The maximum number of connection handlers.
-t <timeout>
The connection timeout in milliseconds.
-s <filename>
The servlet property file name. If this option is not used, the file servlet.properties in <install_root>
\bin will be used as the servlet property file when launching JReport Enterprise Server.
-web <directory>
The root directory when accessing the server via the web, its default value is <intall_root>
\public_html.
-env
Prints the environment.
-silent
No output is sent to the console.
-local
The administration tasks are available on local host only.
-vDebug
Enables JReport Engine to output messages to a file and sets all log files' trace levels to INFO and
error levels to WARN.
-vError
Enables JReport Engine to output messages to a file and sets all log files' trace levels to OFF and
error levels to ERROR.
-jrs.admin.server <host:port>
The admin server host and RMI port.
-cleanup
Checks integrality of the server data and cleans up the invalid data.
JREntServer.bat/JREntServer.sh
This tool is used to launch JReport Enterprise Server in standalone mode without any predefined
options.
On Windows, you can start server by double-clicking on JREntServer.bat. If you cannot start the server
successfully in this way, the reason will be displayed in the MS-DOS command prompt.
Usage
JREntServer [-?|-p <port>|-ap <adminport>|-realm <realmname>|-l backlog|-m <max>
|-t <timeout>|-s <filename>|-web <directory>|-env|-silent|
|-local|-vDebug|-vError|-logall|-jrs.admin.server <host:port>|-cleanup]
Options
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
-?
Prints this help message.
-p <port>
The port number to listen on.
-ap <adminport>
The port number which is used by the administration tools.
-realm <realmname>
Specifies the active realm.
-l <backlog>
The maximum queue length for incoming connections.
-m <max>
The maximum number of connection handlers.
-t <timeout>
The connection timeout in milliseconds.
-s <filename>
The servlet property file name. If this option is not used, the file servlet.properties in <install_root>
\bin will be used as the servlet property file when launching JReport Enterprise Server.
-web <directory>
The root directory when accessing the server via the web, its default value is <intall_root>
\public_html.
-env
Prints the environment.
-silent
No output to the console.
-local
The administration tasks are available on local host only.
-vDebug
Enables JReport Engine to output messages to a file and sets all log files' trace levels to INFO and
error levels to WARN.
-vError
Enables JReport Engine to output messages to a file and sets all log files' trace levels to OFF and
error levels to ERROR.
-log[:file Name] (deprecated)
Outputs JReport Engine messages to the log file as specified and uses the -vDebug level.
-logall
Sets all loggers' trace level to INFO and error level to WARN.
-jrs.admin.server <host:port>
The admin server host and RMI port.
●
-cleanup
Checks integrality of the server data and cleans up the invalid data.
Note: You may need to set an appropriate -Dfile.encoding option in the file to start JReport Enterprise
Server in order to view characters correctly.
jrenv.bat/jrenv.sh
This tool is for generating the report environment file report.env in the current directory. This file can
help the Jinfonet support staff assist you when you run into problems.
launchpad.bat
This tool is used to launch JReport Enterprise Server in the standalone mode and open the JReport
Server Launch Pad page.
makewar.bat/makewar.sh
See here.
MigrationBV52.bat/MigrationBV52.sh
This tool is used to convert all the resources from JReport versions which are lower than V5.2 Build 590
to the resources of JReport Enterprise Server V8. If you install the new version to the same folder as
the old one, the parameter can be omitted.
Usage
MigrationBV52 [orgReportHome]
Options
●
orgReporthome
The reporthome of the original JReport Enterprise Server. If this parameter is not provided, the value
of "reporthome" of new JReport Enterprise Server will be used as its value.
MigrationV52.bat/MigrationV52.sh
This tool is used to convert all the resources of which the versions are between V5.2 Build 590
(included) and V6 (not included) to the resources of JReport Enterprise Server V8. If you install the
new version to the same folder as the old one, the parameter can be omitted.
Usage
MigrationV52 [orgReportHome]
Options
●
orgReporthome
The reporthome of the original JReport Enterprise Server. If this parameter is not provided, the value
of "reporthome" of new JReport Enterprise Server will be used as its value.
NJREntServer.bat/NJREntServer.sh
This tool is used to launch JReport Enterprise Server without JIT option. If your server often crashes
with JIT option, try this batch file instead of JREntServer.bat.
Usage
NJREntServer [-?|-p <port>|-ap <adminport>|-realm <realmname>|-l backlog|-m <max>
|-t <timeout>|-s <filename>|-web <directory>|-env|-silent|
|-local|-vDebug|-vError|-logall|-jrs.admin.server <host:port>|-cleanup]
Options
●
●
●
●
●
●
●
●
●
●
●
●
●
-?
Prints this help message.
-p <port>
The port number to listen on.
-ap <adminport>
The port number which is used by the administration tools.
-realm <realmname>
Specifies the active realm.
-l <backlog>
The maximum queue length for incoming connections.
-m <max>
The maximum number of connection handlers.
-t <timeout>
The connection timeout in milliseconds.
-s <filename>
The servlet property file name. If this option is not used, the file servlet.properties in <install_root>
\bin will be used as the servlet property file when launching JReport Enterprise Server.
-web <directory>
The root directory when accessing the server via the web, its default value is <intall_root>
\public_html.
-env
Prints the environment.
-silent
No output to the console.
-local
The administration tasks are available on local host only.
-vDebug
Enables JReport Engine to output messages to a file and sets all log files' trace levels to INFO and
error levels to WARN.
●
●
●
●
●
-vError
Enables JReport Engine to output messages to a file and sets all log files' trace levels to OFF and
error levels to ERROR.
-log[:file Name] (deprecated)
Outputs JReport Engine messages to the log file as specified and uses the -vDebug level.
-logall
Sets all loggers' trace level to INFO and error level to WARN.
-jrs.admin.server <host:port>
The admin server host and RMI port.
-cleanup
Checks integrality of the server data and cleans up the invalid data.
register.bat
It is invoked by browser.bat.
RMIAuthFileCreator.bat/RMIAuthFileCreator.sh
This tool is used to generate the rmi authentication file. JReport Enterprise Server uses the
authentication file to secure remote objects. If no argument was provided, an authentication file named
"rmi.auth" will be created in <install_root>\bin, using the userid and install key of JReport
Enterprise Server.
Usage
RMIAuthFileCreator [authFileName [userid key]]
Options
●
●
●
●
?
Shows the usage message.
authFileName
The RMI authentication file name. If only input this argument, the userid and install key of JReport
Enterprise Server will be used to create the authentication file.
userid
The user ID, which will be used to generate the contents of the authentication file.
key
The key which will be used to generate contents of the authentication file.
rp.bat/rp.sh
This tool is for replacing user ID and license key.
Usage
rp UID Key
rptconv.bat/rptconv.sh
This tool is for converting old report schema to be current with Version 8.
Usage
rptconv "-source=source_path" ["-target=destination_path"] [-r] [-s]
Options
●
●
●
-source
Specify the source path of the reports that are to be converted.
-target
Specify the destination path for the converted report(s).
-r
Replace the source report with the converted version.
If this option is set, ["-target=destination_path"] is ignored.
If both "-r" and "-target" are not specified, the converted reports are saved in the same directory as
the source reports and named as "converted_SourceReportName".
●
-s
Convert all the reports in the specified directory, including the reports in all subdirectories.
Examples
●
To convert a single report:
rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls" "–
target=C:\temp"
This will convert C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls to C:\temp
\InvoiceReport.cls.
rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls" "–
target=C:\temp\1.cls.xml"
This will convert C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls, save the converted
report to C:\temp, and name it as "1.cls.xml" (if license allows).
rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls"
This will convert C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls, save the converted
report in the same directory, and name it as "converted_InvoiceReport.cls".
rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls" -r
This will overwrite C:\JReport\Server\jreports\SampleReportss\InvoiceReport.cls.
●
To convert all reports (*.cls, *.rpt, *.clx, *.cls.xml) in a directory:
rptconv "-source=C:\JReport\Server\jreports" "–target=C:\temp"
This will convert all the reports in C:\JReport\Server\jreports and save the converted reports to C:
\temp. The converted reports use the same file names as source reports.
rptconv "-source=C:\JReport\Server\jreports" "–target=C:\temp" -s
This will convert all the reports in C:\JReport\Server\jreports and in the subdirectories and save the
converted reports to C:\temp. The converted reports take the same file names and directory
structure as source reports.
rptconv "-source=C:\JReport\Server\jreports" "–target=C:\temp\*.cls" -s
This will convert all the reports in C:\JReport\Server\jreports and in the subdirectories and save the
converted reports to C:\temp. The converted reports take the same directory structure as source
reports and the suffixes of their file names are all changed to ".cls".
rptconv "-source=C:\JReport\Server\jreports" -r -s
This will convert all the reports in C:\JReport\Server\jreports and in the subdirectories. The
converted reports overwrite the source reports.
rptconv "-source=C:\JReport\Server\jreports"
This will convert all the reports in C:\JReport\Server\jreports. All the converted reports are saved in
the same directory and named as "converted_SourceReportName".
●
To convert a type of reports with same suffixes in a directory:
The usage is similar to converting a directory. You can specify the wildcard to filter reports, for
example:
rptconv "-source=C:\JReport\Server\jreports\SampleReports\*.cls" "–target=C:\temp"
This will convert all the reports with the suffix ".cls" in C:\JReport\Server\jreports
\SampleReports and save the converted reports to C:\temp.
Notes:
●
●
There must be one and only one catalog file in the directory where the reports to be converted
reside.
If the reports to be converted contain UDO or UDF, make sure the corresponding classes or jars are
included in the class path of rptconv.bat/rptconv.sh.
startAdministration.bat
This tool is used to launch the JReport Administration page from the Start menu after the server is
started.
startConsole.bat
This tool is used to launch the JReport Console page from the Start menu after the server is started.
stopServer.bat
This tool is used to exit JReport Enterprise Server from the Start menu.
stopServer.sh
This tool is used to exit JReport Enterprise Server.
Starting using Java
The class of the standalone server is jet.server.JREntServer. You can start JReport Enterprise Server
with the following command instead of using the generated batch files:
JAVA -classpath <classpath> -Djava.compiler=NONE -Dreporthome=<install_root> jet.server.
JREntServer [options]
●
●
●
●
●
-classpath
The class path must include the following packages originally in your <install_root>\lib:
JRESServlets.jar; JREntServer.jar; JREngine.jar; servlet.jar; log4j-1.2.8.jar;
-Djava.compiler=NONE
This is without JIT. This is not a required option. However, if you encounter problems running the
server and you think that they relate to the Java VM, you can try turning off the JIT compiler and
then running again.
-Djreport.url.encoding
Specify the encoding to encode/decode escape characters in URL strings. If not specified, the system
default encoding will be used. For example: java ... -Djreport.url.encoding=8859-1...
-Dreporthome
This is where JReport Enterprise Server is installed. It is the Destination Location you specified when
you installed it. This option is required. When you set the reporthome, upon launching, JReport will
try to find the jslc.dat and report.ini files in <install_root>\bin and check whether they are valid.
Jslc.dat is the License control file. Open report.ini, and you will find the configuration information,
including the temp, template and the help path. JReport will use the temp path to export the
temporary files so you should make sure that the temp folder specified in report.ini exists and has
space available.
[options]
Option
Description
-?
Print brief help message.
-p port
The port that this server listens on, default is 8888.
-ap adminport
The port number that the remote administration uses, default is 8889.
-l backlog
Maximum length of queue for incoming connection indications.
-m max
Maximum number of connection handlers.
-t timeout
Connection timeout in milliseconds.
-s filename
Servlet property file name.
-realm realmname
Active realm when the server starts up.
The specified realm should exist, otherwise the server will use an existing
realm as the active realm. The server will then record a warning message in
the log file, and set the selected active realm by the server.realm.active
property in the server.properties file.
-web directory
Web application server root directory, default is <intall_root>\public_html.
-local
Administration on local host only.
-vDebug
Enables JReport Engine to output messages to a file and sets all log files' trace
levels to INFO and error levels to WARN.
-vError
Enables JReport Engine to output messages to a file and sets all log files' trace
levels to OFF and error levels to ERROR.
-env
Print environment settings when the server starts up.
-silent
Outputs nothing, not even the server start information.
-log[:file Name]
(deprecated)
Outputs JReport Engine messages to the log file as specified and uses the vDebug level.
-logall
Sets all loggers' trace level to INFO and error level to WARN.
Notes:
●
●
For detailed information on how to configure the logging and debugging information, read the
LogConfig.properties file in <install_root>\bin.
Some of the common options will be used in later chapters. In addition, JReport has automatically
generated some batch files for you so that you do not have to write a complicated command line.
You can find these in the <install_root>\bin directory.
Sending commands to JReport Enterprise Server from Java
After JReport Enterprise Server has been started as a standalone server, you can send commands to
the server to either shut it down or pop up the user interactive interface for administration. All of these
can be done through the class jet.server.CommandSender. The full command is as follows:
JAVA -classpath <classpath> -Djava.compiler=NONE [-Dreporthome=<install_root>] jet.
server.CommandSender [-s:server -p:port] -w:password [-?]|admin|shutdown|gc|(local:on|
off)
●
●
●
●
●
●
●
●
●
●
●
●
-?
Prints brief help message.
-Djava.compiler=NONE
This is without JIT. This is not a required option. However, if you encounter problems running the
server and you think that they relate to the Java VM, you can try turning off the JIT compiler and
running again.
-Dreporthome
This is where JReport Enterprise Server is installed. It is the destination location you specified when
you installed it. It is required only if you do not execute the command from the local host on which
JReport Enterprise Server is running.
-Dpoperror=true
This property is used to control whether to pop up a message to show error information. The default
value is false which indicates that the error message will not be displayed.
-Classpath
The class path must include the following packages originally in your <install_root>\lib:
JRESServlets.jar; JREntServer.jar.
-s:server
Host name on which JReport Enterprise Server is running.
-p:port
The port JReport Enterprise Server used for administration. The default value is 8889.
-w:password
Password of the admin user. Example: -w:admin.
admin
A command sent to the server asking to pop up the user interactive interface for administering
JReport Enterprise Server.
shutdown
A command sent to the server asking it to shut down.
local:on
A command sent to the server asking to only allow the administration commands sent by the local
machine.
local:off
A command sent to the server asking to accept administration commands from anywhere.
●
gc
A command sent to the server asking the JVM to schedule the Java Garbage Collector.
Note: Some of the common options will be used in the later chapters. In addition, JReport has
automatically generated the batch file CmdSender.bat for you so that you do not have to write a
complicated command line.
Running without a GUI
Many environments, such as mainframe machines and dedicated servers, do not support a display,
keyboard, or mouse. JReport Enterprise Server supports Java headless implementation, in which case
you do not have to install a third-party tool, such as PJA, XWindows, or XVFB, in order to run JReport in
a non-GUI environment.
The method of using a third-party tool is no longer needed but is still available in this release. It may
be removed in the future.
●
Using Java headless implementation
●
Using a third-party tool (deprecated)
Using Java headless implementation
JReport Enterprise Server runs fluently in headless environments. What you need to do is make some
simple configuration changes before starting JReport Enterprise Server in headless environments.
Starting JReport Enterprise Server in a headless environment
To launch JReport Enterprise Server in a headless environment, follow the steps below:
1. Add -Djava.awt.headless=true as a JVM parameter before starting JReport Enterprise Server.
2. Start JReport Enterprise Server.
Notes:
●
●
If JDK 1.5 is used, it is not necessary to add the parameter -Djava.awt.headless manually,
because JDK 1.5 can automatically give a value to the parameter according to the environment the
server will run. For example, if it is headless, the true value will be given.
If you want to run JReport Enterprise Server in the headless mode in RedHat Linux with JDK 1.4, you
have to install a subset of the X11 libraries to allow headless mode Java applications to function
properly. For the detailed information about the libraries, see the below References section.
References
Here lists the minimal set of libraries needed to use JDK 1.4 under RedHat Linux. They are as follows:
●
libICE.so
●
libSM.so
●
libX11.so
●
libXext.so
●
libXp.so
●
libXt.so
●
libXtst.so
Using a third-party tool (deprecated)
The following introduces three ways to run JReport Enterprise Server on UNIX without GUI:
●
Running with XVFB
●
Running with PJA toolkit
●
Starting from a telnet session with an X server installed
Running with XVFB
XVFB is an acronym of the Xserver Virtual Frame Buffer. It can provide a virtual Xserver and release
you from the need of a real Xserver. It runs without a head or graphics card. XVFB is freeware and can
be obtained from x.org's X11R6 distribution. Compiling it is supposedly difficult, however, there are
some Solaris binaries on certain sites, including:
●
http://ferret.wrc.noaa.gov/Ferret/FAQ/graphics/Solaris_Xvfb.html
●
ftp.xfree86.org/pub/XFree86/3.3.6/binaries/Solaris
●
ftp.xfree86.org/pub/XFree86/4.0.1/binaries/Solaris
●
ftp.xfree86.org/pub/XFree86/4.0.1/binaries/Solaris-8
●
http://ferret.wrc.noaa.gov/Ferret/FAQ/graphics/Solaris_Xvfb.html
Take the following steps to run JReport Enterprise Server with XVFB:
1. Install XVFB.
2. To have XVFB start up automatically when a workstation boots, you can add the Virtual Frame
Buffer to the Automatic Startup. That is, write a script /etc/init.d/xvfb as below, and make it
executable.
#!/bin/sh
mode=$1
case "$mode" in
'start')
# start the X Virtual Framebuffer (Xvfb)
if [ -f /usr/X11R6/bin/Xvfb ]; then
echo "***Starting up the Virtual Frame Buffer on Screen 1***"
/usr/X11R6/bin/Xvfb :1 -screen 0 1152x900x8 &
fi
;;
*)
echo " Usage: "
echo " $0 start (start XVFB)"
echo " $0 stop (stop XVFB - not supported)"
exit 1
;;
esac
exit 0
Then create a soft link to /etc/rc2.d/S98xvfb:
ln -s /etc/init.d/xvfb /etc/rc2.d/S98xvfb
If you need not to start XVFB automatically, you can manually start up XVFB:
/usr/X11R6/bin/Xvfb :1 -screen 0 1152x900x8 &
3. Set DISPLAY to screen 1 (assuming that JReport Enterprise Server is running on machine jaguar).
DISPLAY=jaguar:1.0
export DISPLAY
Then, you can start JReport Enterprise Server. Logging out the terminal may result in JReport
Enterprise Server shutting down. To avoid this, you can first start JReport Enterprise Server in the
background using the command nohup: nohup ./JREntServer &. This command will continue running
programs specified by you and enables JReport Enterprise Server to ignore hangup signals.
Running with PJA toolkit
When there is neither X Window, nor XVFB available, a PJA (Pure Java AWT) Toolkit is supported to run
JReport Enterprise Server. This is a Java library for drawing graphics developed by eTeks. It supplies a
replacement AWT toolkit and eliminates the requirement of an X display. To use it:
1. Install PJA. The PJA package is not included in our product, go to http://www.eteks.com/pja/en/
to download PJA and install it.
2. Install JReport Enterprise Server.
3. Assuming that EntSvrSetup.sh has been used to install JReport Enterprise Server on a Non-GUI
platform, modify the file JREntServer.sh in <install_root>\bin by appending /pja_2.4/lib/
pjatools.jar to the class path, and add the following options.
❍
-Xbootclasspath/a:pja.jar - (changing class path is not enough).
❍
-Dawt.toolkit=com.eteks.awt.PJAToolkit - This enables the changing of AWT Toolkit.
❍
❍
❍
❍
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment - This enables the
changing of the Graphics environment.
-Djava2d.font.usePlatformFont=false - This avoids the class sun.java2d.loops.
RasterOutputManager calling the native method getPlatformFontVar(), which can cause a JVM
crash.
-Djava.awt.fonts=path - With path equal to the directory where the Lucida *.ttf files can be
found. You can add to the path other directories containing True Type Fonts by using a
separator.
Either -Duser.home=dir with dir equal to the directory where the sub directory lib containing
PJA font.properties file can be found, or add lib/font.properties to the user.home system
property.
Below is an example of the modified file JREntServer.sh that is used to start up JReport Enterprise
Server:
#!/bin/sh
CLASSPATH=$REPORTHOME/lib/commons-net-ftp-2.0.0.jar:
$REPORTHOME/lib/sac.jar:$REPORTHOME/lib/servlet.jar:
$REPORTHOME/lib/ant.jar:$REPORTHOME/lib/jasper-compiler.jar:
$REPORTHOME/lib/jasper-runtime.jar:$REPORTHOME/lib/JREngine.jar:
$REPORTHOME/lib/JRESServlets.jar:$REPORTHOME/lib/JREntServer.jar:
$REPORTHOME/lib/maintain.jar:$REPORTHOME/lib/mail-1.4.jar:
$REPORTHOME/lib/activation-1.1.jar:$REPORTHOME/lib/JRWebDesign.jar:
$REPORTHOME/lib/itext.jar:$REPORTHOME/lib/poiHSSF_151.jar:
$REPORTHOME/lib/xercesImpl.jar:$REPORTHOME/lib/xml-apis.jar:
$REPORTHOME/lib/hsqldb.jar:$REPORTHOME/lib/tar.jar:
$REPORTHOME/lib/jai_core.jar:$REPORTHOME/lib/jai_codec.jar:
$REPORTHOME/lib/commons-codec-1.2.jar:$REPORTHOME/lib/log4j-1.2.8.jar:
$REPORTHOME/lib/jsch-0.1.30.jar:$JAVAHOME/lib/tools.jar:$ADDCLASSPATH
cd $REPORTHOME/bin
$JAVAHOME/bin/java -Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment
-Djava2d.font.usePlatformFont=false
-Djava.awt.fonts=/usr/j2se/jre/lib/fonts:
/JREntServer/font:/usr/openwin/lib/X11/fonts/TrueType
-Dinstall.root=$REPORTHOME/ -Djreport.url.encoding=UTF-8 -Xmx512m
-Dreporthome=$REPORTHOME jet.server.JREntServer "$@"
Notes:
●
●
●
Printing reports is not supported.
To support multiple encoding, the file charsets.jar in jre\lib should be added to -Xbootclasspath.
Without this Jar file, only the default encoding (iso8859-1) can be applied to JReport. For the
encoding types which are supported by charsets.jar, refer to the website http://java.sun.com/
j2se/1.4.2/docs/guide/intl/encoding.doc.html.
If you are using other True Type Fonts instead of the fonts in X11, you should add the location of the
Lucida*.ttf files directory to -Djava.awt.fonts.
Related topics:
●
Installing JReport Enterprise Server silently
Starting from a telnet session with an X server installed
If you are using telnet to start JReport and your UNIX has an X server installed, you can directly point
your display to your X server:
$ DISPLAY=hostname(or IP address):0.0
$ export DISPLAY
Then, you can run JReport Enterprise Server or your application with JReport embedded.
Running as an OS service
JReport Enterprise Server can be configured as an OS service. This section shows you how to run
JReport Enterprise Server as a service of Windows XP, UNIX and Linux.
●
Running as a Windows Service
●
Running as a service on UNIX
●
Running as a service on Linux
Running as a Windows Service
A tool is provided to assist you in installing JReport Enterprise Server as a Windows Service. This tool
JRservice.exe can be found in <install_root>\bin.
You will get the following information if you run JRservice.exe without any options:
Usage:
JRService -install [-interactive] to install the service
JRService -remove
to remove the service
-interactive to enable JReport Enterprise Server service
to interact with the desktop
StartServiceCtrlDispatcher being called.
This may take several seconds. Please wait.
●
●
●
JRService -install
Running JRservice.exe with the -install option will install JReport Enterprise Server as a Windows
Service. If you open the Services item in the Control Panel, you will find a service named JReport
Enterprise Server in the list.
JRService -install -interactive
If you use the -interactive option together with -install, the service installed will be run in interactive
mode. That is, when you start the service, a Command Prompt Window will pop up. However, if you
don't specify this option when you install the service, the Command Prompt Window will not be
displayed on the window when you start the service. After you have installed JReport Enterprise
Server as a service, you will then be prompted to re-start your computer for the service installation
to take effect.
JRService -remove
Running JRservice.exe with -remove option removes the Windows service of JReport Enterprise
Server from Windows. However, before you run this, you should stop the service.
Configuring JReport Enterprise Server service
The parameters for the Windows service of JReport Enterprise Server are read from the file NTService.
ini in <install_root>\bin.
In this file you will find three parameters specified, as shown in the following example:
JavaVM="C:\jdk1.4\jre\bin\java.exe"
StartArg= "-Dinstall.root=C:\JReport\Server"
-classpath "C:\JReport\Server\lib\JREntServer.jar;
C:\JReport\Server\lib\JREngine.jar;C:\JReport\Server\lib\servlet.jar;C:\TEMP"...
-Djava.compiler=NONE -Dreporthome=C:\JReport\Server jet.server.JREntServer
ShutdownArg= "-Dinstall.root=C:\JReport\Server"
-classpath "C:\JReport\Server\lib\JREntServer.jar;
C:\JReport\Server\lib\JREngine.jar;C:\JReport\Server\lib\servlet.jar;C:\TEMP" ...
-Djava.compiler=NONE
-Dreporthome=C:\JReport\Server jet.server.CommandSender localshutdown
●
●
●
JavaVM
The path of the Java VM.
StartArg
The Java command line for launching JReport Enterprise Server as an independent web application
server. This will be called when the service is started.
ShutdownArg
The Java command line for shutting down JReport Enterprise Server. This is called when the service
is stopped.
Starting the service
There are two ways to start the JReport Enterprise Server service.
●
●
After the server has been installed as a service, it is by default configured to start automatically each
time. In other words, without otherwise modifying the Control Panel, the service will start
automatically each time Windows is started.
You can directly start the service through the Services item in the Control Panel. Open the Services
list, find JReport Enterprise Server on the list, select it and click the Start button.
You can change the options in the file NTService.ini in <install_root>\bin before you start the
service. In the example above, there are no options specified in StartArg. If you would like to set all
error log levels to WARN and trace log levels to INFO, you will need to append -logall at the end, as in
the following example:
...
StartArg= "-Dinstall.root=C:\JReport\Server"
-classpath "C:\JReport\Server\lib\JREntServer.jar;
C:\JReport\Server\lib\JREngine.jar;C:\JReport\Server\lib\servlet.jar;
C:\JReport\Server\lib\log4j-1.2.8.jar;C:\TEMP" -Djava.compiler=NONE
-Dreporthome=C:\JReport\Server jet.server.JREntServer -logall
...
Reference: For more information on the options available, see Starting JReport Enterprise Server
using Java.
Stopping the service
There are three ways for you to stop the JReport Enterprise Server service:
●
●
●
Open the Control Panel, go to Administrative Tools, double-click the Services item, select
JReport Enterprise Server, and then click the Stop button if it is not disabled.
Run the batch file CmdSender.bat in <install_root>\bin with the localshutdown argument, for
example: <install_root>\bin\CmdSender.bat localshutdown.
Use the Shut Down the Server button
on the JReport Administration page.
Note: All ODBC data sources used by the JREntSrv Service belong to the System DSN. System data
sources can be used by all users on a computer, and are visible to all users on the computer and
system-wide services, such as Microsoft Windows services. User data sources can only be used by the
current user and are visible only to that user. To establish JReport Enterprise Server as a service, you
should choose System Data Source. That is, define the data source in the System DSN. To do this,
open Data Source (ODBC) in Control Panel, and add the data source used by JReport Enterprise Server
to the System DSN panel. Also, remove any old ones from the User DSN.
Running as a service on UNIX
Assuming that JReport Enterprise Server has been installed to /user/report/jns,
1. Write a script /etc/init.d/jrserver as below, and make it executable.
#!/bin/sh
mode=$1
if [ ! -d /user/report/jns ]
then # JReport not installed
exit 1
fi
case "$mode" in
'start')
if [ -d /user/report/jns ]
then
echo "Starting JReport Enterprise Server"
/user/report/jns/bin/NJREntServer.sh &
fi
;;
'stop')
if [ -d /user/report/jns ]
then
echo "Stopping JReport Enterprise Server"
/user/report/jns/bin/CmdSender.sh localshutdown &
fi
;;
*)
echo " Usage: "
echo " $0 start (start JReport Enterprise Server)"
echo " $0 stop (stop JReport Enterprise Server)"
exit 1
;;
esac
exit 0
2. Create a soft link to /etc/rc2.d/S99jrserver.
ln -s /etc/init.d/jrserver /etc/rc2.d/S99jrserver
3. Create a soft link to /etc/rc0.d/K99jrserver.
ln -s /etc/init.d/jrserver /etc/rc0.d/K99jrserver
Running as a service on Linux
Running JReport Enterprise Server as an OS service on Linux is more or less the same as with running
on UNIX. Here it is assumed that your default start up rc is rc5.
Note: To run JReport Enterprise Server on Linux, your JDK version must be of version 1.4 or above.
Setting up XVFB
1. Install XVFB.
2. Write a script /etc/init.d/xvfb as below, and make it executable.
#!/bin/sh
mode=$1
case "$mode" in
'start')
echo "start xvfb "
if [ -f /usr/X11R6/bin/Xvfb ]
then
/usr/X11R6/bin/Xvfb :1 -screen 0 1152x900x8 &
fi
;;
*)
echo " Usage: "
echo " $0 start (start XVFB)"
echo " $0 stop (stop XVFB not support)"
exit 1
esac
exit 0
3. Create a soft link to /etc/rc5.d/S97xvfb.
ln -s /etc/init.d/xvfb /etc/rc5.d/S97xvfb
Using rc to run JReport Enterprise Server as a service
Assuming that JReport Enterprise Server has been installed to /JReport/Server.
1. Write a script /JReport/Server/bin/JREntServer as shown below, and make it executable. Here
it is assumed that JReport Enterprise Server is running on a machine with IP address 127.0.0.1.
#!/bin/sh
DISPLAY=127.0.0.1:1.0
export DISPLAY
/JReport/Server/bin/JREntServer -silent "$@"
2. Write a script /etc/init.d/jrserver as below, and make it executable.
#!/bin/sh
mode=$1
if [ ! -d /JReport/Server ]
then # JReport not installed
exit 1
fi
case "$mode" in
'start')
if [ -d /JReport/Server ]
then
echo "Starting JReport Enterprise Server"
cd /JReport/Server/bin/;
JREntServer -silent &
fi
;;
'stop')
if [ -d /JReport/Server ]
then
echo "Stopping JReport Enterprise Server"
/JReport/Server/bin/CmdSender localshutdown &
fi
;;
*)
echo " Usage: "
echo " $0 start (start JReport Enterprise Server)"
echo " $0 stop (stop JReport Enterprise Server)"
exit 1
;;
esac
exit 0
3. Create a soft link to /etc/rc5.d/S98jrserver.
ln -s /etc/init.d/jrserver /etc/rc5.d/S98jrserver
4. Create a soft link to /etc/rc5.d/K98jrserver.
ln -s /etc/init.d/jrserver /etc/rc5.d/K98jrserver
If all has been carried out successfully, the installation of the service will now have finished. JReport
Enterprise Server is now ready to run as a daemon process.
Running within an application server
In addition to running as a standalone server and as a service, JReport Enterprise Server can also run
as a servlet inside a Java application server. Since JReport Enterprise Server is implemented using
servlets and JSPs, it can work with any servlet-enabled web application server by assembling and
deploying JReport Enterprise Server as a Web Application Archive (WAR) or Enterprise Application
Archive (EAR).
There is a separate chapter about integration with different application servers - Integrating JReport
Enterprise Server with a Java Application Server. It provides a general method for creating the
deployable archive and detailed procedures for deploying the archive into some popular application
servers.
Basic Concepts
This chapter gives you some basic JReport Enterprise Server concepts. You can first go through this
chapter to gain a general understanding about JReport Enterprise Server before you use it. Also, while
you are using JReport Enterprise Server, if you do not understand any of the basic concepts, you can
refer to this chapter to get help.
This chapter discusses the following JReport Enterprise Server main concepts:
●
Background tasks
●
Interactive reporting
●
Scheduling
●
Resource
●
Version
●
Security
●
Integration
●
JReport Enterprise Server cluster
Background tasks
JReport Enterprise Server provides a background running system, which shows the status information
of tasks submitted using the Run, Advanced Run, or Background Run mode. Status information
includes: report name, report set path and name, catalog path and name, running format, time when
the task was started/completed, time elapsed since the task was performed, and the status of the task.
It allows you to view detailed information in a timely fashion.
The records saved in the background running system are cleared under the following conditions:
●
●
●
●
JReport Enterprise Server is restarted.
The maximum time limit specified for the report set result life has been reached. By default it is
86400 seconds (24 hours).
The maximum time limit specified for the interval between a user logout and login has been reached.
By default it is 300 seconds.
If the number of records exceeds the number specified for the background task list (by default it is
100 records), the latest 100 records will be retained.
Interactive reporting
JReport Enterprise Server provides you with interactive reporting of DHTML reports. DHTML allows you
to control objects such as images, buttons, text fields, checkboxes, radio buttons, and drop-down lists.
With interactive DHTML output, you can dynamically modify - filter, search, sort and drill - reports to
obtain unique and personal data views. The DHTML toolbar and interactive web objects can be
embedded into reports or JSPs at design time, enabling you to control, customize and navigate report
views. JReport further extends interactive reporting by empowering applications with ad hoc reporting.
You can define report criteria and layout at runtime to generate interactive ad hoc reports.
Related topics:
●
JReport Web - Interactive Reports
Scheduling
JReport Enterprise Server provides a scheduling system which you can customize to suit your
requirements. You can submit a scheduled task from web page and URL or by calling the server and
client API methods. However, before you can do this, you must first specify the report set, catalog,
task type and its launch type. In addition, you can also customize notification messages to notify others
of whether or not the task was executed successfully.
User Task
In order to provide the means to run tasks defined outside of JReport on JReport Enterprise Server,
and to just use JReport Enterprise Server's schedule function, JReport provides a task named User
Task. With this task, you can implement a customized task with the schedule properties. Also, you can
submit the user task from a web page, or by calling JReport Server API methods.
After creating a class that implements the UserTask interface in the jet.server.api package and adding
the class to the class path, you can then submit the task either from a server web page or by calling
server API methods. The task can then be run by the server at the scheduled times just as if it were a
report.
Trigger
The scheduling mechanism supports trigger conditions in addition to time conditions. Triggers are
managed by name in JReport Enterprise Server, so each trigger must have a unique name. After
creating a trigger, you can submit a task that is bound with the trigger, and then fire the trigger to
activate the task at anytime.
Trigger conditions are based on event driven modes. The server does not care whether a customized
condition is ready. It only waits there for trigger firing events. Therefore, you determine whether the
condition is ready before firing a trigger.
Triggers can also work together with time conditions for activating a scheduled task.
Related topics:
●
Scheduling report sets
Resource
JReport Enterprise Server provides a resource system for managing a group of archive versions that
can be processed or organized.
What is a resource
Generally, a resource refers to report set related material. To be exact, a resource in the JReport
Enterprise Server reporting system is a conceptual node. There are different types of resources, such
as catalogs, report sets, and report set results. A resource can only hold versions of the same type.
Resource tree
All the resources are organized in a folder-tree structure. JReport Enterprise Server defines an XML file
called admin.xml, and the resource tree conforms to this file. This file is maintained automatically by
JReport Enterprise Server.
For example, your company has two departments - Support and Marketing. Each department has its
report sets on their own machine. There are some report set documents that are submitted by the
departments located on the machine where JReport Enterprise Server runs. Now, suppose you are the
administrator, and you would like to organize these files and folders into the Resource Tree. The
following diagram may help you to figure out the framework on which you should build the resource
tree.
The resource tree consists of three layers: Folder layer, Resource layer, and Archive layer.
Folder layer: Basic resource tree element that builds the main framework for the resource tree. There
are two built-in folders in the root of the resource tree -- Public Reports and My Reports. A folder can
be mapped to a real file path.
Resource layer: An abstract layer, based on the Folder layer that hosts various types of archive
versions and provides user access to the versions.
Archive layer: A concrete layer, where the archive versions reside for executable report sets, report
catalogs, and report set results, which function as the leaves of the resource tree.
Public Reports and My Reports
There are two built-in folders in the resource tree root - Public Reports and My Reports. You can create
your own folders in either of them. The Public Reports folder and the My Reports folder cannot be
deleted.
The Public Reports folder contains public report set documents and executable report sets, and can be
accessed by everyone. All folders except for the personal folders are public folders.
The My Reports folder is a personal folder. It contains personal report set documents and executable
report sets. Each user has one personal folder, specified by the administrator when the user account is
created. The My Reports folder can only be accessed by its owner, and the user has full control over his/
her personal folder. This folder is the default output location for report sets run by the user.
Report set
A report set is a collection of reports. All reports in one report set may share the same query, dataset,
parameters, NLS and style group properties. Generally, reports in one report set are designed for the
same purpose, or for related purposes. JReport Enterprise Server supports viewing, running, scheduling
and managing of report sets.
An additional advantage of report sets is that all reports and subreports can share the same dataset
which means that only one query to the DBMS is required to run the reports and all of the subreports.
From a performance perspective, this is very important because if each subreport is a report set, then
each subreport will retrieve the data from the DBMS even though it may be identical to the main report
and other subreports.
The result version and the background run/scheduled/active/completed record are based on report set
level.
When viewing a report set directly, if DHTML is set as the default report view format, the report set
with all its reports will be run. Otherwise, only the default selected report will be run.
When using Advanced Run to run a report set, you can only select one report in the report set to run.
When using scheduling to publish a report set to the versioning system or to disk, the DHTML and
JReport Result formats are based on the report set level, that is, the report set with all selected reports
will be output to a single file. As for the other formats, each selected report will be output to a separate
file but you still have the convenience of scheduling all the reports with a single schedule entry.
Related topics:
●
Managing resources
Version
JReport Enterprise Server provides a versioning system for controlling the resources contained in the
resource tree. There are three different version types to select from: report set, catalog and result
versions.
To understand what the versioning system is, first you have to understand the resource mechanism in
JReport Enterprise Server. A resource in the JReport reporting system is a conceptual node, which
holds a group of archive versions that can be processed or organized in JReport Enterprise Server.
Information of these versions is stored in the System DB database that JReport Enterprise Server uses,
while version files are saved in the directory - <reporthome>\history.
There are three main types of resource nodes in the JReport folder-tree structure - catalogs, report
sets, and report set results. The three pink nodes are shown in the diagram below:
The System DB database stores archive versions in the three types of resource nodes. Thus, JReport
Enterprise Server refers to different node types to import archive versions into the resource tree for
being processed or organized by you.
What is a version
All the resources in the resource tree are controlled by versions. A version is the fundamental unit of
the resource tree, and your resources might change over time. JReport Enterprise Server uses a
versioning system to create and manage resources that have changed in content and properties owing
to updates issued upon them.
All the resources in the resource tree have versions. A large portion of resource management tasks are
done by managing resource versions.
Different version types
The versions in JReport Enterprise Server fall into the following three major categories:
●
●
Report Set Version
The version of a report set file.
Catalog Version
The version of a catalog file.
●
Result Version
The version of a report set result file.
The report set result can be generated and maintained in two places - the resource tree and the builtin version folder.
When you schedule a report set to publish to the versioning system, you can choose an archive
location to generate the report set result. You can generate the report set result in the built-in
version folder, the My Reports folder or the Public Reports folder in the resource tree.
The report set results generated in the resource tree are standalone results and can have their own
versions, while those generated in the built-in version folder can only be bound with their respective
report sets.
Real path of versions
If you check the property of a version, you will find its real path. Remember that version information is
stored to a database, and version files are stored in the directory <reporthome>\history. For the
report set InvoiceReport.cls, the report set version's real path is <reporthome>\history\1
\JReport_System_User894485281\InvoiceReport.cls, which is the actual report set result path on
disk and stored in the server database. That is, when you click the InvoiceReport.cls report set result
resource on the server interface, you are accessing it on the disk, only the path to it is stored in the
database. And this works the same for both the report set version and the catalog version. When
clicking the report set/catalog resource on the server interface, you are accessing a cls/cat file on disk.
Archive policy
JReport Enterprise Server uses an archive policy to control the resource versions. You can control
whether or not to use multiple versions for a specific resource. Also, you can define the maximum
number of versions that can be listed in the version table.
The archive policy can be applied to a single resource individually, or to many resources in a folder as a
whole.
Related topics:
●
Managing versions
Security
JReport Enterprise Server provides a security system for setting up and maintaining security on it,
allowing you to protect your resources from inappropriate access by other users.
To help you understand security in detail, the following security features with their concepts are
described below:
Realm
A realm is an abstract security concept, which hosts the resources and authentication entities on
JReport Enterprise Server. There can be more than one realm on the server and each realm is
independent from others. The resources and authentication entities that reside in different realms are
different.
At runtime, only one realm can be active and only the users and resources in the active realm are
accessible. A realm is identified by a unique name, which can contain any characters other than
forward slash (/) and backward slash (\).
The authentication entities consist of user accounts, group accounts and role accounts.
User
To use JReport Enterprise Server, you must have a user account, which consists of a unique user name
and password. JReport Enterprise Server verifies your identity when you type your user name and
password and then logs you on. If your user account has been disabled or deleted, JReport Enterprise
Server prevents you from accessing the services that JReport Enterprise Server provides, in order to
ensure that only valid users have access.
JReport Enterprise Server comes with two built-in user accounts, which are admin and guest. The builtin user accounts cannot be deleted. The admin user account can neither be deleted nor disabled.
Group
The principle group, which represents an organization of user accounts, is available for managing
users. Users or groups can then be added into a group as its child members, and therefore inherit the
resource and folder permissions from the group.
Role
Users must have certain user rights and permissions in order to perform tasks on resources. Roles,
which represent an aggregate of permissions, help you to efficiently assign the appropriate user rights
and permissions to users. Assigning roles to users gives them the user rights and permissions that they
require to perform their jobs with. A role can also be assigned to other groups or roles, and thus
groups or roles can inherit the permissions of other roles.
JReport Enterprise Server comes with two built-in role accounts, which are administrators and
everyone. The built-in role accounts cannot be deleted. The administrator role account can neither be
deleted nor disabled.
Permission
Permissions, associated with resources and folders, are the rules that are granted to users to control
their access to resources and folders.
Permissions in JReport Enterprise Server include:
Permission
Description
Visible
Allows or denies viewing object names in the resource tree or version table, such
as folders, resources, and archive versions.
Read
Allows or denies viewing object properties, versions, and, if it is a folder, folder
contents.
Write
Allows or denies publishing folders and resources, changing the properties (not
including permission settings) of the objects in the resource tree or version table,
such as folders, resources, and archive versions, and modifying version table
settings.
Execute
Allows or denies running resources in normal and Advanced mode (report set
type resources only).
Schedule
Allows or denies submitting resources to schedules (report set type resources
only).
Delete
Allows or denies deleting objects in the resource tree or version table, such as
folders, resources, and archive versions.
Grant
Allows or denies granting permissions to other users, groups or roles.
Privilege
Privilege is a mode which manages permissions. It can be used to manage different access permissions
unrelated with nodes. Privilege of JReport Enterprise Server manages the following two access
permissions for users:
●
●
Publish
The privilege of publishing resources to JReport Enterprise Server.
Advanced properties
The privilege of viewing advanced information of version properties such as catalog connections and
report set related resources.
Alias
JReport Enterprise Server organizes files and directories into a Resource Tree. Aliases are used to
provide different "views" of the tree for different users. For example, you may set an alias resource
tree (based on the resource tree) for Tanya, so that she can only see the marketing resource node and
can directly enter into the report set folder she is interested in. An alias is a combination of users and
resource nodes.
Related topics:
●
JReport Security System
●
Managing security
Integration
JReport Enterprise Server can be seamlessly integrated with any other Java application server to meet
the information delivery needs of a single department or an entire enterprise. It contains a rich set of
APIs that allow for seamless integration and is implemented using Java Servlet technology and Java
Server Page (JSP). These servlets and JSP pages enable the user to work with any Java EE compliant
application server that supports a Servlet Container and administer the JReport Enterprise Server
remotely through a web browser.
Related topics:
●
Integrating JReport Enterprise Server with a Java Application Server
JReport Enterprise Server cluster
A JReport Enterprise Server cluster is a group of servers that work together to provide cluster-wide
shared resources, security, schedule and version services. There is one admin server, one or more
backup servers, and zero or more slave servers in a JReport Enterprise Server cluster.
The JReport Enterprise Server cluster provides the following major benefits:
●
●
●
Manageability: All users and resources can be controlled from a central place, remotely.
High-Availability: When one server fails to perform, the tasks running on it will be re-allocated to
other servers. If a server has already been fully utilized, the tasks sent to it will be allocated to the
other servers.
Scaleable: You can add or remove servers dynamically according to your needs.
There are three roles in a JReport Enterprise Server cluster. They are one admin server, one or more
backup servers, and any number of slave servers. Each server has its own responsibilities. You set a
server to perform a specific role in a JReport Enterprise Server cluster by configuring its properties.
Admin server
There must be one and only one admin server in a JReport Enterprise Server cluster. In a JReport
Enterprise Server cluster, the admin server maintains the shared resources and performs security
administrative tasks. The admin server automatically detects the overloaded member servers and repartitions tasks among all servers in the JReport Enterprise Server cluster. You can monitor and
administer all the servers in the cluster using the admin server.
Backup server
There should be at least one backup server in a JReport Enterprise Server cluster. If the admin server
is shut down or breaks down, the backup server with the highest priority in the cluster will promote
itself to be the admin server and take over all the administrative tasks.
Slave server
There can be zero or more slave servers in a JReport Enterprise Server cluster. On a slave server, you
can perform tasks such as run report sets and submit scheduled tasks. Slave servers can receive tasks
directly from users or from the admin server. When the number of concurrent report sets running on a
server is equal to the number of concurrent report sets that is permitted by its license, the server will
inform the admin server. If a further task is submitted to this server, it will be sent to the admin server
and the admin server will then re-allocate it to other servers.
Related topics:
●
Clustering
●
Managing JReport Enterprise Server clusters
Accessing
You can access JReport Enterprise Server in either browser/server mode (B/S) or in client/server mode
(C/S). In browser/server mode, you can use a web browser to access JReport Enterprise Server. In
client/server mode, you can access JReport Enterprise Server from one of our products: Client API,
JReport Viewer, or the JReport Viewer Bean. Both JReport Viewer and JReport Viewer Bean are based
on the Client API.
This chapter presents to you two modes in which you can access JReport Enterprise Server:
●
Accessing in browser/server mode
●
Accessing in client/server mode
●
SSL in standalone JReport Enterprise Server
Accessing in browser/server mode
This section shows you how to access JReport Enterprise Server through a web browser such as
Internet Explorer, Netscape or Firefox.
Starting and logging onto JReport Enterprise Server
To log onto JReport Enterprise Server, first start the server via one of the following ways:
●
Double-click the JReport Enterprise Server 9.0 shortcut on your desktop.
●
Click Start > All Programs > JReport 9.0 > Server > Start JReport Server.
●
Run the JREntServer.bat/JREntServer.sh file located in <install_root>\bin.
●
Run the startup file from a MS-DOS command prompt. For example, assume that JReport Server has
been installed in C:\JReport\Server, you can type the following commands:
C:\>cd JReport\Server\bin
C:\JReport\Server\bin>JREntServer.bat
Then,
●
To access the JReport Console page:
1. Click Start > All Programs > JReport 9.0 > Server > JReport Server Console, or open a
web browser and set the URL to http://ip_or_hostname:port (by default, the port for
accessing the JReport Console page is 8888).
2. On the Welcome to JReport User Console page, click the Login Now button.
3. Type your user name and password as assigned by your administrator. For first time users, the
default user name and password are admin.
4. Click OK and the JReport Console page will be displayed.
●
To access the JReport Administration page:
1. Click Start > All Programs > JReport 9.0 > Server > JReport Server Administration, or
open a web browser and set the URL to http://ip_or_hostname:port (by default, the port for
accessing the JReport Administration page is 8889).
2. Type your user name and password as assigned by the administrator. For first time users, the
default user name and password are admin.
3. Click OK and the JReport Administration page will be displayed.
Tip: If you don't know the IP address of the machine on which the server runs, and if it is the same
machine where you run your web browser, you can use localhost instead of the IP address. You can
also open a console window on the machine and type hostname, then the name of the host will be
displayed.
Fast launch pad for local users
Local users can also access JReport Enterprise Server in a fast way with the launch pad, which is a
convenient entry to access the server without having to start it. The launch pad provides some key
functions of JReport Enterprise Server by setting up the connections to corresponding JReport Server
JSP's, which are:
●
Viewing the JReport sample reports
●
Creating ad hoc reports
●
Scheduling to run reports by time or event
●
Configuring server profiles to customize the server interface and functionality
●
Managing security principals
●
Visiting the JReport Demo Center
To access the launch pad, click Start > All Programs > JReport 9.0 > Server > JReport Server
Launch Pad.
Additional login channel for admin users
JReport Enterprise Server provides a special channel that creates an extra user session for
management purposes if the license limit of the maximum number of concurrent users has been
reached. The extra user session cannot be used to run report sets or submit schedules. It can only be
used by admin users for performing management operations. If your JReport Enterprise Server license
has a bounded limit to the maximum number of concurrent users, this feature will take effect.
Only one extra valid user session can be created and used within this special channel at any time. If an
extra user session has already been created and it is still valid, your request for login will be prompted
with a confirmation page asking you whether or not to close the existing extra user session. If you
select Yes, a new extra user session will be created for you to perform management operations.
Otherwise, you will not be allowed to log onto JReport Enterprise Server.
Note: If all normal user sessions have been used up, a request from a client viewer will be denied
permission to log onto JReport Enterprise Server. Only a normal user session can use a client viewer to
log onto JReport Enterprise Server, not the extra user session.
Logging off and shutting down JReport Enterprise Server
To log off JReport Enterprise Server, click the Logout link on the upper right corner of the JReport
Administration/Console page.
To shut down JReport Enterprise Server normally:
●
●
In a standalone environment, click the Shut down the Server button
on the JReport
Administration page, or click Start > All Programs > JReport 9.0 > Server > Stop JReport
Server.
In an integrated environment, shut down the application server according to the vendor's
instructions.
Also, JReport provides a feature for handling an abnormal system exit that enables the program to
close itself gracefully when the virtual machine is terminated in response to a user interrupt, such as
typing ^C, or a system-wide event such as user logoff or system shutdown. The user platform has to
use JDK 1.4 or later version to apply this feature.
Accessing in client/server mode
Besides a web browser, JReport Enterprise Server supports three other viewers to browse report sets
from a client: JReport Viewer, JReport Client API and JReport Viewer Bean. Since JReport Viewer,
JReport Client API, and JReport Viewer Bean are based on the Client API, strictly speaking there are
two viewers: thin-client through a web browser and thick-client using the Client API.
Reference: For details about the usage of JReport Viewer, Client API and JReport Viewer Bean, refer to
JReport Viewer User's Guide in <viewer_install_root>\help\userguide if you have installed it on
your machine. Also, you can go to Jinfonet website and read the online help at http://www.jinfonet.
com/kbase/viewer9/userguide/index.htm.
Accessing via JReport Viewer
JReport Viewer is a thick-client way to connect to JReport Enterprise Server. It is based on the Client
API but with a Swing based GUI. Compared with a web browser, it has better compatibility with JReport
Enterprise Server, and allows faster access. You can view existing report sets in server either on a
remote server or on your local disk. JReport Viewer also includes task scheduling functionality. With
this you can schedule and view report sets at any time and as often as you want. Also, you can publish
report sets to different formats. Finally, an important feature of the JReport Viewer is that it enables
you to manage report sets such as adding/deleting report sets and defining their properties. However,
it does not support using the JReport Web DHTML features such as sorting and filtering.
1. Download JReport Viewer for Windows or for UNIX from Jinfonet website at http://www.jinfonet.
com/downloadjreport/additional.htm. You need to use JReport Viewer and JReport Enterprise
Server of the same version (the same build number).
2. Follow the installation wizard to install JReport Viewer (by default, it is installed to C:\JReport
\Viewer).
3. Launch JReport Enterprise Server using the batch file JREntServer.bat in <server_install_root>
\bin if it is not already running.
4. After JReport Enterprise Server is started, launch JReport Viewer using the batch JREntViewer.bat
(JREntViewer.sh on UNIX) in <viewer_install_root>\bin.
5. In Connect dialog, enter the host, port number, servlet path, user name and password of JReport
Enterprise Server. The default servlet path is /jrserver. If you want to connect to JReport
Enterprise Server with SSL support, check the SSL option. Then, click Connect to complete the
connection.
6. After authenticated, you will see a resource tree in the Explorer tab of JReport Viewer (or alias
resource tree if defined), which corresponds to that of JReport Enterprise Server.
JReport Viewer contains basic features such as exploring the resource tree, viewing report sets
and scheduling.
Accessing via Client API
The usual method to connect to JReport Enterprise Server is through a web browser, such as Microsoft
Internet Explorer, Firefox, or with JReport Viewer. However, what if you want to integrate the client
viewer into your own applications? The answer is you can. Both JReport Viewer and JReport Viewer
Bean are based on the Client API. Since the Client API and JReport Viewer Bean share some functions,
you can call methods in either of them. However, JReport Viewer Bean is most often used in running
report sets and exporting report set results to other formats or printers. Client API has more flexibility
including the scheduling feature.
When you install JReport Viewer, the archive file JREntViewer.jar for Client API is also installed to
<viewer_install_root>\lib at the same time. There are sample code files you can refer to in
<viewer_install_root>\help\samples. For details about using the Client API, refer to JReport Viewer
User's Guide in <viewer_install_root>\help\userguide.
Accessing via JReport (Client) Viewer Bean
JReport Viewer Bean is also based on Client API. JReport Viewer Bean enables you to connect with
JReport Enterprise Server to run report sets, view report set results, and export report set results to
other formats (HTML, PDF, XLS, RTF, PostScript, Text, CSV, Applet), e-mail and printer.
For the usage of JReport Viewer Bean, please refer to JReport Viewer User's Guide in
<viewer_install_root>\help\userguide. You can go to http://www.jinfonet.com/downloadjreport/
additional.htm to download JReport Viewer Bean in which some demo sample code files are included.
SSL in standalone JReport Enterprise Server
JReport Enterprise Server supports HTTPS requests in standalone mode. Secure ports for HTTPS
requests should use different ports from non-secure ports for HTTP requests. By default, port 6888 and
6889 are set as the secure ports separately for accessing JReport Console UI and JReport
Administration UI. The URL for visiting JReport Enterprise Server via HTTPS schema is like this:
https://IP_address or localhost:6888
SSL support is disabled by default. You need to enable it and configure corresponding settings in order
to use HTTPS schema to visit JReport Enterprise Server UI. This can be done either on the JReport
Administration page or in the server.properties file located in the <install_root>\bin directory.
To enable SSL function via the administration UI:
1. Log onto the JReport Administration page. The default port is 8889.
2. Click Configuration on the system toolbar, then select the Service tab.
3. Check the Enable Secure Socket Layer Connection option.
4. Make sure that Secure Port and Secure Administration Port use different port numbers from Port
and Administration Port.
5. Specify the other settings about Keystore (for details about the keystore options, see Service tab).
6. Click Save in the Service tab.
7. Restart JReport Enterprise Server in order for the settings to take effect.
To enable SSL function in the server.properties file:
1. Open the server.properties file located in the <install_root>\bin directory.
2. Set httpserver.ssl.enable to true.
3. Set the other properties starting with httpserver.ssl to meet your requirements.
4. Save the server.properties file.
5. Restart JReport Enterprise Server in order for the settings to take effect.
Notes:
●
●
JReport does not provide a keystore file since Jinfonet is not a trusted certificate authority and just
provides a Keystore File Path option for you to configure the location of your trusted keystore file.
JReport Server Monitor does not support SSL.
Working with Report Sets
After successfully logging onto the JReport Console page using the user name and password assigned
by your administrator via a web browser, you can then perform tasks according to your requirements.
For example, you can view report sets in different formats, run them via URLs, schedule tasks for the
report sets and customize them by setting properties.
This chapter introduces how to view, run, customize and manage report sets in JReport Enterprise
Server as follows:
●
Running report sets
●
Scheduling report sets
●
Controlling report set versions
●
Setting report set properties
●
Linking report sets and catalogs
●
Using JSPs to print report sets
●
Deleting report sets
Running report sets
To run report sets on JReport Enterprise Server:
●
●
●
If you just want to view a report set in the browser, on the JReport Console > Reports page, simply
click the name of the report set to get the result in DHTML format. You can then export it to any
other format.
If you want to run the report set in a different format and save the report set result document, on
the JReport Console > Reports page, select the report set row, then click Run > Advanced Run on
the task bar of the Reports page (or right-click in the row and select Advanced Run from the
shortcut menu) to get the required report result.
You can also input the URL of a report set directly into the address bar of the web browser to run it.
The following topics describe how to run report sets in detail:
●
Viewing report sets
●
Running report sets in Advanced mode
●
Running report sets via URLs
Viewing report sets
To view a specified report set, on the JReport Console > Reports page, browse to the report set, then
do one of the following:
●
Click the name of the report set in the Name column of the Reports page.
●
Select the row the report set is in, then click Run on the task bar of the Reports page.
●
Select the report set row, right-click in the row and select Run from the shortcut menu.
You can then view the report set in DHTML format (the default format for viewing report sets used by
JReport Enterprise Server).
Note: The default format for viewing report sets can be changed. To do this:
1. On the JReport Console page, click Profile on the system toolbar.
2. Click Customize Server Preferences on the task bar of the Profile page.
3. In the General tab, select the required format from the Default Format for Viewing Report dropdown list.
4. Click OK to apply the changes.
Running report sets in Advanced mode
Apart from simply running a specified report set to view it in the default format, JReport Enterprise
Server also supports viewing a specified report set in other formats, and saving the report set result
version according to your requirements.
To run a report set in Advanced mode:
1. On the JReport Console > Reports page, browse to the report set you want to run in Advanced
mode.
2. Do either of the following:
❍
❍
Select the row the report set is in, then click Run > Advanced Run on the task bar of the
Reports page.
Select the report set row, right-click in the row and select Advanced Run from the shortcut
menu.
The Advanced Run dialog is then displayed.
3. In the General tab, select the report in the report set you want to run (only one report in a report
set can be run in Advanced mode at a time). If the report has parameters, specify the parameter
values as required (for details, see General tab - Parameters). Then, specify the other options as
required.
4. In the Format tab, choose a format to view the report result, and set the other settings.
Note: When you run a report in Advanced mode in HTML format, the names of page
navigation links in the report, such as First, Previous, Next, and Last, can be localized
according to your requirements. For details, refer to Localizing the page navigation links in
HTML report outputs.
5. In the Archive tab, archive the report set result version according to your requirements.
6. If you want to limit the amount of time that the report is allowed to run, in the Duration tab,
specify a time duration for the task, and ask JReport Enterprise Server to cancel the task or to
notify you or someone else of the task status via e-mail if the task has not yet finished running
when the task duration is up. For detailed information, see Task-level timeout for advanced run
and schedule tasks.
Note: By default, the Duration tab is not displayed in the Advanced Run dialog. To make it
available, the Enable Task Duration option in the Advanced tab of the JReport Administration
> Configuration page must be checked.
7. Click Finish to view the report in the format you specified.
See also Advanced Run dialog for details about options in the dialog.
Running report sets via URLs
Sometimes, you may want to reach a specific page by typing a full URL in a web browser instead of
clicking hyperlinks from the JReport Console page. This section explains to you how to run report sets
via URLs in different ways.
●
Running report sets via URLs with protocols or commands
●
Running report sets via URLs with authentication parameters
●
Running report sets via URLs using the POST method
●
Specifying parameters using dialog when running report sets via URL
●
Example 1: Accessing report sets via URL using the switching database command at runtime
●
Example 2: Sending a large report set result by e-mail upon finishing
●
Example 3: Running a report in a report set via URL
Related topics:
●
Setting dynamic parameter values when running or scheduling a report set via API
Running report sets via URLs with protocols or commands
With the commands below, you can directly type the whole URL in a web browser to access the
destination. The HTTP methods GET and POST are available for almost all of the commands.
●
jrs.get_cat_rpts_new
Description: Gets all resource nodes (folder, catalog, report set and result) of a folder.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_cat_rpts_new&jrs.
path=RESOURCENODE
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_cat_rpts_new&jrs.path=/
SampleReports
Response: Resource nodes list.
●
jrs. get_node_prop
Description: Gets the properties of a resource node.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_node_prop&jrs.path=RESOURCENODE
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_node_prop&jrs.path=/
SampleReports/SampleReports.cat
Response: Resource node properties.
●
jrs.delete_resource
Description: Deletes the resource node from the resource tree.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.delete_resource&jrs.path=RESOURCENODE
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.delete_resource&jrs.path=/
SampleReports/EmployeeInformation.cls
●
jrs.get_rst_vers
Description: Gets a result version list of a report set.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rst_vers&jrs.catalog=CATALOG&jrs.
report=REPORT_SET
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_rst_vers&jrs.catalog=/
SampleReports/SampleReports.cat&jrs.report=/SampleReports/EmployeeInformation.cls
Response: Result versions list.
●
jrs.get_rpt_vers
Description: Gets a report set version list of a report set.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rpt_vers&jrs.report=REPORT_SET
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_rpt_vers&jrs.report=/
SampleReports/EmployeeInformation.cls
Response: Report set version list.
●
jrs.get_cat_vers
Description: Gets a catalog versions list of a catalog.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_cat_vers&jrs.catalog=CATALOG
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_cat_vers&jrs.catalog=/
SampleReports/SampleReports.cat
Response: Catalog versions list.
●
jrs.get_rst_doc_vers
Description: Gets a result versions list of a result document. The result document can be generated
by advanced running or scheduling a report set.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rst_doc_vers&jrs.result=RESULT
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_rst_doc_vers&jrs.result=/
SampleReports/EmployeeInformation
Response: Result versions list.
●
jrs.get_ver_rst_page
Description: Gets a result version of the report set from the version manager.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_ver_rst_page&jrs.file=FILE_NAME
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_ver_rst_page&jrs.file=1%
5cJReport_System_User327406359%5cInvoiceReport.rst
Response: The result file from the version manager.
●
jrs.get_ver_rst
Description: Gets an HTML page for viewing a result version of a report set with the ViewerApplet.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.get_ver_rst&jrs.file=FILE_NAME
URL Example: http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
InvoiceReport.cls?jrs.cmd=jrs.get_ver_rst&jrs.file=1%5cJReport_System_User327406359%
5cInvoiceReport.rst
Response: HTML page for viewing the result file with the ViewerApplet.
●
jrs.get_ondemands
Description: Gets a list of report sets run in background mode.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_ondemands
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_ondemands
Response: Background run report set list.
●
jrs.view_ver_rst
Description: Views a result version of a report set.
HTTP Method: GET/POST
URL Format:
http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.view_ver_rst
&jrs.hist_file=RESULT_VERSION_FILE_NAME&jrs.result_type=RESULT_TYPE
&jrs.applet_type=APPLET_TYPE[&jrs.isjrsapltpg=TRUE/FALSE]
[&jrs.is_multi_files=TRUE/FALSE][&jrs.is_applet_chart=TRUE/FALSE]
[&jrs.has_hyperlink=TRUE/FALSE][&jrs.has_page_number=TRUE/FALSE]
[&jrs.use_table=TRUE/FALSE][&jrs.drilldown=TRUE/FALSE]
[&jrs.relative_font_size=TRUE/FALSE][&jrs.no_margin_html=TRUE/FALSE]
[&jrs.web_browser=BROWSER_TYPE][&jrs.no_margin_pdf=TRUE/FALSE]
[&jrs.is_norm_txt=TRUE/FALSE][&jrs.delimiter=DELIMITER]
[&jrs.udchar_width=NUMBER][&jrs.udchar_height=NUMBER]
[&jrs.no_margin_ps=TRUE/FALSE][&jrs.no_margin_rtf=TRUE/FALSE]
URL Example:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/EmployeeInformation.
cls?jrs.cmd=jrs.view_ver_rst&
jrs.hist_file=1%5cJReport_System_User327406359%5cEmployeeInformation.rst&jrs.
result_type=1
Notes:
❍
❍
❍
●
RESULT_TYPE:
0 - To Applet
1 - To HTML
2 - To PDF
3 - To TEXT
4 - To Excel
5 - To PostScript
6 - To Rich Text Format
7 - To XML
8 - To DHTML
APPLET_TYPE:
2 - Java Plug-In 1.2 for Windows
3 - Java Plug-In 1.3 for Windows
BROWSER_TYPE:
0 - Internet Explorer
1 - Netscape
jrs.get_rpt_desc_page
Description: Gets an HTML page for entering parameter values and choosing the result type of a
report set.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rpt_desc_page&jrs.
catalog=CATALOG&jrs.report=REPORT_SET
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_rpt_desc_page&jrs.
catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/InvoiceReport.cls
●
jrs.get_rpt_param_page
Description: Gets an HTML page for entering parameter values of a report set.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_rpt_param_page&jrs.
catalog=CATALOG&jrs.report=REPORT_SET
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_rpt_param_page&jrs.
catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/InvoiceReport.cls
●
jrs.del_rpt_ver
Description: Deletes a version of a report set.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.del_rpt_ver&jrs.
version_id=VERSION_ID
URL Example: http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
InvoiceReport.cls?jrs.cmd=jrs.del_rpt_ver&jrs.version_id=103
●
jrs.del_rst_ver
Description: Deletes a result version of a report set.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.del_rst_ver&jrs.
version_id=VERSION_ID
URL Example: http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
InvoiceReport.cls?jrs.cmd=jrs.del_rst_ver&jrs.version_id=106
●
jrs.del_rstdoc_ver
Description: Deletes a version of a result document.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.result=RESULT&jrs.cmd=jrs.del_rstdoc_ver&jrs.
version_id=VERSION_ID
URL Example: http://localhost:8888/jrserver?jrs.result=/SampleReports/
InvoiceReport&jrs.cmd=jrs.del_rstdoc_ver&jrs.version_id=108
●
jrs.get_ver_param
Description: Gets the parameter file of a report set's result version.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.get_ver_param&jrs.
version_id=VERSION_ID
URL Example: http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
InvoiceReport.cls?jrs.cmd=jrs.get_ver_param&jrs.version_id=103
●
jrs.web_vw
Description: Runs a report set and views its result in a web browser. If the report set has no
parameters then it directly runs and views the report set. If the report set has parameters and no
parameter specified in the URL or the parameters provided in the URL fail to include all necessary
parameters, the server then returns the parameter dialog for entering parameter values. When using
servlet instead of JSP to call jrs.web_vw, it will be redirected to runReport.jsp, and the parameter
dialog will not be displayed.
HTTP Method: GET/POST
URL Format:
http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.web_vw
&jrs.result_type=RESULT_TYPE&jrs.applet_type=APPLET_TYPE
[&jrs.param$NAME=VALUE&jrs.param$NAME=VALUE...]
[&jrs.isjrsapltpg=TRUE/FALSE][&jrs.is_multi_files=TRUE/FALSE]
[&jrs.is_applet_chart=TRUE/FALSE][&jrs.has_hyperlink=TRUE/FALSE]
[&jrs.has_page_number=TRUE/FALSE][&jrs.use_table=TRUE/FALSE]
[&jrs.drilldown=TRUE/FALSE][&jrs.relative_font_size=TRUE/FALSE]
[&jrs.no_margin_html=TRUE/FALSE][&jrs.web_browser=BROWSER_TYPE]
[&jrs.no_margin_pdf=TRUE/FALSE][&jrs.is_norm_txt=TRUE/FALSE]
[&jrs.delimiter=DELIMITER][&jrs.udchar_width=NUMBER]
[&jrs.udchar_height=NUMBER][&jrs.no_margin_ps=TRUE/FALSE]
[&jrs.no_margin_rtf=TRUE/FALSE][&jrs.use_def_db_user=TRUE/FALSE]
[&jrs.db_user=DB_USER][&jrs.db_pswd=DB_PASSWORD]
[&jrs.jdbc_url=JDBC_URL][&jrs.jdbc_driver=JDBC_DRIVER]
[&jrs.rpt_language=RPT_LANGUAGE][&jrs.rpt_encoding=RPT_ENCODING]
[&jrs.wp=DBField='value'][&jrs.named_wp=ExistedWhereportion]
[&jrs.report_sheet$RPT_NAME=true]
URL Example:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/InvoiceReport.cls?jrs.
cmd=jrs.web_vw&jrs.result_type=1&jrs.param$Country=
Australia&jrs.param$State=New South Wales&jrs.param$City=Sydney&jrs.
is_multi_files=true&jrs.is_applet_chart=
true&jrs.use_def_db_user=false&jrs.db_user=dba&jrs.db_pswd=123456&jrs.rpt_language=en
Notes:
❍
❍
❍
❍
❍
RESULT_TYPE:
0 - To Applet
1 - To HTML
2 - To PDF
3 - To TEXT
4 - To Excel
5 - To PostScript
6 - To Rich Text Format
7 - To XML
8 - To DHTML
APPLET_TYPE:
2 - Java Plug-In 1.2 for Windows
3 - Java Plug-In 1.3 for Windows
BROWSER_TYPE:
0 - Internet Explorer
1 - Netscape
Use jrs.param$NAME=VALUE to set parameter values of the report set. Where, NAME is the
parameter name and the VALUE is the URL-encoded parameter value. For Example: jrs.param
$TERMSDAYS=30&jrs.param$PTODAY=May 21, 1998.
If you want to run a specific report, use jrs.report_sheet$RPT_NAME=true to specify a report
in the current report set, where RPT_NAME is the name of the specific report. For example,
jrs.report_sheet$report2=true.
❍
❍
If you want to define a new WHERE portion from the URL, you can choose the property jrs.wp.
For example, the report set has a DBField Customer Region, and you want to restrict the field
Customer Region to CA in the URL. You can then set a new WHERE portion such as, "...jrs.
result_type=1&jrs.is_applet_chart=true&jrs.wp=Customers.Region='CA'...".
If you want to set an existing WHERE portion in the URL, you should use the property jrs.
named_wp. For example, to set the existed WHERE portion Region from URL, use "...jrs.
result_type=1&jrs.is_applet_chart=true&jrs.named_wp=Region...". Here Region is the
WHERE portion's name.
jrs.try_vw
●
Description: Tries to view a report set in a web browser. If the report set has no parameters then it
directly runs and views the report set. If the report set has parameters and no parameter specified in
the URL or the parameters provided in the URL fail to include all necessary parameters, the server
then returns the parameter dialog for entering parameter values.
HTTP Method: GET/POST
URL Format:
http://HOST:PORT/jrserver/REPORT?jrs.cmd=jrs.try_vw
&jrs.result_type=RESULT_TYPE&jrs.applet_type=APPLET_TYPE
[&jrs.isjrsapltpg=TRUE/FALSE][&jrs.is_multi_files=TRUE/FALSE]
[&jrs.is_applet_chart=TRUE/FALSE][&jrs.has_hyperlink=TRUE/FALSE]
[&jrs.has_page_number=TRUE/FALSE][&jrs.use_table=TRUE/FALSE]
[&jrs.drilldown=TRUE/FALSE][&jrs.relative_font_size=TRUE/FALSE]
[&jrs.no_margin_html=TRUE/FALSE][&jrs.web_browser=BROWSER_TYPE]
[&jrs.no_margin_pdf=TRUE/FALSE][&jrs.is_norm_txt=TRUE/FALSE]
[&jrs.delimiter=DELIMITER][&jrs.udchar_width=NUMBER]
[&jrs.udchar_height=NUMBER][&jrs.no_margin_ps=TRUE/FALSE]
[&jrs.no_margin_rtf=TRUE/FALSE][&jrs.use_def_db_user=TRUE/FALSE]
[&jrs.db_user=DB_USER][&jrs.db_pswd=DB_PASSWORD]
[&jrs.jdbc_url=JDBC_URL][&jrs.jdbc_driver=JDBC_DRIVER]
[&jrs.rpt_language=RPT_LANGUAGE][&jrs.rpt_encoding=RPT_ENCODING]
[&jrs.wp=DBField='value'][&jrs.named_wp=ExistedWhereportion]
[&jrs.report_sheet$RPT_NAME=true]
URL Example: http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
EmployeeInformation.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1
Notes:
❍
❍
RESULT_TYPE:
0 - To Applet
1 - To HTML
2 - To PDF
3 - To TEXT
4 - To Excel
5 - To PostScript
6 - To Rich Text Format
7 - To XML
8 - To DHTML
APPLET_TYPE:
2 - Java Plug-In 1.2 for Windows
3 - Java Plug-In 1.3 for Windows
❍
●
BROWSER_TYPE:
0 - Internet Explorer
1 - Netscape
jrs.get_schedules
Description: Gets the schedules list.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_schedules
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_schedules
●
jrs.del_schedule
Description: Deletes a schedule.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.del_schedule&jrs.task_id=TASK_ID
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.del_schedule&jrs.task_id=200312-11 11:09:16.455
●
jrs.enable_schedule
Description: Enables a schedule.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.enable_schedule&jrs.task_id=TASK_ID
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.enable_schedule&jrs.
task_id=2003-12-11 11:09:16.455
●
jrs.disable_schedule
Description: Disables a schedule.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.disable_schedule&jrs.task_id=TASK_ID
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.disable_schedule&jrs.
task_id=2003-12-11 11:09:16.455
●
jrs.get_new_schd_page
Description: Gets an HTML page in order to create a new schedule for the report set with a web
browser.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_new_schd_page&jrs.
catalog=CATALOG&jrs.report=REPORT_SET
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_new_schd_page&jrs.
catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/
EmployeeInformation.cls
●
jrs.get_edit_schd_page
Description: Gets an HTML page to edit the schedule with a web browser.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_edit_schd_page&jrs.
task_id=TASK_ID
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_edit_schd_page&jrs.
task_id=2003-12-11 11:13:23.02
●
jrs.get_completed
Description: Gets the completed tasks list.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_completed
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_completed
●
jrs.del_completed
Description: Deletes a completed task.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.del_completed&jrs.id=RECORD_ID
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.del_completed&jrs.
id=1071119897006-154848108
●
jrs.del_all_completed
Description: Deletes all completed tasks.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.del_all_completed
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.del_all_completed
●
jrs.get_active
Description: Gets the active tasks list.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_active
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_active
●
jrs.stop_task
Description: Stops an active task.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.stop_task&jrs.task_id=TASK_ID
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.stop_task&jrs.task_id= 200312-11 11:13:23.02
●
jrs.get_change_password_page
Description: Gets an HTML page in order to change the password with a web browser.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_change_password_page
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_change_password_page
●
jrs.change_password
Description: Changes the password for a user.
HTTP Method: POST
Form Action: http://HOST:PORT/jrserver?jrs.cmd=jrs.change_password
Content Type: application/x-www-form-urlencoded
Content: jrs.cmd=jrs.change_password&jrs.uid=admin&jrs.password=CURRENT_PASSWORD&jrs.
new_password=NEW_PASSWORD&jrs.confirm_new_password=NEW_PASSWORD
Content Example: jrs.cmd=jrs.change_password&jrs.uid=admin&jrs.password=ad&jrs.
new_password=1234&jrs.confirm_new_password=1234
●
jrs.get_preference_page
Description: Gets an HTML page in order to change the user preference settings with a web browser.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.get_preference_page
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.get_preference_page
●
jrs.logout
Description: Logs out from the JRServlet.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.logout
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.logout
●
jrs.login
Description: Logs into the JRServlet from a login dialog with web browsers or the JRViewer.
HTTP Method: GET/POST
URL Format: http://HOST:PORT/jrserver?jrs.cmd=jrs.login
URL Example: http://localhost:8888/jrserver?jrs.cmd=jrs.login
Running report sets via URLs with authentication parameters
Sometimes you are required to give your user name and password before you can run report sets.
Under this circumstance, if you want to avoid the login dialog in the web browser, use either of the
following two parameters:
●
jrs.authorization
Tag of the HTTP query field jrs.authorization.
Description: Loads the JRServlet and avoids the login dialog in web browsers.
Format of the value of the HTTP query field: Base64-encoded (userID:password).
Example:
If the user ID and password are both set as admin, then the value of the HTTP query field is Base64encoded("admin:admin")="YWRtaW46YWRtaW4=", and the URL will be as follows:
http://localhost:8888/jrserver?jrs.cmd=jrs.get_subnodes&jrs.
authorization=YWRtaW46YWRtaW4%3D.
Note: The JRServlet does not check security when an HTTP request has no jrs.cmd in the HTTP
query in the root path of the JRServlet, and also does not accept the jrs.authorization for the
request http://localhost:8888/jrserver?jrs.authorization=YWRtaW46YWRtaW4%3D.
●
jrs.auth_uid and jrs.auth_pwd
Tags of HTTP query field: jrs.auth_uid and jrs.auth_pwd.
Description: Loads the JRServlet and avoids the login dialog in web browsers.
Format of the value of the HTTP query field: jrs.auth_uid=USER_ID, jrs.auth_pwd=PASSWORD.
Example:
If the user ID and password are both set as admin, the URL will be as follows:
http://localhost:8888/jrserver?jrs.path=/SampleReports&jrs.cmd=jrs.get_subnodes&jrs.
auth_uid=admin&jrs.auth_pwd=admin
Note: The JRServlet does not check security when an HTTP request has no jrs.cmd in the HTTP
query in the root path of the JRServlet, and also does not accept the jrs.auth_uid and jrs.
auth_pwd for the request http://localhost:8888/jrserver?jrs.auth_uid=admin&jrs.
auth_pwd=admin.
Running report sets via URLs using the POST method
●
In HTML pages
Specify the POST as the method of a form in an HTML page.
●
Using JRClient API or JRViewer Bean
Three methods: usePostAsDefaultMethod(), useGetAsDefaultMethod() and ifUsePostAsDefaultMethod
() can be used in the class jet.client.api.JRClient.
●
In Java program
For example:
URL url = new URL("http://jrserver:8888");
URLConnection uc = url.getConnection();
if (uc instanceof HttpURLConnection) {
HttpURLConnection huc = (HttpURLConnection)uc;
//set use POST method.
huc.setRequestMethod("POST");
huc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
huc.setDoOutput(true);
//write the HTTP query to the output stream.
OutputStreamWriter writer = new OutputStreamWriter(huc.getOutputStream());
writer.write("jrs.cmd=jrs.get_subnodes");
writer.close();
huc.getHeaderField(0);
//get the response content from the server.
InputStream inStream = uc.getInputStream();
if (inStream != null) {
BufferedReader reader = new BufferedReader(new InputStreamReader(inStream));
String inputLine;
while (null != (inputLine = reader.readLine())) {
System.out.println(inputLine);
}
}
}
Specifying parameters using dialog when running report sets via URL
When running reports in a report set via URL, if the reports contain parameters, you need to manually
enter the parameters in the URL string without any mistakes. You may find this painful sometimes
because it's not easy to remember all parameters in a report set. However, JReport provides you with
two special commands jrs.web_vw and jrs.try_vw, which allow you to display the Enter Parameter
Values dialog to manage parameters.
The display of the parameter dialog requires:
●
The reports have parameters.
●
The URL contains one of the commands that are able to activate the parameter dialog.
●
●
No parameter specified in the URL or the parameters provided in the URL fail to include all necessary
parameters.
Use JSP to call jrs.web_vw. When using servlet to call jrs.web_vw, it will be redirected to runReport.
jsp, and the parameter dialog will not be displayed.
With the above conditions fulfilled, the Enter Parameter Values dialog will be displayed right after you
finish the URL in the address bar and make it run. After setting the values and clicking OK in the dialog,
JReport Enterprise Server will append the values to the URL string for you and execute the URL.
However, if you click Cancel in the dialog, the URL running will be cancelled.
Notes:
●
●
If you want to specify parameters via dialog when running reports via URL, the most effective way to
display the parameter dialog is that you do not specify parameters at all in the URL.
When using runReport.jsp to call jrs.web_vw or jrs.try_vw, the default parameters are applied and
the parameter dialog will not be displayed.
Example 1: Accessing report sets via URL using the switching database command at
runtime
To access report sets via URL, you can switch the connection in the same database or between
different databases at runtime with the commands listed in the section Running report sets via URLs
with protocols or commands. As a result, if the databases you want to switch between have the same
structure, you will then be free from having to build another similar catalog. You can use the switch
database commands to set the JDBC connection or to change the user name/password in order to
connect to another database.
Switching the connection and user/password in the same database
1. Set the Oracle database named oracle815 connection when designing the report set Report1.cls,
and later switch the connection to the Oracle database named demo at runtime.
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.
cmd=jrs.try_vw&jrs.result_type=1
&jrs.jdbc_url=jdbc:oracle:thin:@host:1521:demo
2. Specify the user ID system/manager to ensure security when designing the report set Report1.cls,
and then switch to the user ID Scott and the password tiger.
The URL for switching the user ID and password:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.
cmd=jrs.try_vw&jrs.result_type=1
&jrs.db_user=Scott&jrs.db_pswd=tiger
3. Set the Sybase 12 database named master when designing the report set Report1.cls, and later
switch the connection to the Sybase 12 database named product at runtime.
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.
cmd=jrs.try_vw&jrs.result_type=1
&jrs.jdbc_url=jdbc:sybase:Tds:host:5000/product
4. Set the SQL database named MBA2000 when designing the report set Report1.cls, and later
switch the connection to the SQL database named JTTest at runtime.
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.
cmd=jrs.try_vw&jrs.result_type=1
&jrs.jdbc_url=jdbc:inetdae:host:1433?database=JTTest&sql7=true
Switching the connection between different databases
1. Set oracle815 connection when designing the report set Report1.cls, and then switch the
connection to Access database with the JDBC-ODBC driver named products at runtime.
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.
cmd=jrs.try_vw&jrs.result_type=1
&jrs.jdbc_driver=sun.jdbc.odbc.JdbcOdbcDriver&jrs.jdbc_url=jdbc:odbc:products
2. Set oracle815 connection when designing the report set Report1.cls, and then switch the
connection to SQL server database named products at runtime.
The URL for switching the connection:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Report1.cls?jrs.
cmd=jrs.try_vw&jrs.result_type=1
&jrs.jdbc_driver=com.inet.tds.TdsDriver&jrs.jdbc_url=jdbc:inetdae:JT_P05:1433?
database=products&sql7=true
Example 2: Sending a large report set result by e-mail upon finishing
Here two ways are provided to publish a large report set result via URL: JSP and servlet. Take the
following examples to publish a large report set result by e-mail and to customize the message
displayed in the web browser.
JSP parameter specification
●
jrs.catalog=%2fcatalog path%2fcatalog name
jrs.report=%2freport set path%2freport set name
jrs.timeout_send_email=true/[false]
jrs.report_timeout=number (if timeout >number and jrs.timeout_send_email=true, send mail)
jrs.mailto=mail address
jrs.mailsubject=mail subject
jrs.result_type=1 (HTML) or 2(PDF) or 3(Text) or 4(Excel) or 5(PostScript) or 6(Rich Text) or 7(XML)
jrs.mailcomments=mail content
jrs.mailfrom=mail address of sender
jrs.timeout_sendmail_message=the message which you customize
There are two server JSPs for running a report set:
❍
❍
tryView.jsp
This is the normal method of accessing report sets using URLs. If the report set has parameters,
the report parameter page will be shown first for you to specify parameters, otherwise it will
directly go to runReport.jsp.
runReport.jsp
The runReport.jsp functions the same as tryView.jsp when the report set has no parameter. When
it has parameters, the report set runs with the default parameters if no parameter is specified, or
else it runs with the parameters specified in the URL.
When you use tryView.jsp to run a report set without a parameter:
http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.report=%2fSampleReports%2fEmployeeInformation.cls
&jrs.timeout_send_email=true
&jrs.report_timeout=5
&jrs.mailto=support@jinfonet.com
&jrs.mailsubject=TaskForTimeoutSendEmail&jrs.result_type=1
&jrs.mailcomments=IFTHEREPORTISFINISHEDTHERESULTWILLBESENT
&jrs.mailfrom=Mike@jinfonet.com
When you use runReport.jsp to run a report set with parameters:
http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=jrs.web_vw
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls
&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007
&jrs.timeout_send_email=true&jrs.report_timeout=1
&jrs.mailto=support@jinfonet.com&jrs.mailsubject=AboutTaskForTimeout
&jrs.result_type=1
●
Servlet parameter specification
jrs.cmd=jrs.try_vw (when the report set has no parameter)
jrs.cmd=jrs.web_vw (when the report set has parameter)
jrs.timeout_send_email=true/[false]
jrs.report_timeout=number (if timeout >number and jrs.timeout_send_email=true, send mail)
jrs.mailto=mail address
jrs.mailsubject=mail subject
jrs.result_type=1 (HTML) or 2(PDF) or 3(Text) or 4(Excel) or 5(PostScript) or 6(Rich Text) or 7(XML)
jrs.mailcomments=mail content
jrs.mailfrom=mail address of the sender
jrs.timeout_sendmail_message=the message that you can customize
When you use a servlet to run a report set without a parameter:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
EmployeeInformation.cls?jrs.cmd=jrs.try_vw
&jrs.timeout_send_email=true&jrs.report_timeout=1
&jrs.mailto=support@jinfonet.com
&jrs.mailsubject=AboutTaskForTimeoutSendEmail&jrs.result_type=1
&jrs.mailcomments=COUNTRECORDSPERPAGE
When you use a servlet to run a report set with a parameter:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
CustomerAnalysis.cls?jrs.cmd=jrs.web_vw
&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007
&jrs.timeout_send_email=true&jrs.report_timeout=1
&jrs.mailto=support@jinfonet.com
&jrs.mailsubject=TaskForTimeoutEmail
&jrs.result_type=1&jrs.mailcomments=CUSTOMERORDER
●
Customize your message to be displayed in the web browser
You can set a message by setting the parameter jrs.timeout_sendmail_message.
For example, you want to display message as below:
Running <report name> takes more than <Timeout> seconds.
The subject is <mail subject> and has been sent to <mailto> from <mailfrom>
It is a file whose type is <type>.
Then you can set the parameter in URL:
jrs.timeout_sendmail_message=Running {6} takes more than {0} seconds.<p>The subject is {2}
and has been sent to {1} from {5}.<p>It is a file whose type is {3}.
Where
{0} - The report set timeout
{1} - mail to
{2} - mail subject
{3} - result type
{4} - mail comment
{5} - mail from
{6} - Catalog name/report set
<p> - an Enter key
Example
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/
CustomerAnalysis.cls?jrs.cmd=jrs.web_vw
&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007
&jrs.timeout_send_email=true&jrs.report_timeout=1
&jrs.mailto=support@jinfonet.com
&jrs.mailsubject=AboutTaskForTimeoutSendEmail
&jrs.result_type=1&jrs.mailcomments=CustomerAnalysis
&jrs.mailfrom=support@jinfonet.com&jrs.timeout_sendmail_message=...
This {6} is a large report set whose runtime is over {0} seconds.<p>The report was sent to {1}
from {5}.<p>The subject of the mail is {2}.<p>Its type is {3}.
Note: You should type the sign " ' " twice if you use it in the message.
Example 3: Running a report in a report set via URL
You can use jrs.report_sheet$RPT_NAME=true to specify a specific report in the current report set,
where RPT_NAME is the name of the specific report.
The URL for running a report Applet within the report set MultimediaObjects.cls is as below:
http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.catalog=%
2fSampleReports%2fSampleReports.cat&
jrs.report=%2fSampleReports%2fMultimediaObjects.cls&jrs.result_type=8&jrs.report_sheet
$report1=true
or
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/MultimediaObjects.cls?
jrs.cmd=jrs.try_vw&
jrs.result_type=8&jrs.report_sheet$report1=true
Scheduling report sets
JReport Enterprise Server can run report sets at a specified time or periodically by scheduling tasks for
report sets. The scheduled tasks will be recorded by the server according to their different executing
status.
Pick a topic from the following for details about how to schedule tasks in JReport Enterprise Server:
●
Scheduling report sets with dialog
●
Scheduling report sets via URL
●
Scheduling a task containing a bursting report
●
Scheduling a customized task using User Task
●
Recording scheduled tasks
●
Viewing scheduled report set results
●
Importing and exporting scheduled tasks
●
Adding TaskListener
Scheduling report sets with dialog
You can schedule tasks for a specified report set with dialog as follows:
1. On the JReport Console > Reports page, browse to the report set you want to schedule to run.
2. Do either of the following:
❍
❍
Select the row the report set is in, then click Run > Schedule on the task bar of the Reports
page.
Select the report set row, right-click in the row and select Schedule from the shortcut menu.
The Schedule dialog is then displayed.
3. In the General tab, select the reports you want to run from the report set. You can choose
multiple normal reports or one bursting report at a time (for scheduling a bursting report, see
Scheduling a task containing a bursting report). If the selected reports have parameters, specify
the parameter values as required (for details, see General tab - Parameters). Then, specify the
other options as required.
4. In the Publish tab, specify the type of the task.
Six task types are provided by JReport Enterprise Server: publishing to version, publishing to disk,
publishing to e-mail, publishing to printer, publishing to fax and publishing to FTP. Choose the
type you want to publish, and then set the settings for the specified type.
In order to meet the requested requirement to run tasks defined outside of JReport on JReport
Enterprise Server, and to just use JReport Enterprise Server's schedule function, JReport has
provided a task named User Task. With this task, you can implement a customized task with the
schedule properties. You can also submit the user task from a web page, or by calling the JReport
Server API methods.
Notes:
❍
❍
You can either schedule to use the Default Task or the User Task at one time. If you specify
to schedule a report set as a default task, you will not be able to schedule it as a user task,
and vice versa.
When you schedule to publish a report set to HTML format, the names of page navigation
links in reports in the report set, such as First, Previous, Next, and Last, can be localized
according to your requirements. For details, refer to Localizing the page navigation links in
HTML report outputs.
5. In the Conditions tab, specify the time for when the task is to be performed in the Time sub tab,
and select or create a trigger to bind with the task in the Trigger sub tab.
6. In the Notification tab, specify to notify someone via e-mail of when the task is finished and
whether it was successful or unsuccessful.
7. In the Duration tab, specify a time duration for the task, and ask JReport Enterprise Server to
cancel the task or to notify you or someone else of the task status via e-mail if the task has not
yet finished running when the task duration is up. For detailed information, see Task-level timeout
for advanced run and schedule tasks.
Note: By default, the Duration tab is not displayed in the Schedule dialog. To make it
available, the Enable Task Duration option in the Advanced tab of the JReport Administration
> Configuration page must be checked.
8. Click Finish, and JReport Enterprise Server will then perform the task.
See also Schedule dialog for details about the task types and settings in each tab.
The following are some specific scheduling examples:
●
Example 1: Publishing a report set to the versioning system
●
Example 2: Publishing a report set to the file system
●
Example 3: Publishing a report set to e-mail
●
Example 4: Publishing a report set to printer
●
Example 5: Publishing a report set to fax
●
Example 6: Publishing a report set to an FTP site
●
Example 7: Publishing a report set from a User Task
Example 1: Publishing a report set to the versioning system
In this example, a task is set up and will be performed immediately. The generated result is asked to
be kept for 30 days.
1. On the JReport Console > Reports page, select the row that the report set is in.
2. Click Run > Schedule on the task bar of the Reports page to display the Schedule dialog.
3. In the General tab,
a. Specify a name for the task in the Schedule Name text box.
b. Assign a priority to the task from the Priority drop-down list.
c. In the Enter Parameters panel, select the reports you want to run from the report set.
d. If the selected reports have parameters, specify the parameter values as required.
e. Expand the Report Set Info panel, click Select Another Catalog to specify another catalog
for the report set if required.
f. Select the report set version and catalog version from the corresponding drop-down lists.
g. Expand the Advanced panel, if the report set has a style group, check the Enable Style
Group checkbox and choose the style group.
h. Check the Enable Converting Encoding option if required and specify the encoding before
and after converting from the corresponding drop-down lists.
i. Enter a name for the task in the Name of the schedule field.
j. Define the encoding for the report set by selecting from the drop-down list.
k. Check Use the default DB user and password defined in catalog.
l. Check the Add TaskListener to be Invoked option, and input the class name (for details,
see Adding TaskListener).
m. Check the Enable Auto Recover Task option to specify auto recovering settings.
4. In the Publish tab,
a. Click the To Version sub tab, then check Publish to Versioning System.
b. Select the required format(s) and set the format settings.
c. Check the Built-in Version Folder option in Archive Location to save the report set result
version in the built-in version folder.
d. Set 0 for the Maximum Number of Versions.
e. Check the Result Auto-delete option and define the result to expire in 30 days.
5. In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone dropdown list, then from the Time Type drop-down list, choose Run this task immediately.
6. If you want to notify someone of when the task is finished by sending an e-mail, go to the
Notification tab and then set the settings.
7. If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
8. Click Finish to have the task performed.
Then, click My Tasks on the system toolbar. While the task is being performed, you can see a record
of it in the Running tab. On completion it will be put into the Completed tab.
Notes:
●
When publishing a report set to XML format, if you want to use the URL to get the .xsd file, follow
the steps below:
1. Put the existing XML schema file in <intall_root>\public_html.
2. Input http://IP address:8888/name of the existing XML schema file.
●
There is another way to publish the report set result to version. If you have set the property server.
version.from.temp to true in the server.properties file in <install_root>\bin, or selected the option
Enable "Publish to Versioning System" for Background Tasks View in the Advanced tab of the JReport
Administration > Configuration page, you will get the link Publish to Version System on the system
toolbar of the JReport Console page. Click the link to publish the result to version.
Example 2: Publishing a report set to the file system
In this example, you will learn how to set up a task to publish the report set result in various file
formats to the file system repeatedly at the start of each month.
1. Take steps 1, 2 and 3 as in Example 1.
2. In the Publish tab of the Schedule dialog, click the To Disk sub tab, select the required format,
specify the result location, and set the format settings according to your requirements.
3. In the Conditions tab,
a. In the Time sub tab, define the time zone from the Time Zone drop-down list, then from the
Time Type drop-down list, choose Run this task periodically.
b. In the Duration box, specify a time period for when the task will be performed.
c. Select Monthly from the Date drop-down list and keep the default to run the first day of
every 1 month.
d. Keep the Time settings as default.
e. If you also want to set an event which needs to occur before running the report set, select a
trigger to bind with the task from the Select a trigger to bind drop-down list in the Trigger
sub tab, then specify the trigger logic with time condition.
For detailed information about the logic between the trigger condition and the time condition,
see Trigger tab.
4. If you want to notify someone of when the task is finished by sending an e-mail, go to the
Notification tab and set the settings.
5. If you want to specify a timeout for when the scheduled report set will be allowed to run, specify
the settings in the Duration tab as required.
6. Click Finish to have the task performed.
Then, click My Tasks on the system toolbar, you will see that the scheduled task has been recorded in
the Scheduled tab. Since you have not specified the duration Run until a time for this task, it will not
stop being performed until you delete or disable it from the Scheduled tab.
Notes:
●
●
●
When you specify to publish the report set result to the server resource tree, if the specified folder
has a real path, the result will be put to the real path. Otherwise it will be put to the default disk
location where server resources are.
If you specify to publish the report set result to a non-existent folder on disk, JReport Enterprise
Server will automatically create it.
If you use a fixed name to perform the task periodically, only the most recently generated report set
result will be kept. In order to keep the report set result generated every time, you should use the
dynamic result file name. Similarly, you are able to input the dynamic directory path to avoid report
set management difficulties, since when a fixed directory path is specified, too many results may be
generated in one directory. For more information, see Appendix 2: Dynamic names.
Example 3: Publishing a report set to e-mail
In this example, you will learn how to set up a task to publish the report set result to e-mail.
1. Take steps 1, 2 and 3 as in Example 1.
2. In the Publish tab of the Schedule dialog, click the To E-mail sub tab, then from the Mail To list,
select to whom the report set result will be sent. If required, click the Edit button to edit the
specified e-mail.
If you want to create another e-mail, click the New button, then fill in every field, select the
format in which you want to export the report set result and set the settings according to your
requirements. When you choose to specify a report set result as an attachment to e-mail, you
need to specify a file name for the attachment. For details about settings of creating a new e-mail,
refer to Schedule dialog - To E-mail.
3. In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone dropdown list, then from the Time Type drop-down list, choose Run this task immediately.
4. If you want to notify someone of when the task is finished by sending an e-mail, go to the
Notification tab and set the settings.
5. If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
6. Click Finish to have the task performed.
Then, click My Tasks on the system toolbar. When the task is being performed, you can see a record
of it in the Running tab and on completion it will be put into the Completed tab.
Example 4: Publishing a report set to printer
In this example, you will learn how to set up a task to publish the report set result to a printer.
1. Take steps 1, 2 and 3 as in Example 1.
2. In the Publish tab of the Schedule dialog,
a. Select the To Printer sub tab and then check Publish to Printer.
b. Select a JDK print method for the report set result in the Select Print Method field.
c. Type a name with the path of the printer in the Printer field.
3. In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone dropdown list, then from the Time Type drop-down list of the Time tab, choose Run this task
immediately.
4. If you want to notify someone of when the task is finished by sending an e-mail, go to the
Notification tab and set the settings.
5. If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
6. Click Finish to have the task performed.
Then, click My Tasks on the system toolbar. When the task is being performed, you can see a record
of it in the Running tab and on completion it will be put into the Completed tab.
Note: When there is no printer connected to JReport Enterprise Server, and you schedule a report set
to publish to printer, the server may crash or throw an exception.
Example 5: Publishing a report set to fax
In this example, you will learn how to set up a task to publish the report set result to fax. Before you
can fax the report set result, you must first have your modem configured. Otherwise a warning
message will be displayed when you try to export to fax.
1. Take steps 1, 2 and 3 as in Example 1.
2. In the Publish tab of the Schedule dialog, click the To Fax sub tab, check the Publish to Fax
option and then fill in every field and set the settings according to your requirements.
3. In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone dropdown list, then from the Time Type drop-down list, choose Run this task immediately.
4. If you want to notify someone of when the task is finished by sending an e-mail, go to the
Notification tab and set the settings.
5. If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
6. Click Finish to have the task performed.
Then, click My Tasks on the system toolbar. When the task is being performed, you can see a record
of it in the Running tab and on completion it will be put into the Completed tab.
Example 6: Publishing a report set to an FTP site
In this example, you will learn how to set up a task to publish the report set result to an FTP site.
1. Take steps 1, 2 and 3 as in Example 1.
2. In the Publish tab of the Schedule dialog,
a. Click the To FTP sub tab, then click the New button to set up a new FTP site or click the Edit
button to edit a specified FTP site in the FTP To list.
b. Fill in every field, select the format in which you want to send the report set results and then
set the settings according to your requirements.
3. In the Conditions tab, select the Time sub tab, define the time zone from the Time Zone dropdown list, then from the Time Type drop-down list, choose Run this task immediately.
4. If you want to notify someone of when the task is finished by sending an e-mail, go to the
Notification tab and set the settings.
5. If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
6. Click Finish to have the task performed.
Then, click My Tasks on the system toolbar. When the task is being performed, you can see a record
of it in the Running tab and on completion it will be put into the Completed tab.
Notes:
●
In order to use the Publish to FTP feature, your JDK version must be 1.5 or later.
●
Dynamic result name for FTP task is currently not supported.
Example 7: Publishing a report set from a User Task
In this example, you will learn how to publish a report set using a User Task.
1. Take steps 1, 2 and 3 as in Example 1.
2. In the Publish tab of the Schedule dialog,
a. Click the User Task link to go to the User Task page.
b. Specify the name of the class that implements the UserTask interface. You need to write this
Java class and add the compiled class into the class path of the server.
c. Give a display name of the class.
d. Specify the properties of the user task by inputting them directly or import a property file
from your local disk.
3. In the Conditions tab,
a. In the Time sub tab, define the time zone from the Time Zone drop-down list, then from the
Time Type drop-down list, choose how you want to schedule the task.
b. In the Trigger sub tab, select a trigger to bind with the task from the Select a trigger to bind
drop-down list, then specify its logic with time condition.
For detailed information about the logic between the trigger condition and the time condition,
see Trigger tab.
4. If you want to notify someone of when the task is finished by sending an e-mail, go to the
Notification tab and set the settings.
5. If you want to specify a timeout for the task, specify the settings in the Duration tab as required.
6. Click Finish to have the task performed.
Then, click My Tasks on the system toolbar. When the task is being performed, you can see a record
of it in the Running tab and on completion it will be put into the Completed tab.
Scheduling report sets via URL
A schedule contains two kinds of properties. The first is about time information and the second is about
task information (for detailed information about each property, see Appendix 4: Properties - scheduling
report sets via URL).
When report sets are scheduled via URL in a web browser, the method jrs.submit_schedule is called.
The following is a description of this method.
●
●
●
●
Constant: jet.cs.util.APIConst.CMD_SUBMIT_SCHEDULE.
Description: Submits a scheduled task to JReport Enterprise Server. If the report set has no
parameters then it directly run the URL. If the report set has parameters and no parameter specified
in the URL or the parameters provided in the URL fail to include all necessary parameters, the server
then returns the parameter dialog for entering parameter values.
HTTP Method: GET/POST.
Response: Returns the task ID to JRClient API, and returns the scheduled tasks page to web
browsers.
Specifying parameters using dialog when scheduling via URL
When scheduling reports in a report set via URL, if the reports contain parameters, you need to
manually enter the parameters in the URL string without any mistakes. You may find this painful
sometimes because it's not easy to remember all parameters in a report set. However, JReport
provides you with the special command jrs.submit_schedule, which allows you to display the Enter
Parameter Values dialog to manage parameters.
The display of the parameter dialog requires:
●
The reports have parameters.
●
The URL contains the command jrs.submit_schedule.
●
No parameter specified in the URL or the parameters provided in the URL fail to include all necessary
parameters.
With the above three conditions fulfilled, the Enter Parameter Values dialog will be displayed right after
you finish the URL in the address bar and make it run. After setting the values and clicking OK in the
dialog, JReport Enterprise Server will append the values to the URL string for you and execute the URL.
However, if you click Cancel in the dialog, the URL running will be cancelled.
Tip: If you want to specify parameters via dialog when scheduling reports via URL, the most effective
way to display the parameter dialog is that you do not specify parameters at all in the URL.
The following are some specific examples on how to schedule a report set via URL:
●
Publishing a report set to the versioning system immediately
●
Publishing a report set to the versioning system periodically
●
Publishing a report set to the versioning system at a specific time
●
Publishing a report set to the file system immediately
●
Publishing a report set to e-mail immediately
●
Publishing a report set to printer immediately
●
Publishing a report set to the versioning system immediately and notifying others whenever success
or failure
Related topics:
●
Setting dynamic parameter values when running or scheduling a report set via API
Publishing a report set to the versioning system immediately
If you want to publish the report set CustomerAnalysis.cls that uses the catalog /SampleReports/
SampleReports.cat to the versioning system immediately, the URL used for this task is as below:
●
●
To RST
http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.launch_type=0&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007&jrs.uid=admin
&jrs.to_version=true&jrs.to_version_rst=true
&jrs.report=CustomerAnalysis.cls
To PDF
http://localhost:8888/jinfonet/submitSchedPage.jsp
?jrs.cmd=jrs.submit_schedule&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.launch_type=0&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007&jrs.uid=admin
&jrs.to_version_pdf=true&jrs.to_version=true
&jrs.report=CustomerAnalysis.cls
Note: If you want to publish report sets to other formats, you can refer to the examples above, but
you will need to modify the parameter jrs.to_version_pdf=true to suit the particular format that your
report set will be published to. For example, if you want to publish the report set to Excel, you will need
to change the parameter to jrs.to_version_excel=true.
Publishing a report set to the versioning system periodically
If you want to publish the report set CustomerAnalysis.cls that uses the catalog /SampleReports/
SampleReports.cat to the versioning system periodically, the URL used for this task is as below:
http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule
&jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.hour2=5
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.to_version=true&jrs.to_version_html=true
&jrs.is_between=true&jrs.is_weekday=false&jrs.launch_type=8
&jrs.min2=0&jrs.is_pm=false&jrs.hour=9&jrs.is_pm2=true
&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007&jrs.uid=admin
&jrs.hours=1&jrs.is_hourly=true&jrs.at_min=0&jrs.days_id=0
&jrs.day=1&jrs.timezone=CTT&jrs.min=0&jrs.expire_days=30
&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls
&jrs.rpt_language=en&jrs.report_sheet$Report=true
&jrs.schedule_name=periodicalTask
Note: If you want to publish report sets to other formats periodically, see Publishing a report set to the
versioning system immediately.
Publishing a report set to the versioning system at a specific time
If you want to publish the report set CustomerAnalysis.cls that uses the catalog /SampleReports/
SampleReports.cat to the versioning system at 12:00:00 CST, December 1, 2008, the URL used for this
task is as below:
http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.to_version=true&jrs.to_version_rst=true
&jrs.launch_type=1&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007&jrs.uid=admin&jrs.exe_day=1
&jrs.exe_month=12&jrs.exe_hour=12&jrs.exe_min=00
&jrs.exe_year=2008&jrs.expire_days=30
&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls
&jrs.report_sheet$Report=true&jrs.schedule_name=atTimeTask
Note: If you want to publish report sets to other formats periodically or at a specific time, see
Publishing a report set to the versioning system immediately, and modify the parameter.
Publishing a report set to the file system immediately
If you want to publish the report set CustomerAnalysis.cls that uses the catalog /SampleReports/
SampleReports.cat to the file system immediately, the URL used for this task is as below:
●
●
To RST
http://localhost:8888/jinfonet/submitSchedPage.jsp
?jrs.cmd=jrs.submit_schedule
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.launch_type=0&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007&jrs.uid=admin
&jrs.to_disk_rst_path_type=1
&jrs.rst_dir=C:\&jrs.to_disk=true&jrs.to_rst=true
&jrs.rst=CustomerAnalysis.rst
&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls&
To PDF
http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.launch_type=0&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007&jrs.uid=admin
&jrs.to_disk_pdf_path_type=1
&jrs.pdf_dir=C:\&jrs.to_disk=true&jrs.to_pdf=true
&jrs.pdf=CustomerAnalysis.pdf
&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls&
Note: If you want to publish a report set to a disk path, for example, jrs.rst_dir=C:\, you can do
the same as the example described above. If you want to publish a report set to a resource tree, for
example, jrs.rst_dir=%2fSampleReports, you can omit this parameter &jrs.
to_disk_pdf_path_type=1 in the above example and replace jrs.pdf_dir=C:\ with jrs.rst_dir=%
2fSampleReports. Here SampleReports is the resource path.
Publishing a report set to e-mail immediately
If you want to publish the report set CustomerAnalysis.cls that uses the catalog /SampleReports/
SampleReports.cat to e-mail immediately, the URL used for this task is as below:
http://localhost:8888/jinfonet/submitSchedPage.jsp?
jrs.cmd=jrs.submit_schedule
&jrs.catalog=/SampleReports/SampleReports.cat
&jrs.report=/SampleReports/CustomerAnalysis.cls
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.to_mail=true&jrs.jrmail0=jrs.mailto%3dsupport@jinfonet.com%26
jrs.mailsubject%3dreport&jrs.launch_type=0
&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007
&jrs.uid=admin&jrs.rpt_language=en
Publishing a report set to printer immediately
If you want to publish the report set CustomerAnalysis.cls that uses the catalog /SampleReports/
SampleReports.cat to printer immediately, the URL used for this task is as below:
http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.launch_type=0&jrs.to_printer=true
&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls
&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007
&jrs.rpt_language=en
Publishing a report set to the versioning system immediately and notifying others of
success or failure
If you want to publish the report set CustomerAnalysis.cls that uses the catalog /SampleReports/
SampleReports.cat to the versioning system immediately, and notify the user support1, support2, and
support3 of success or failure, the URL used for this task is as below:
http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule
&jrs.catalog=%2fSampleReports%2fSampleReports.cat
&jrs.task_class=jet.server.schedule.jrtasks.PublishRptTask
&jrs.launch_type=0&jrs.param$P_StartDate=01/01/2006
&jrs.param$p_EndDate=12/31/2007&jrs.uid=admin&jrs.expire_days=30
&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls
&jrs.to_version=true&jrs.to_version_rst=true
&jrs.success_notify=true&jrs.fail_notify=true
&jrs.notification_emails=To%3A+support1@jinfonet.com
%0D%0ACc%3A+support2@jinfonet.com%0D%0ABcc%3A+support3@jinfonet.com%0D%0A
Scheduling a task containing a bursting report
In a large enterprise reporting deployment, it is important to handle both large amounts of data as well
as a large number of users. Report bursting enables running a report once and distributing the report
results to multiple recipients who each will receive a subset of the report results.
Bursting reports can be distributed to e-mail or FTP addresses, to disk, to the JReport versioning
system, or to the security system members such as users, groups, and roles.
End users can submit a schedule task which contains only one bursting report to JReport Enterprise
Server. When a bursting task is activated, it will create a main bursting task and some sub bursting
tasks. The system will guarantee bursting tasks compete with normal tasks for system resources. The
bursting tasks can be given lower priority if desired (set queue.policy to 1).
●
●
Main bursting task: It is responsible for getting/splitting data and distributing work to the sub
tasks. There can be only one main bursting task for a sub bursting task.
Sub bursting task: It is responsible for generating the report result according to split data and
sending the result to the address of the bursting recipient.
For details about what is a bursting report and how to design a bursting report, see Report Bursting
in the JReport Designer User's Guide.
On JReport Enterprise Server, direct running and advanced running actions support normal reports but
not bursting reports. A report set containing only bursting reports cannot be run directly, it must be
scheduled.
Scheduling supports both types of reports excluding the combination of the two types: for normal
reports, multiple reports can be scheduled at a time; however for bursting reports, only one can be
scheduled. For a scheduled bursting task, seven kinds of result file formats are supported: HTML, PDF,
Excel, Text, RTF, XML, and PostScript. In addition, when scheduling to run a bursting report, you can
make it generate not only the bursting result by applying bursting schemas but also the non-bursting
result based on whole data without data splitting.
Scheduling a bursting report to generate bursting result
Though a bursting report may have one or more bursting schemas, you need apply one or more of
them in order to get a bursting result. To do this, select a bursting report and schemas, and then
specify required parameter values in the General tab of the Schedule dialog. Then a tab named
Bursting Result is displayed in the Publish tab and only the corresponding sub tabs are available that
are defined in the selected bursting schemas' recipients in JReport Designer. For example, a bursting
report has three bursting schemas: Schema 1 defines recipient E-mail and Disk, Schema 2 defines
recipient FTP, and Schema 3 defines recipient JReport Server Version. If Schema 1 and Schema 3 are
selected, only To E-mail, To Disk, and To Version sub tabs will be shown in the Bursting Result tab of
the Publish tab for the bursting result.
The following list tells which tab will be displayed in the Publish > Bursting Result tab of the Schedule
dialog for which recipient address specified in bursting schema.
Recipient
Sub tab in the Publish tab
E-mail
To E-mail
FTP
To FTP
Disk
To Disk
JReport Server Version
To Version
JReport Server User/Group/Role - User E-mail To E-mail
JReport Server User/Group/Role - User
Private Folder
To Version
When scheduling a bursting report, specifying the destination is suppressed in the Publish tab since the
recipient addresses have been included in the bursting schema. However, you are allowed to give a file
name to the subset of report result instead of using the default name.
Default name for bursting result files
Sometimes you may not want to specify a file name for each bursting result when defining recipients.
The bursting system will give it a name as generated by the system.
The default name format is: ReportName + "_" + BurstingKey + suffix (result format type). When
there are multiple bursting key columns, connect each one by the character "_".
Converting to String
When a bursting key is of one of the following data types, it will be converted into String so as to make
a valid result file name:
●
●
●
Integer, Float, Character: Same as Java, these data types are transferred to string directly.
Date and Time: All data and time formats will be transferred to a date format: yyyy-MM-dd hh:mm:
ss.
Currency: Currency will be transferred to the number without the currency mark ($ or others).
Name length
In the JReport Enterprise Server resource system, the resource name only supports up to 64-character
length. If a bursting result file name is longer than that, the system will trim it down automatically.
In order to avoid using the same name in the same path, an index will be appended to the result name,
for example: report1_USA_Maryland1.pdf, report1_USA_Maryland2.pdf.
Notes:
●
All bursting sub results will apply the security information of the bursting task submitter.
●
When running a report set containing both normal and bursting reports:
For direct running:
When running it to DHTML format, only the normal reports are opened.
When running it to other formats, if the default focused report is a normal report, it will be run
directly; otherwise if the default focused report is a bursting report which cannot be run, a warning
message will be displayed asking the end user to select a normal report to run using advanced run.
For advanced running:
It is allowed to only choose among the normal reports.
Scheduling a bursting report to generate non-bursting result
Besides generating bursting result for a bursting report, you can also generate non-bursting result for
the report without applying any bursting definition, which is based on full data without data splitting.
To generate non-bursting result, select the Non-bursting result option in the General tab of the
Schedule dialog. Then a tab named Non-bursting Result appears in the Publish tab, and all these sub
tabs - To Version, To Disk, To E-mail, To Printer, To Fax, and To FTP - are available in this tab for the
non-bursting result.
Scheduling a customized task using User Task
1. Create a task class that implements the UserTask interface and add the path of the class file to
the class path. You can find the interface in the jet.server.api package available in <install_root>
\help\server\en\api. JReport provides a demo class APIDemoDynamicExportTask.java in
<install_root>\help\server\en\samples for your reference.
2. Create a task properties file defining the formats of exporting the task. For example, the content
of the properties file is:
jrs.rst=result_rtf
jrs.pdf=true
jrs.text=true
jrs.excel=true
jrs.ps=true
jrs.html=result_html
3. Submit the task either from a server web page or by calling server API methods. The task can
then be run by the server.
❍
To submit the customized task from a server web page:
a. On the JReport Console > Reports page, select the row that the report set is in.
b. Click Run > Schedule on the task bar of the Reports page (or right-click in the row and
select Schedule from the shortcut menu). The Schedule dialog is then displayed.
c. Specify the settings in the General, Publish, Conditions, and Duration tabs as required.
Here the Publish tab settings should be switched to those of User Task by clicking the link
on the right bottom of the tab. Then, the name of the task class file you have defined that
implements the UserTask interface and the task properties that define the export formats
must be provided. You can either input the task properties manually or import them from
the task properties file that you have created.
d. Upon finishing, click Finish to submit the task.
❍
To submit the customized task by API methods:
a. Set the user task class name to the property value of APIConst.TAG_TASK_CLASS.
b. Define the user task properties with the property APIConst.TAG_USER_TASK_PROP with
the formats as follows: jrs.user_task_prop= jrs.rst=result_rtf&jrs.pdf=true&jrs.
text=true&jrs.excel=true&jrs.ps=true&jrs.html=result_html. Since the jrs.user_task_prop
is used to transfer multiple user task properties, the values set to this property must be
formatted to be separated with "&" character.
c. Set a display name for the class with the property APIConst.
TAG_USER_TASK_DISPLAY_NAME.
d. Except for the above properties, define the other schedule properties as you do with a
default task, see APIDemoPublishRpt.java in <install_root>\help\server\en\samples
for reference. Then following the API demo you can submit a customized task on the server.
Related topics:
●
Scheduling
●
Example 7: Publishing a report set from a User Task
Recording scheduled tasks
JReport Enterprise Server records every scheduled task. Click My Tasks on the system toolbar of the
JReport Console page, then the following tabs will be displayed: Scheduled, Running, and Completed.
The tasks are recorded in different tables according to their executing status. A task is placed in the
Scheduled table as soon as it is submitted by the user. It will go to the Running table when it is
running, and when it is finished by JReport Enterprise Server, it will then go to the Completed table.
Related topics:
●
Managing tasks
Viewing scheduled report set results
When a scheduling task is finished, you can view the results of the scheduled report set as required. To
view the results, first of all you need to know the corresponding results' location. To get the location
information:
1. On the JReport Console page, click My Tasks on the system toolbar, then click the Completed
tab, where all the successfully scheduled tasks are recorded.
2. Locate the task in the tab and click the name of the task in the Schedule Name column.
3. In the Result Details table, the location information of the scheduled results are available in the
Details column.
Viewing results scheduled to version
To view report set results that are scheduled to version, you can choose whether to view via the
JReport Console page or via URL.
Viewing via the JReport Console page
One way to view results that are scheduled to version on the JReport Console page is via the scheduled
task records. To do this:
1. Click My Tasks on the system toolbar, then click the Completed tab.
2. In the tab, locate the right task and click the name of the task in the Schedule Name column.
3. In the Result Details table, the links to different result formats are available for viewing in the To
Version row.
And another way to achieve the same purpose is via the server resource tree which to some extent
varies with the archive location type specified in the Publish > To Version tab:
●
If the archive location has been set to Built-in Version Folder:
1. On the JReport Console > Reports page, select the row that the original report set is in.
2. Click Version on the task bar of the Reports page (or right-click in the row and select Version
from the shortcut menu).
3. In the Report Set Result Versions tab, the scheduled results of different format types are listed
in the Result column. Click the format links or action buttons to view the results.
●
If the archive location has been set to My Reports Folder or Public Reports Folder, which requires
providing a path and a name for the scheduled result in the server resource tree:
1. On the JReport Console > Reports page, select the row that the result is in.
2. Click Version on the task bar of the Reports page (or right-click in the row and select Version
from the shortcut menu).
3. In the Result Versions tab, the scheduled results of different format types are listed in the Result
column. Click the format links or action buttons to view the results.
Viewing via URL
For the report set results that are scheduled to version, you can also view them via URL. One important
thing in the URL method is that you need to know the file name of the result that you want to view. To
get this information, you can take the steps explained at the beginning of the document.
Using command jrs.view_ver_rst
See the example:
http://localhost:8888/jrserver/SampleReports/SampleReports.cat/EmployeeInformation.cls?
jrs.cmd=jrs.view_ver_rst&
jrs.hist_file=1%5cJReport_System_User327406359%5cEmployeeInformation.rst&jrs.
result_type=1.
See details about the usage of the command jrs.view_ver_rst.
Using viewVersion.jsp
For example:
http://localhost:8888/jinfonet/viewVersion.jsp?jrs.cmd=jrs.view_ver_def&jrs.
rst_version=2&jrs.ver_suff=.html&
jrs.report=%2fSampleReports%2fEmployeeInformation.cls&type=rstfile&jrs.path=%
2fSampleReports%2fEmployeeInformation.cls
Viewing results scheduled to disk
When scheduling a report set to disk,
●
●
If you choose Publish to Server Disk Path, you are required to provide a disk file path and file name
with correct format type as the suffix for each report in the report set. After scheduling succeeds, you
can find the corresponding result files available at the specified location on the computer where
JReport Enterprise Server is installed.
If you choose Publish to Server Resource Tree, you are required to provide a path following the
server resource tree and file name with correct format type as the suffix for each report in the report
set. For example,
❍
To follow the My Reports folder path, start with "/USERFOLDERPATH/admin/".
Example: /USERFOLDERPATH/admin/report1.pdf
❍
To follow the Public Reports folder, start with "/".
Example: /SampleReports/report2.html.
If the specified folder which is the parent folder of the result file has a real path, the generated result
file will be saved to the real path; if the folder doesn't have a real path, the generated result will be
saved to <server_install_root>/jreports/, which is the mapped disk path of the root node "/" in
the specified path.
Viewing results scheduled to e-mail/printer/fax/FTP
When a report set is scheduled to e-mail, printer, fax, or FTP, you can view the scheduled results if the
specified addresses or locations are available to you.
Importing and exporting scheduled tasks
In JReport Enterprise Server, you can export a scheduled task to a script file which will then be saved
on your own disk as a script file. In addition, you can import a script file from the disk file to generate a
scheduled task.
To export a scheduled task to a script file and save it in the disk:
1. On the JReport Console page, click My Tasks on the system toolbar.
2. In the Scheduled tab, select the rows that one or more scheduled tasks are in.
3. Click Edit > Export to Script on the task bar of the My Tasks page and modify the script text in
the Edit Script box as required.
4. Click OK to export the specified scheduled task to a script file.
5. Specify the directory and name for this script file in the File download dialog.
To import a script file from your disk:
1. On the JReport Console page, click My Tasks on the system toolbar, then select the Scheduled
tab.
2. Click New Schedule on the task bar of the My Tasks page.
3. In the New Schedule dialog, check the option Import Script to Create Schedule.
4. Click the Browse button to select a script file from your disk file, then click OK to import the
specified script file and modify the script text in the Edit Script box as required.
5. Click OK to generate a scheduled task.
Note: If you just updated from an older version of JReport Enterprise Server, there may be some old
scripts saved in your server. In order to use these old scripts, you can click the Import old script
from server link in the Import Script page to select an old script to import it to generate a scheduled
task. To use this link, you must logon JReport Enterprise Server as an administrator role.
Adding TaskListener
When viewing or scheduling a report set, JReport Enterprise Server enables you to call your Java
application before or after the process.
In JReport Enterprise Server, a TaskListener interface has been provided in the package jet.server.api
for receiving task events before or after running. You can specify one Java class to implement this
interface for a task event. When the event of this task occurs, the corresponding methods in the
listener will be invoked. The interface contains two methods: beforeRun and afterRun, enabling you to
set your Java application call before or after the process of viewing a report set or setting up a
schedule. Your applications will return true or false. For true, JReport Enterprise Server will go on
running. While for false, JReport Enterprise Server will stop there.
Below is an example illustrating how to add TaskListener when setting up a schedule on a report set.
1. Develop your Java class to implement the interface. Here TestTaskListener.java is used, which is
available in <install_root>\help\server\en\samples.
2. Compile TestTaskListener.java to generate the class file.
3. Edit the batch file setenv.bat in <install_root>\bin, which is used to start JReport Enterprise
Server. Assuming that TestTaskListener has been saved in c:\JReport\Server\tasklistener,
add the path of the class file (c:\JReport\Server\tasklistener) to the ADDCLASSPATH variable
in setenv.bat.
4. Start JReport Enterprise Server and set up a schedule on a report set, check Add TaskListerner
to be Invoked in the General tab of the Schedule dialog, then input the class name. In this
example, input TastListener, and then submit the task.
5. In this example, the class returns True.
Print out the task and schedule properties before and after running the task. You will then get task
and schedule information in the command window before and after the task is run.
You can also define properties of your own and transmit them through ServerInfo. To do this, use
APIConst.TAG_USERDEFINED_PROPERTY_PREFIX as the prefix for the properties.
For example, if you want to transmit the properties host_name, host_ip and hosp_protocol, you will
need to insert the properties, before calling the method runTask, into the properties named prop, as
follows:
prop.put(APIConst. TAG_USERDEFINED_PROPERTY_PREFIX+"host_name", "host");
prop.put(APIConst. TAG_USERDEFINED_PROPERTY_PREFIX+"host_ip", "192.10.10.6");
prop.put(APIConst. TAG_USERDEFINED_PROPERTY_PREFIX+"host_protocol"+ "TCP/IP");
You can get the value of the properties listed above through the server info object, serverInfo, in the
method beforeRun or afterRun of the TaskListener class. See the example below:
host_name=serverInfo.getTaskProperties().get(APIConst.TAG_USERDEFINED_
PROPERTY_PREFIX+"host_name");
host_ip=serverInfo.getTaskProperties().get(APIConst.TAG_USERDEFINED_
PROPERTY_PREFIX+"host_ip");
host_protocol=serverInfo.getTaskProperties().get(APIConst.TAG_USERDEFINED_
PROPERTY_PREFIX+"host_protocol");
Note: All properties without the prefix APIConst.TAG_USERDEFINED_PROPERTY_PREFIX will be denied
and discarded by JReport Enterprise Server.
Controlling report set versions
A new report set version is created when you publish a report set from outside of JReport Enterprise
Server, and then make the old and the new share one common resource node.
The report set versions are recorded in the Version table of the report set, from which you can view the
information about version date, version number, and edit the version properties or delete any
unwanted version.
For detailed information about controlling report set versions, refer to Managing versions.
Setting report set properties
The properties of a report set, such as the resource node name of the report set, the linked catalog, its
archive policy and the user permissions on it (if the report set locates in the Public Reports folder), can
be set according to your requirements.
To set the properties for a report set:
1. On the JReport Console > Reports page, select the row that the report set is in.
2. Click Edit > Properties on the task bar of the Reports page (or right-click in the row and select
Properties from the shortcut menu).
3. In the Properties dialog, specify the settings as required.
4. When done, click OK to accept the changes.
Linking report sets and catalogs
A report set can be linked with a catalog in JReport. The benefits of a linked catalog compared to a
copied catalog are:
●
●
●
There is no need to also copy the wanted catalog to the destination directory when saving the report
set to a different location.
When the report set and its linked catalog are not in the same directory, the report set can still run
with the catalog.
When the linked catalog is updated, the report set using the catalog can run with the updated
version. However, the copied catalog cannot be updated if its original catalog is updated since they
are two independent versions.
When directly running a report set, the linked catalog has higher priority than the catalog specified in
the same folder as the report set (without linked catalog, the report set will run within the selected
catalog in the same folder). As for Advanced Run and Schedule, the default selected catalog is the
linked catalog if there is one, however, you can change it by the provided option Select Another
Catalog.
Setting linked catalog
Linked catalog can be set at server level, folder level, and report set level as follows:
To set linked catalog at server level (this can only be done by administrators):
●
1. Go to the JReport Administration page, and click Configuration on the system toolbar.
2. Click the Advanced tab, check Enable Linked Catalog, then click the Select Another
Catalog link to specify the catalog which will be used as the linked catalog at server level.
3. Click OK to save the change.
4. Restart JReport Enterprise Server to make the settings take effect.
●
To set linked catalog at folder/report set level, go to the Properties dialog of the folder/report set,
check Enable Linked Catalog, then specify the linked catalog as required.
❍
❍
Use Specified - If checked, you can specify a linked catalog which can be any catalog in the
server resource tree to the folder/report set.
Use Inherited - If a linked catalog has been specified on the parent level of the folder/report set,
you can use the parent-level linked catalog as the linked catalog of the folder/report set. For the
My Reports and Public Reports folders, the parent level is the server level; for the other folders or
report sets, the parent level is the parent folder.
Notes:
●
●
If a schedule task has been submitted and then the linked catalog in use is modified, the task will
still use the previous catalog until the task information is updated.
When running a report set in JReport Web, you can also save the original catalog as a linked catalog
when saving the DHTML report set.
●
For API usage about linked catalog, see the JReport Enterprise Server Javadoc in <install_root>
\help\server\en\api.
Using JSPs to print report sets
JReport Enterprise Server provides the following demo JSPs which enable you to print a report set
without any view in the client side, and they are contained in the zip file printDemo.jsp.zip in
<install_root>\help\server\en\samples.
●
●
printDemo.jsp
Provides frames to load printCustomerlist.jsp and printReport.jsp.
printCustomerlist.jsp
Shows how to set parameters for printing the demo report set CustomerAnalysis.cls by using the
ViewerApplet. This JSP calls printReport.jsp. If you want to print the other report sets, you can follow
this JSP file as an example to write your own JSP. In your own JSP, you should modify the values of
"cat" and "rptName".
String cat = "/SampleReports/SampleReports.cat"; //request.getParameter(APIConst.
TAG_CATALOG);
String rptName = "/SampleReports/CustomerAnalysis.cls"; //request.getParameter
(APIConst.TAG_REPORT);
●
printReport.jsp
Shows how to print report sets by using the ViewerApplet. The example JSP printCustomerlist.jsp
calls this JSP.
Before running the JSPs, you should unzip and copy them to <intall_root>\public_html\jinfonet.
Then, start JReport Enterprise Server and access printDemo.jsp using the URL http://
localhost:8888/jinfonet/printDemo.jsp. The following page appears:
PrintInCurrentFrame
Set to call printReport.jsp and load applet of JReport Viewer Frame.
PrintInHiddenFrame
Set to call printReport.jsp without loading applet of JReport Viewer Frame.
Reset
Reset the previous options.
View
View this report set.
Interactive
If checked, you could specify the print setup in the Print dialog.
Background
If checked, the print job will run in the background.
UseJDK11
If checked, you will use instance PrintJob of JDK11 to print the report set.
Wait
If checked, you have to wait until the print job is finished.
SeparateLargePage
If checked, the large page will be separated into several pages automatically.
NotifyComplete
This parameter is used with the parameter wait. After the print job is finished, a box will pop up to note
you, and you could do any other work instead of keep on waiting.
Printer
Specify the printer to implement the print job.
Deleting report sets
To delete a report set from JReport Enterprise Server:
1. On the JReport Console > Reports page, select the row the report set is in.
2. Click Edit > Delete on the task bar of the Reports page (or right-click in the row and select
Delete from the shortcut menu).
3. A message dialog will then be displayed for your confirmation. Click OK to delete the specified
report set or Cancel to cancel the deletion of the report set.
JReport Web - Interactive Reports
(Dynamic HTML Reports)
With JReport Enterprise Server, you can obtain report results in different formats, such as HTML, PDF,
and Excel. For the HTML format, there are two viewing modes - pure HTML or Dynamic HTML (JReport
Web). JReport Web provides a dynamic report view at the client side. You can change options which
enable the results to be displayed to your requirements.
Interactive information empowers you to slice and dice your business data, to dynamically change your
view of data, and to analyze the data to glean useful business information. In short, interactive
information enables you to customize your view of business information. With JReport, any report can
be made interactive, extending the "life" of the report by allowing you to easily sort, navigate, and filter
data via JReport Web. This wide range of functionality, including the ability to drill down on data,
enables you to quickly derive value from your business intelligence data.
JReport Web provides support for many features, such as Filter, Sort, Drill-to, Drill-down, Drill-up,
Navigation (TOC), Search, and save the results. JReport Web also supports a web design feature,
allowing you to create reports using report oriented data structures, save your report, and even save
your custom modifications to existing reports.
This chapter covers the following topics to help you better understand how JReport Web makes reports
interactive and how you will benefit:
●
JReport Web window elements
●
Viewing report sets in JReport Web
●
General operations
●
Ad hoc reporting
●
DHTML based reporting
●
Analytic reporting
●
Applying a style
●
Working with reports via URL
●
Tuning JReport Web performance
JReport Web window elements
The main page of JReport Web consists of the user information bar, menus, toolbar, report set bar,
Toolbox, Resource View panel, TOC Browser, and report area. The options for browsing or controlling a
DHTML report are as follows:
Toolbar/
Menu
File
Button
Tool Name
Description
New Report
Creates a new report to the
current report set based on
an existing business/report
cube.
New Report Set Creates a new report set
containing a report based on
an existing business/report
cube.
Open
Opens the Open Report
dialog for you to open/close
reports in current report set.
Rename Report Opens the Rename Current
Report dialog to give the
open report a new name.
Edit
Close Report
Closes the current report if
there is more than one report
open in the report set; or
prompts you to close the
report set if only one report
is open.
Delete Report
Deletes the current report if
there is more than one report
open in the report set. This
command is disabled when
the last page of the current
report does not display if
Format Page On Demand on
the Configure DHTML Profile
page is selected.
Save
Saves the report set as a
report set version.
Save As
Saves a copy of the report
set.
Export
Exports the report result to
disk or version in various
formats.
Page Setup
Shows the Page Properties
dialog for you to specify the
page layout settings for the
report result.
Printable
Version
Shows the Printable Version
dialog for you to print the
current report result to a PDF/
HTML file.
Exit
Closes the current report set.
Undo
Undoes the last operation.
View
Redo
Reverses the operation of
Undo.
Search
Shows the Search dialog for
you to find specific text.
Toolbar
Shows or hides toolbars.
User
Shows or hides the User
Information Bar Information Bar, which
displays the user name,
catalog name and report set
name.
Insert
Toolbox
Shows or hides the Toolbox
panel which allows you to
insert a component into the
report.
Resource View
Shows or hides the Resource
View panel, with which you
can add cube elements to
your report and create
dynamic resources to use
them in your report.
TOC Browser
Shows or hides the TOC
Browser, with which you can
navigate the report data.
Editing Marks
Shows or hides editing marks
(dashed outlines for objects
and report body). If the
option is unselected, the
editing mark will not be
shown when a report object
receives focus, and report
objects cannot be moved or
resized.
Turn To
Provides a submenu for you
to turn the report pages.
Refresh
Runs the report using
previously provided
parameters. The Refresh
operation fetches the data
again.
Zoom
Shows the Zoom dialog for
you to set a zoom ratio for
the report page.
Options
Shows the Options dialog for
you to set the skin and unit
for JReport web, and to
customize toolbars.
Show Grids
Shows grids in the report
area.
Snap to Grids
Snaps an object to grids
when you move it by
dragging and dropping in the
report area. If this option is
enabled, aligning objects will
be made easier. To
temporarily override the
setting, press the ALT key as
you move an object.
Label
Inserts a label into the report.
Image
Inserts an image into the
report.
Report
Banded Object
Inserts a blank banded
object into the report.
Table
Inserts a blank table into the
report.
Crosstab
Inserts a blank crosstab into
the report.
Chart
Shows the Insert Chart
dialog for you to insert a
chart into the report.
Special Fields
Inserts special fields into the
report.
Query Filter
Shows the Query Filter
dialog, with which you can
apply a filter to the business/
report cube used by certain
component.
Filter
Shows the Filter dialog, with
which you can filter the
report records according to
the filter criteria you specify.
Sort
Shows the Sort dialog, with
which you can sort the report
records or groups in
ascending or descending
order on the field(s) you
select.
To Chart
Converts a table or crosstab
into a chart.
To Crosstab
Converts a chart into a
crosstab.
Rotate Table
Rotates a table to switch its
appearance between the
horizontal and vertical layout
modes.
Rotate Crosstab Rotates a crosstab to
exchange the axes on the
crosstab in order to create a
different view of the crosstab.
Help
Merge
Merges selected tabular cells
into one.
Split
Splits a tabular cell into the
specified number of rows and
columns.
Max Records
Allows you to specify the
maximum number of records
retrieved by all components
in the report set.
Use Dynamic
Formula in
Property
Allows you to apply dynamic
formulas to control object
properties.
Style
Allows you to apply a style to
the report.
User's Guide
Opens JReport Web User's
Guide.
Jinfonet
Software Home
Page
Connects to Jinfonet
Software Home Page.
Standard
Toolbar
View Toolbar
Analysis
Toolbar
Technical
Support
Accesses Jinfonet Technical
Support.
About JReport
Web
Shows product information
about JReport Web.
New
Creates a new report based
on an existing business/
report cube.
Open
Brings out the Open Report
dialog for you to open/close
reports in current report set.
Save
Saves the report set as a
report set version.
Save As
Saves a copy of the report
set.
Export
Exports the report result to
disk or version in various
formats.
Printable
Version
Shows the Printable Version
dialog for you to print the
current report result to a PDF/
HTML file.
Undo
Undoes the last operation.
Redo
Reverses the operation of
Undo.
Delete
Deletes the selected object.
Toolbox
Shows the Toolbox panel for
you to insert a component
into the report. Click it again
to hide the Toolbox.
Resource View
Shows the Resource View
panel, with which you can
add cube elements to your
report and create dynamic
resources to use them in
your report. Click it again to
hide the Resource View panel.
Filter
Shows the Filter dialog, with
which you can filter the
report records according to
the filter criteria you specify.
Sort
Shows the Sort dialog, with
which you can sort the report
records or groups in
ascending or descending
order on the field(s) you
select.
Search
Shows the Search dialog for
you to find specific text.
Zoom
Enables you to enlarge or
reduce the size of the report.
Rotate
Rotates a crosstab or rotates
a table.
Chart Type
Lists all available chart types
for you to change the type of
a selected chart.
Font format
buttons
Page
navigation
buttons
Go To dropdown list
Style
Allows you to apply a style to
the report.
Font Face, Font
Size
Changes the face and size of
the selected font. Available
only when a label or field is
selected.
Bold, Italic,
Underlined
Makes the selected font in
bold, italic or underlined
style. Available only when a
label or field is selected.
Left, Center,
Right
Makes the selected font left,
center or right aligned.
Available only when a label
or field is selected.
Max Records
Allows you to specify the
number of records retrieved
by all components in the
report set.
Page Number
Displays the current page
number.
First
Goes to the first page of the
current report.
Previous
Goes to the previous page.
Next
Goes to the next page.
End
Goes to the last page.
Go To
Goes to the selected report
or to the selected report
level.
If a report set contains
several reports, you can use
this list to switch among the
reports. Or, after you
perform some going or
drilling actions on a report,
the structure of the report
will be displayed in the list in
a hierarchical view, with
which you can return to any
level of the report easily.
More
Commands
Shortcut Menu
When the JReport Web
window is not maximized in
Interactive View mode, the
button will be displayed on
the toolbar, by clicking which
you can get all the other
toolbar commands the small
window hasn't enough space
for.
Reset
Reproduces the data of a
banded object using the data
cached in the data buffer.
Filter
Provides submenu items for
filtering the data in a banded
object or removing the
filtering.
Sort
Provides submenu items for
sorting records on the
selected field in ascending/
descending order, or
removing the sorting.
Drill Down
Allows you to drill data
according to predefined
hierarchies.
Drill To
Enables you to obtain a
different view of data by
switching among dimensions.
Drill to By Value Allows you to filter data
based on dimensions while
also obtaining a more
detailed view of the data.
Go To
Goes to any group to show
its record information.
Go Up
Goes up one group level to
show the records of a higherlevel group.
Go Down
Goes down one group level
to show the records of a child
group.
Go to Detail
Goes to the details of a
group.
Conditional
Formatting
Enables you to add
conditional format to the
currently selected field.
Search
Shows the Search dialog for
you to search the report
result for some text.
Query Filter
Shows the Query Filter dialog
for you to apply a filter to the
business/report cube used by
the component.
Report
Shows the Report Properties
dialog for you to view and
edit the report properties.
Properties
Shows a dialog for you to
define the object's properties.
Notes:
●
●
To simplify the toolbars, when you run a report set in JReport Web, only some basic toolbar
commands are displayed by default. To access more report and analysis commands, click the
Interactive View link on the toolbar. However, when you create a new report in JReport Web, you
will be shown the full menu and toolbar commands.
The shortcut menu contents vary with the objects you right-click. The above table only lists some
typical shortcut menu items. The following sections will guide you to use the shortcut menu for any
object you may right-click.
Viewing report sets in JReport Web
You can view report sets in JReport Web either from the user interface or from URLs. Furthermore, you
can simultaneously open multiple DHTML report sets in respective windows or frames.
●
Viewing from the user interface
●
Viewing by typing URLs
●
Opening multiple report sets in one session
Viewing from the user interface
To view a report set in JReport Web from the user interface, follow the steps below:
1. Start JReport Enterprise Server and log onto the JReport Console page.
2. Click Reports on the system toolbar, browse to the folder that contains your report set, then do
one of the following:
❍
❍
Click the report set name in the Name column. If parameters are needed for running the report
set, a dialog will prompt you to assign values to the parameters.
Select the row where the report set is, right-click in the row and then select Advanced Run
from the shortcut menu. In the General tab of the Advanced Run dialog, select the report in the
report set you want to run, specify parameter values if any, then click the Format tab, select
DHTML from the Select Format for Viewing Report drop-down list and click Finish.
3. The report set processing page appears, on which you can choose to cancel the running of the
report set, or to make the report set run in background mode. Click Cancel on this page if you
decide to cancel, Background if you want the report set to run in background mode, or just wait
for processing to complete for viewing and interacting with the report set.
Notes:
●
●
Before you can click the name of a report set on the JReport Console > Reports page to run it in
JReport Web, you should first make sure that the default format for viewing report sets is specified to
DHTML. If not, on the JReport Console page, click Profile on the system toolbar, click Customize
Server Preferences on the task bar of the Profile page, select the General tab, and then select
DHTML from the Default Format for Viewing Reports drop-down list.
When you cancel a report set from running, you can choose whether to cancel the running query
used by the report set in the database at the same time by configuring the JdbcDriversConfig.
properties file. For details, refer to Canceling running query.
Running a DHTML report set in background mode
When you run a report set in DHTML format, if the report set contains a large amount of data, you
need to wait several minutes before the report set results are displayed, and during this period, you
have to retain on the report set processing page, or choose to cancel the running. Now JReport enables
you to make such kind of report sets run in background mode.
To make a report set running in DHTML to run in background mode, on the report set processing page,
click the Background button.
You can also specify to run DHTML report sets automatically in background mode after certain time by
setting preferences. To do this:
1. On the JReport Administration/Console page, click Profile on the system toolbar.
2. Click Configure DHTML Profile on the task bar of the Profile page, then click the Properties >
Advanced tab.
3. Check Background Mode Timeout and specify the time allowed for a DHTML report set to run in
foreground mode.
4. Save the settings, then when a report set runs in DHTML format and the results have not yet been
generated after the specified time, it will be automatically switched to run in background mode.
Report sets running in background mode are listed in the Background Tasks table of the My Tasks
page, which shows detailed running information of the report sets, such as report set path and name,
catalog path and name, running format, time when the task was started/completed, and so on. Also,
you can control the status of the report sets running in background mode according to your
requirements. For example, you can choose to delete, stop, or restart tasks (for details, see Managing
tasks in the task tables).
Once a report set has complete running in background, you can click the report name(s) in the
Background Tasks table to open the corresponding report set, and the task will automatically be
removed from the Background Tasks table.
Viewing by typing URLs
You can use DHTML servlet or JSPs to run a DHTML report set.
Using DHTML servlet
You can call the servlet jrdhtml via URLs to run a report set to the DHTML format. For example:
●
http://localhost:8888/jrdhtml/SampleReports/SampleReports.cat/EmployeeInformation.
cls?
●
http://localhost:8888/jrdhtml/SampleReports/SampleReports.cat/EmployeeInformation.
cls?
jrs.catalog=/SampleReports/SampleReports.cat&jrs.path=/SampleReports.cat/
EmployeeInformation.cls
Using JSPs
You can use three JSPs to run a report set to the DHTML format. They are two Server JSPs, tryView.jsp
and runReport.jsp, and a DHTML JSP dhtml.jsp.
The image below illustrates the relationship between these JSPs that are used to run the DHTML report
sets:
tryView.jsp
This is the normal method of accessing report sets using URLs. If the report set has parameters, the
report parameter page will be shown first for you to specify parameters, otherwise it will directly go to
runReport.jsp. Then it will be redirected to dhtml.jsp when result type is set to the DHTML format, or
else will run to the specified format if the result type is set to other format.
The following is an example of running a report set to the DHTML format using tryView.jsp:
http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.report=
%2fSampleReports%2fEmployeeInformation.cls&jrs.catalog=%2fSampleReports%2fSampleReports.
cat&jrs.result_type=8
runReport.jsp
The runReport.jsp functions the same as tryView.jsp when the report set has no parameter. When it
has parameters, the report set runs with the default parameters if no parameter is specified, or else it
runs with the parameters specified in the URL.
To run a report set to the DHTML format using runReport.jsp, specify the DHTML format as the result
type. See the following example:
http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=jrs.web_vw&jrs.report=
%2fSampleReports%2fEmployeeInformation.cls&jrs.catalog=%2fSampleReports%2fSampleReports.
cat&jrs.result_type=8
dhtml.jsp
If you want to include the DHTML JSPs into your own application without other server JSPs, you can
use this method. However, you must specify the report parameter values in the URL if there are
parameters used by the report set. For example:
http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.catalog=%2fSampleReports%2fSampleReports.
cat&jrs.report
=%2fSampleReports%2fEmployeeInformation.cls
Tip: When you run a report set in DHTML using URL, if you want JReport to automatically refresh the
report data at certain interval, you can set the URL as follows:
http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.report=/USERFOLDERPATH/admin/AutoRefresh/
autorefresh.cls&jrs.catalog=
/USERFOLDERPATH/admin/AutoRefresh/testauto.cat&jrs.auto_refresh_data=true&jrs.
auto_refresh_data_time=10
Opening multiple report sets in one session
You can open multiple report sets in JReport Web in one session. This means that each time you run a
DHTML report set, it will open in a new window. Also, when working in the embedded mode, you can
assign frames to the report sets, so that more than one DHTML report set can be viewed in one window
at the same time.
In order to illustrate how to view multiple frames in one window, a demo has been provided for you.
Follow the steps below:
1. Go to <install_root>\help\server\en\samples to find MultipleReports.zip.
2. Extract MutipleReports.zip to <intall_root>\public_html and a folder named MultipleReports
will be added in <intall_root>\public_html.
3. Access JReport Enterprise Server using http://localhost:8888/MultipleReports/test.jsp.
General operations
After having opened a report set in JReport Web, you can do the following general operations:
●
Managing reports
A report set can include one or more reports. The Go To drop-down list on the toolbar panel lists the
display names of all the open reports in the current report set. Clicking the display name of an
inactive report will make it active. You can manage reports in a report set easily as follows:
❍
Opening and closing a report
In a report set, a report can be shown or not. To close (hide) the active report, click Menu > File
> Close Report. If there is one or more reports open other than the active report, the close action
will hide the active report; in the case that the active report is the only one report open, the close
action will prompt you whether or not to close the report set.
To open (show) a hidden report, click Menu > File > Open (or the Open button
on the
Standard toolbar) to display the Open Report dialog, in which the reports opened in the current
report set are marked with a check symbol. Check the reports you want to open, uncheck the ones
you want to close, and then click OK.
❍
❍
Renaming a report
To rename a report, first activate the report, then click Menu > File > Rename Report. In the
Rename Current Report dialog, specify a new display name for the report.
Deleting a report
To delete a report, first activate the report, then click Menu > File > Delete. The only report open
cannot be deleted.
Tip: If the administrator has specified to switch reports using tabs in the DHTML preferences
page, you can easily activate a report in a report set by clicking the tab representing the report
on the report tab bar, and closing, renaming and deleting a report can also be accomplished by
right-clicking the report tab and choosing the corresponding command from the shortcut menu.
●
Turning the report pages
If a report includes more than one page, to turn between the report pages, you can
❍
Click the First Page button
Page button
●
●
, Previous Page button
, Next Page button
, or Last
on the View toolbar.
❍
Input a number into the page box
and press Enter to go to that page.
❍
Click Menu > View > Turn To and then click the corresponding command on the submenu.
❍
Use the scroll bar or mouse wheel to scroll up/down the report.
Refreshing the report result
To fetch the data of the current report again, you can click Menu > View > Refresh.
Undoing/redoing actions
You can undo or redo some actions by clicking Menu > Edit > Undo or Redo (or the Undo button
or Redo button
●
●
on the Standard toolbar).
Configuring JReport Web features
The JReport Administration page provides default settings for you to use JReport Web features, and
controls whether the settings on the JReport Console page can be configured. A user playing the
"administrator" role may change the settings in the JReport Administration page so as to enable or
disable some features. Then you can configure JReport Web preferences on the JReport Console
page, that is, you can decide whether or not to enable the features which have been enabled on the
JReport Administration page. After you have made changes to JReport Web settings on the JReport
Console page and saved them, JReport Web features available for you will be consistent with your
new settings on the JReport Console page. For details, see Configure DHTML Profile.
Setting JReport Web options
JReport Web allows you to set the skin and customize toolbars. To do this:
1. Click Menu > View > Options (or right-click anywhere on the toolbar area and select Options
from the shortcut menu).
2. In the Option tab, set the skin of JReport Web user interface.
3. In the Customize tab,
■
To modify a toolbar, select it in the Current Toolbar box, remove those unnecessary items
from the Selected Tools box, and add required tools from the Available Tools box. Click
or
to adjust the order of the tools on the toolbar.
■
■
To add a toolbar, click
to show the New Toolbar Name dialog, then specify the toolbar
name, click OK to return to the Options dialog, and set the tools for the new toolbar.
To delete a toolbar, select it and click
.
4. To load the default settings, including the skin, and the three built-in toolbars, namely Standard,
View, and Analysis, click the Restore Defaults button.
5. Click OK to apply the settings.
Tip: To close a toolbar, right-click anywhere on the toolbar area, then on the shortcut menu,
select the item corresponding to the toolbar name. You can also do this to open an invisible
toolbar, such as a newly-created one. The open/close toolbar operation can also be achieved by
clicking the corresponding item on the Toolbar submenu of the View menu.
●
Showing/hiding user information
The User Information bar shows the current user name, catalog path and name, and report set path
and name. You can click Menu > View > User Information Bar to show or hide the bar.
Tip: To make this bar open by default, log onto the JReport Administration page, click the
Profile tab on the system toolbar, click the Configure DHTML Profile > Properties >
Default tab, and then check the User Information Bar option.
●
Showing/hiding editing marks
In JReport Web, you can use editing marks (dashed outlines of objects) for purpose such as aligning,
moving and resizing. By default, the editing marks are shown only when you create a new blank
report in JReport Web. You can click Menu > View > Editing Marks to switch the status of the
editing marks as required.
●
Tuning report page magnification
on the
You can zoom in or out the report page by selecting a magnification from the Zoom list
View toolbar. You can also click Menu > View > Zoom to show the Zoom dialog, and then specify
the magnification.
●
●
●
Asking for help
At any time, you can click Menu > Help > User's Guide to open the index page of JReport Web
User's Guide. Furthermore, you can click the Help button in any dialog to show the help about the
dialog. You can also use the Help menu to open the User's Guide and access Jinfonet Software
website for more information.
Setting up the page
To set up the report page, click Menu > File > Page Setup. In the Page Properties dialog, specify
the page type, the orientation, and the margins as required.
Printing the report result
You can print the report result to a PDF/HTML file. To do this, click Menu > File > Printable
Version (or the Printable Version button
on the Standard toolbar). In the Printable Version
dialog, specify the settings as required and then click OK. The PDF/HTML result file will be opened in
an associated program with which you can print the result to a printer.
●
Exiting the report set
If you want to close the current report set and release the resources, just click Menu > File > Exit
(or the Exit button
which is always on the upper right corner of the JReport Web window, or the
close button of the browser window). Closing the only report open will also prompt you whether or
not to close the report set. In case that you have modified the report set without saving it, JReport
Web will prompt you to save the report set. If you have changed the sort and/or filter criteria, you
can check Sort and/or Filter in this dialog to save these changes with the report set. Click Yes to
save the report set and close the report set.
Ad hoc reporting
Ad hoc reporting allows a business analyst or end user to create a new report, add new objects to an
existing report, modify report objects, and save the report set or report result. These tasks are
performed in the JReport Enterprise Server environment and do not require use of JReport Designer.
Note: Some functions described in this section use the JReport Live feature of JReport Enterprise
Server. If the JReport product you are using is not licensed for JReport Live you will not be able to
perform the tasks described in this section.
This section describes the following ad hoc reporting tasks:
●
Creating a report
●
Adding report objects
●
Making simple modifications to report objects
●
Saving the report set
●
Exporting the report result
Creating a report
In JReport Web, you can create a new report based on a predefined business/report cube to the current
report set. You can also create a new report set containing one report and then add reports to it.
However, the reports created on business/report cubes in JReport Web cannot be edited in JReport
Designer any further.
If you do not have JReport Live, please contact your Jinfonet Software account manager to obtain a
license first in order to use this feature.
To create a report:
1. In a JReport Web window, click Menu > File > New Report (or the New Report button
the Standard toolbar) to display the New Report dialog.
on
If you click Menu > File > New Report Set, the New Report Set dialog will appear for you to
create a report set with the first report in it.
2. Specify the title of the report as required in the Report Title text box.
3. In the Choose Report Layout box, select the required layout with which you want to create the
report.
4. Click OK to create the report.
❍
❍
If Blank Report is selected as the layout, a report which is blank will be created. You can then
use the Toolbox and the Resource View panels to add objects and cube elements to the report.
If you select the layout as Standard Banded Report, Table Report, Chart Report, or Crosstab
Report, the corresponding report wizard will then be displayed. Specify the settings according to
your requirements.
Notes:
●
●
Before you can create a report in JReport Web, you need to first make sure that the catalog
corresponding to the current report set contains one or more business/report cubes and that the Popup Blocker is not enabled on your web browser.
On the JReport Console > Reports page, you can also directly create a new report set (containing a
report) in a folder into which one or more catalogs containing some business/report cubes have been
published. To do this:
1. Open the folder and select the catalog for the new report set from the Catalog drop-down list.
2. Click Ad Hoc Report on the task bar of the Reports page.
3. In the New Report Set dialog, create the report set containing a report as required.
The following topics show in detail how to create a report from particular layouts:
●
Creating a standard banded report
●
Creating a table report
●
Creating a chart report
●
Creating a crosstab report
Creating a standard banded report
To create a standard banded report, follow the steps below:
1. Take steps 1 and 2 in Creating a report.
2. Select Standard Banded Report as the layout and click OK to display the Standard Banded
Report Wizard.
3. In the Data screen, select the business/report cube in the current catalog, on which the banded
object will be built.
4. In the Display screen, add the required fields from the Resources box to be displayed in the
banded object. Modify the display name of any added field if necessary.
5. In the Group screen, add the dimension objects
as the grouping criteria, then specify the
sorting direction of each group in the Sort column.
6. To add summaries, go to the Summary screen. Select the group to which the summary will be
applied, then add a measure object
as the summary field.
7. In the Query Filter screen, select the filter you want to apply to the business/report cube.
8. In the Style screen, apply a style to the banded object.
9. Click Finish to create the report.
See also Standard Banded Report Wizard for details about options in the wizard.
Creating a table report
To create a table report, follow the steps below:
1. Take steps 1 and 2 in Creating a report.
2. Select Table Report as the layout and click OK to display the Table Report Wizard.
3. In the Data screen, select the business/report cube in the current catalog, on which the table will
be built.
4. In the Display screen, add the required fields from the Resources box to be displayed in the table.
Modify the display name of any added field if necessary.
5. In the Group screen, add the dimension objects
as the grouping criteria, then specify the
sorting direction of each group in the Sort column.
6. To add summaries, go to the Summary screen. Select the group to which the summary will be
applied, then add a measure object
as the summary field.
7. In the Query Filter screen, select the filter you want to apply to the business/report cube.
8. In the Style screen, apply a style to the table.
9. Click Finish to create the report.
See also Table Report Wizard for details about options in the wizard.
Creating a chart report
To create a chart report, follow the steps below:
1. Take steps 1 and 2 in Creating a report.
2. Select Chart Report as the layout and click OK to display the Chart Report Wizard.
3. In the Data screen, select the business/report cube in the current catalog, on which the chart will
be built.
4. In the Type screen, specify the chart type as required.
A default chart type exists in the Chart Type Groups box. To replace it with another one, select a
chart type from the Chart Type box. The thumbnails of the subtypes in this type will then be
displayed in the Subtype box. Select the required subtype to replace the default chart type.
If you want to create a combo chart, click <Add Combo Type> of Primary Axis or Secondary Axis
in the Chart Type Groups box, and an additional subtype will be added. To replace the additional
subtype, select it, then specify the required type and subtype respectively in the Chart Type and
Sub Type boxes.
To add more subtypes, repeat the procedures. To remove a subtype, select it and click
.
5. In the Display screen, select a dimension object
in the Resources box and add it to the
Category or Series box, the data of which will be displayed on the corresponding axis. Select a
subtype in the Show Values box, then add a measure object
as the data of the subtype (you
can add more than one measure object to a subtype). Each added subtype shall have at least one
measure object.
6. If you want to specify some order/select N condition on the category/series axis of the chart, click
the Order/Select N button below the Category/Series box, then define the condition in the Order/
Select N dialog as required.
a. In the Order box of the dialog, specify in which order values in the category/series axis will
be sorted.
b. In the Select N box, specify the Select N condition to All, Top or Bottom. If All is selected, all
category/series values will be shown in the chart; if Top/Bottom is selected, the combo box
next to it will be enabled and you can specify an integer here, which means that the first or
last N category/series values will be shown in the chart.
c. If the Based on checkbox is unchecked, the order for the top or bottom N values will be
based on what you specify in the Sort box of the dialog; if you check it, the order will be
based on the values of the summary field and the sort direction you specify in the drop-down
list next to the Based on checkbox.
d. If you have selected Top or Bottom from the Select N drop-down list, then you can check the
Other checkbox and the type a character string in the next text box, so that the those
category/series values beyond the first or last N range will be merged into the group with the
name as that character string.
e. Click OK to accept the settings and return to the Chart Report Wizard.
7. In the Query Filter screen, select the filter you want to apply to the business/report cube.
8. In the Style screen, apply a style to the chart.
9. Click Finish to create the report.
See also Chart Report Wizard for details about options in the wizard.
Creating a crosstab report
To create a crosstab report, follow the steps below:
1. Take steps 1 and 2 in Creating a report.
2. Select Crosstab Report as the layout and click OK to display the Crosstab Report Wizard.
3. In the Data screen, select the business/report cube in the current catalog, on which the crosstab
will be built.
4. In the Display screen, select a dimension object
and click
or
to add it to the Columns
or Rows box as a group field. Select a measure object
and click
to add it to the
Summaries box as an aggregate field. Repeat this to add more group/aggregate fields.
5. In the Display Name column, edit the display names of the added group fields or aggregate fields
if required.
6. In the Sort column, specify the sorting manner for the group fields.
7. If you want to remove any group/aggregate field, select it and click
group/aggregate fields, select a group/aggregate field and click
. To adjust the order of the
or
.
8. In the Query Filter screen, select the filter you want to apply to the business/report cube.
9. In the Style screen, apply a style to the crosstab.
10. Click Finish to create the report.
See also Crosstab Report Wizard for details about options in the wizard.
Adding report objects
For a newly-created or existing report, if the corresponding catalog contains business/report cubes,
then you can add labels, images, banded objects, tables, crosstabs, charts and special fields to the
report. A JReport Live license is required to use this feature, if you do not have the license please talk
to your Jinfonet account manager.
To add an object into a report:
1. On the Insert menu, click the command corresponding to the object you want to add.
2. Point to the destination where you want the object to be added, and then click the mouse button.
❍
❍
❍
If you specify to add a label, a label will be inserted there. Edit the text of the label and format it
according to your requirements.
If you specify to add an image, the Insert Image dialog will be displayed. Specify the source of
the image as required (for details, see Insert Image dialog).
If you specify to add a banded object, table, crosstab, or chart, the corresponding report wizard
will be displayed. Specify the settings in the wizard according to your requirements (for details,
see the specific topic in Creating a report).
Note: When the banded object, table, crosstab or chart is to be added into a banded object
(for a chart, to a table also), by default, it will take on the style of its parent. However, if
you want to apply another style to the banded object, table, crosstab or chart, uncheck the
Inherit Style option in the Style screen of the report wizard and select the required style
from the Style box instead.
3. If you specify to add a special field, the special field will be inserted there (for details about the
usage of each special field, See Special fields in the JReport Designer User's Guide).
Alternatively, you can also use the Toolbox panel to add objects other than special field into a report by
dragging them from the panel to the destination. However, in order to use the Toolbox panel to add
components, you should make sure that this ad hoc feature is enabled in the specified DHTML feature
profile. This setting can only be made by administrators.
Making simple modifications to report objects
By virtue of JReport Web's powerful ad hoc functions, you can make simple modifications to report
objects at runtime while viewing the report in DHTML.
Moving a component and DBFields/labels in it
A component (table, tabular, banded object, chart or crosstab), can be easily moved to a new position.
What you need to do is clicking anywhere in the component, then dragging the icon
appearing at its
upper left corner to the destination. After JReport Web has finished processing, the component will be
redrawn in the new location.
Also, the DBFields and labels in a component can be moved. You can use the following two ways to
move:
●
●
Drag the DBField or label to the position you want.
To move the DBField or label to an exact position, right-click the DBField or label you want to move,
on the shortcut menu, select Property and then in the General tab of the corresponding properties
dialog, modify the values of X and Y options.
Notes:
●
●
Before you can move any object in a report, you need to first make sure that the JReport Web
window is in the Interactive View mode.
For reports designed in JReport Designer, only the components whose Position property value is
absolute, and the DBFields or labels which have been defined as a cube element can be moved in
JReport Web.
Resizing a component and its elements
To resize a component, click anywhere in the component, when the icon
appears at its upper left
corner, click the icon to select the component, then you will see that it is surrounded by a rectangle
with three resizing handles. Point to a handle, when the mouse pointer turns to a double-headed arrow,
you can drag the handle to resize the component.
To resize a panel in a banded object, select it and drag the resizing handle to the desired position.
To adjust the width/height of a column/row in a table, point to the right/lower boundary of the column/
row, when the mouse pointer becomes a horizontal/vertical double-headed arrow, drag the handle and
the width/height of the column/row will change. This will also resize all cells in the column or row.
For a crosstab, you can resize its rows and columns the same as you do with a table.
For a tabular, point to the boundary between two cells and the mouse pointer will become a doubleheaded arrow, you can then drag the boundary to adjust the size of the related cells.
To change the width and height of a field, click any value of this field to select it, then drag the right or
lower resizing handle on its borders to a new position, and the width or height of the field will change.
You can also do this for any label.
Notes:
When resizing table rows:
●
❍
❍
If you resize the table header, only the height of the header will be changed. However, when you
resize any row except the header, the height of all rows in the table will be changed at the same
time.
If there are some groups in a table and the height of one group row is changed, the other group
rows will not be resized.
When resizing crosstab columns/rows:
●
❍
❍
If you resize the horizontal/vertical header of a crosstab, other rows/columns will not be affected.
If you resize the total column/row of a crosstab, other columns/rows will not be affected, vice
verse.
Hiding/showing an object
To hide a component, click on the component, when the icon
appears at its upper left corner, rightclick on the icon and then select Hide from the shortcut menu.
To show a hidden component, right-click the object containing the component, then on the shortcut
menu, select the component name from the Show submenu.
For objects such as text boxes, lists, drop-down lists, fields, and labels, you can also right-click it and
then select Hide to hide it, and show it in the same way as for showing a component. Banded panels
can also be hidden in this way.
Modifying object properties
JReport Web allows you to modify object properties with the corresponding properties dialog.
●
To format the properties of any object in a report, including label, data field, special field, image,
multi-value container (list and drop-down list), text box, banded panel, table cell and tabular cell,
right-click the object and then select Properties from the shortcut menu. In the corresponding
properties dialog, specify the settings as required.
For a table cell, you can also right-click any field value (or label) in this cell, and then select Table
Cell to show the Table Cell Properties dialog; with regard to a table row, you can right-click any field
value (or label) or cell in the row, and then select Table Row to show the Table Row Properties
dialog.
Tip: If you just want to modify the text related properties for a field or label, for example, you
want to change the text alignment or make the text bold, you can achieve it by simply selecting
the field or label, then clicking the corresponding buttons on the toolbar.
●
To modify the properties of a component (banded object, table, crosstab, and tabular), click on the
component, when the icon
appears at its upper left corner, right-click on the icon and select
Properties from the shortcut menu to show the corresponding properties dialog. For a table, you
can also right-click any field or cell in it and then select Table from the shortcut menu to show the
Table Properties dialog.
For a chart, you can right-click the icon
or any part of the chart except for the legend and label
and select Format Platform or Format Paper to modify the chart platform or paper properties, and
you can also right-click the legend of the chart and select Format Legend from the shortcut menu
to set its legend properties. For any label in a chart, you can right-click it and select Format Label
to edit its properties.
●
●
●
You can right-click a group header/footer panel in a banded object, and then select Group to show
the Group Properties dialog in order to define the group properties.
If you want to format the properties of the report, right-click the blank part of the report, select the
Report item from the shortcut menu, then in the Report Properties dialog, configure the properties
as required.
To set up report page properties, click Menu > File > Page Setup, then in the Page Properties
dialog, specify the settings according to your requirements.
For detailed explanation about options in the properties dialogs, refer to the specific topics in JReport
Web dialogs.
Deleting an object
An object can be removed from the report if it is no longer required. However, objects that are in a
subreport cannot be deleted.
●
●
To delete a table, tabular, banded object, chart, or crosstab, click on the component, when the icon
appears at its upper left corner, right-click on the icon and select Delete from the shortcut menu,
or you can drag the icon outside the report page. Then, a message box will prompt, asking for your
confirmation. Click OK in the message box so as to remove the component.
For a field, you can drag any value of the field outside the report page to remove it. You can also
drag any label outside the report page to remove it. Right-clicking and then selecting Delete is
another way to achieve this.
Saving the report set
You can save your report set in a JReport Web window. To do this, click Menu > File > Save (or the
on the Standard toolbar). The Save Report Template dialog appears. The Sort and
Save button
Filter options in this dialog signify whether or not to include the sort and filter criteria when saving.
Specify the options as required, then click OK, and the report set will be saved as a report set version.
If the report set is newly created and has not yet been saved, the Save As dialog will be displayed.
1. In the Report Set Name box, enter the name of the report set as required. Select a file format
from the format drop-down list.
2. From the Folder drop-down list, specify where the report set will be saved: Public Reports or My
Reports.
3. From the Directory drop-down list, further specify the directory in which the report set will be
saved.
4. Optionally, input some text in the Description box as a description for the report set.
5. Click the Advanced button to set the advanced settings for the report set if required.
a. From the Catalog drop-down list, select the catalog for the report set.
b. Specify the relationship between the saved report set and the catalog used to run it
(activated only when Select Catalog Linked Model is checked in the Profile > Configure
DHTML Profile > Properties > Advanced tab):
■
■
Set Original Catalog as Linked Catalog into Saved Report Set
If checked, the saved report set will be linked with the catalog and the saved report set will
run within the catalog no matter whether the two are in the same directory. If later the
catalog is updated, the saved report set will run within the latest catalog.
Set Catalog Copy to Public Reports/My Reports
If checked, the catalog will be copied to the directory where the report set is saved and the
saved report set will run within the copied catalog.
c. If you want to save the report set together with the sort and filter criteria, check Save Sort
Criteria and Save Filter Criteria correspondingly. With the criteria saved, JReport Web will
automatically apply them to the report set the next time it is opened.
6. Click OK to save the report set.
To save a copy of a report set, click Menu > File > Save As (or the Save As button
Standard toolbar) to show the Save As dialog, and then do as above.
on the
Notes:
●
●
●
You will not be able to save the report set to some locations if you do not have the required
permissions. You need to have Write access to the directory.
If the report set of the same name already exists in the directory you have specified, a message box
will prompt you whether or not to overwrite it.
To find a newly saved report set version, browse to select the row that the report set is in on the
JReport Console or Administration page, click Version on the task bar of the Reports page, and then
click the Report Set Versions tab.
Exporting the report result
When you are satisfied with the result of the active report, you may want to export it as a result
version or as a local file to other formats.
The following topics describe exporting report results in detail:
●
Exporting the result from a JReport Web window
●
Exporting the result by using a JavaScript function
●
Customizing buttons for one-step exporting
●
Controlling user access to different export formats
●
Customizing warning messages
Exporting the result from a JReport Web window
You can export the report result from a JReport Web window to other format by taking the following steps:
1. Click Menu > File > Export (or the Export button
Export dialog.
on the Standard toolbar) to display the
2. From the Select Report Result Format drop-down list, select a format in which to export the result:
HTML, PDF, Excel, Text, RTF, XML, PostScript, or DHTML Result.
3. If you check the Enable Style Group option, select a style to apply to the report result from the
Style Group drop-down list.
This option is disabled by default, which means the style group property defined for specific exporting
format in JReport Designer will be applied to export the report result to that format. For example, if
you set the HTML Style Group property of a report to Classic in the Report Inspector, when you
specify to export the report result to HTML format, the Classic style group will be applied to the
report result. You can refer to Style Group for Exporting in the JReport Designer User's Guide for
details.
When this option is enabled, you are allowed to select another style group to export report result in
the specified format from the Style Group drop-down list. However, the style set here is a dynamic
style and therefore cannot work in the report section that has already been set a static style because
of its lower priority. When the None item is selected in the list, no dynamic style will be applied when
exporting the report in the format. If one of the other styles is selected, it will be used as dynamic
style group of the exported result.
4. Specify the destination of the result:
❍
❍
❍
Save to Version System: The result will be saved as a result version in JReport Enterprise
Server's versioning system.
Save to File System: The web browser will prompt you to save the result file to a specified folder.
If selected, you need to provide a name for the result file in the File Name field.
View Report Result: The result will be directly opened in the web browser if the format is
supported by a plug-in of the web browser; otherwise it will prompt you to save the result file.
5. Set the options for the selected format (for details about settings of each format, see Export dialog).
6. Click OK to confirm.
Exporting the result by using a JavaScript function
JReport Enterprise Server provides you with a JavaScript function which allows you to open the report
result or export it in a specified format. You can find this function in the file API.js in
<server_install_root>\public_html\javascript\dhtml, as shown below:
function user_oneStepExport(type, options)
The following explains this function's two arguments, type and options, in detail.
type - Specifies the export format.
●
HTML = 0
●
PDF = 2
●
PS = 3
●
RTF = 4
●
TEXT = 5
●
EXCEL = 6
●
XML = 7
options - Specifies the values of the options of each format. It is a string array whose member is of
the format "key=value". The options and their usage are listed as follows:
Description
Available Value
Default
Value
to_ver
Specifies whether or not to save the result to
version.
true, false
false
to_open
Specifies whether or not to export and open the
result file.
true, false
false
to_local
Specifies whether or not to save the result to a
local file.
true, false
false
browser
Specifies the web browser type.
0: Internet Explorer.
0
Key
HTML
1: Netscape.
2: Firefox.
imagetype
Specifies the type of the images in the result file.
0: Decided by JReport.
0
1: GIF.
2: JPG.
overflow
Specifies the overflow type.
0: VISIBLE.
0
1: HIDDEN.
2: VERFLOWCOUNT.
resolution
Specifies the HTML resolution.
Any integer between 1 and
4294967296.
96
title
Specifies the title for the HTML file.
Any string
""
applet
Specifies whether or not to export chart(s) in Java
applet format.
true, false
true
css
Specifies whether or not to embed the cascading
style sheet in the exported HTML files.
true, false
false
multi
Specifies whether or not to generate an HTML file
for each page of the report result.
true, false
false
hyperlink
Specifies whether or not to contain hyperlinks in
the HTML file.
true, false
false
pagenumber
Specifies whether or not to contain page numbers
in the HTML file.
true, false
false
drilldown
Specifies whether or not to include the drilled-down true, false
file in the exported HTML file.
false
no_margin
Specifies whether or not to remove the original
margins.
true, false
false
absolute
Specifies whether or not to make the font size fixed true, false
in the web browser.
false
to_ver
Specifies whether or not to save the result to
version.
true, false
false
to_open
Specifies whether or not to export and open the
result file.
true, false
false
to_local
Specifies whether or not to save the result to a
local file.
true, false
false
no_margin
Specifies whether or not to remove the margin.
true, false
false
simulate
Specifies whether or not the mode is to be
Simulated Printing Mode.
true, false
true
standard
Specifies whether or not to set the mode as
Standard Mode.
true, false
false
content
Specifies whether or not to contain the TOC in the
exported PDF file.
true, false
false
drilldown
Specifies whether or not to include the drilled-down true, false
file in the exported PDF file.
false
encrypt
Specifies whether or not to encrypt the report
result.
true, false
false
compress
Specifies whether or not to compress the images in
the report.
true, false
false
ratio
Specifies the percentage with which to compress
the images in the report.
Any integer between 1 to 100.
20
compatibility
Specifies the encryption compatibility.
0: Acrobat 3.0 and later.
1
PDF
1: Acrobat 5.0 and later.
doc_psw
Specifies the password for opening the PDF file
when encrypt=true.
Any string
""
permi_pasw
Specifies the password for printing and editing the
PDF file when encrypt=true.
Any string
""
printing
Specifies the PDF printing mode.
0: Prevents users from printing 0
the file.
4: Allows low resolutionprinting.
2052: Allows high-resolution
printing.
changes
Defines which editing actions are allowed in the
PDF file.
0: Prevents users from making
any changes to the file).
0
1024: Allows inserting,
deleting, and rotating pages.
256: Allows users to fill in form
fields and adding digital
signatures.
32: Aallows users to fill in form
fields and add digital
signatures and comments.
40: Allows users to do
anything except extracting
pages.
2108: Allows all.
enable_copy
Specifies whether or not to allow users to copy the
file contents.
true, false
false
enable_access
Specifies whether or not to let visually impaired
users read the document with window readers.
true, false
true
to_ver
Specifies whether or not to save the result to
version.
true, false
false
to_open
Specifies whether or not to export and open the
result file.
true, false
false
to_local
Specifies whether or not to save the result to a
local file.
true, false
false
no_margin
Specifies whether or not to remove the margins in
the PS file.
true, false
false
to_version
Specifies whether or not to save the result to
version.
true, false
false
to_open
Specifies whether or not to export and open the
result file.
true, false
false
to_local
Specifies whether or not to save the result to a
local file.
true, false
false
rtf_flow
Specifies whether or not to apply a flow layout
when exporting the report to RTF.
true, false
false
no_margin
Specifies whether or not to remove the margins in
the RTF file.
true, false
false
to_ver
Specifies whether or not to save the result to
version.
true, false
false
to_open
Specifies whether or not to export and open the
result file.
true, false
false
to_local
Specifies whether or not to save the result to a
local file.
true, false
false
repeat
Specifies whether or not to replace a field value of
a record with that of its previous record if the field
value is null.
true, false
false
compress
Specifies whether or not to compress the clearance
between columns.
true, false
false
win_linebreak
Specifies whether or not to use Windows end-ofline characters.
true, false
true
normal
Specifies whether or not to use the standard data
format.
true, false
true
PostScript
RTF
Text
quote_mark
Specifies whether or not to mark the fields in the
exported file with quotation marks.
true, false
false
head_foot
Specifies whether or not to contain all headers and
footers in the report.
true, false
true
delimiter
Specifies the delimiter.
Any single character
width
Specifies the user-defined character width.
An integer
height
Specifies the user-defined character height.
An integer
to_ver
Specifies whether or not to save the result to
version.
true, false
false
to_open
Specifies whether or not to export and open the
result file.
true, false
false
to_local
Specifies whether or not to save the result to a
local file.
true, false
false
wrap
Specifies the word-wrap setting.
0: All Keep Existing.
0
Excel
1: All Disabled.
2: All Enabled.
new_layout
Specifies whether or not to use the new layout
mode.
true, false
true
shapes
Specifies whether or not to include the shapes in
the exported file.
true, false
false
excel_2000
Specifies whether or not to export the result in
Excel 2000 format.
true, false
false
advanced
Specifies whether or not to apply the advanced
options.
true, false
false
header
Specifies the page header text.
Any string
footer
Specifies the page footer text.
Any string
gridline
Specifies whether or not to print gridlines when
printing the exported Excel file.
true, false
false
to_ver
Specifies whether or not to save the result to
version.
true, false
false
to_open
Specifies whether or not to export and open the
result file.
true, false
false
to_local
Specifies whether or not to save the result to a
local file.
true, false
false
only_data
Specifies whether or not to only contain the
database column information in the exported XML
file.
true, false
false
schema
Specifies the name of an existing schema file with
its full path with which to generate the XML file.
An existing schema file with its
full path.
XML
Notes:
●
●
The three options to_ver, to_open, and to_local are mutually exclusive, that is, only one of them
should be true, and the rest false. If you set two or three of them to true, JReport will only accept
the first true and treat the rest as false. If you set all three to false, JReport will consider to_open as
true.
In the string array options, the members are separated by commas (","). You can arrange the
members in any order, and omit those keys where you want to use the default value. For example,
you can define a variable html_options:
var html_options = ["imagetype=1", "resolution=120", "hyperlink=true",
"no_margin=false", "title=hello world"];
Then, you can use user_oneStepExport(0, html_options) to obtain a URL for exporting the report
result in HTML format.
●
JReport also provides the function user_downloadReport(type, options) whose usage is similar to
user_oneStepExport.
Customizing buttons for one-step exporting
Seven buttons are provided for one-step exporting. They are Export to PDF, Export to Excel, Export to
RTF, Export to HTML, Export to Text, Export to PS, and Export to XML. By default, the buttons are
invisible on the toolbar area. You have to add them to the toolbar area by modifying the index.jsp file
in <install_root>\public_html\dhtmljsp.
Use the following two API functions to control the buttons:
public void customizeToolbar(String SessionId, String RptSetId, String toolbarname, int[] buttonId);
●
●
public void customizeToolbar(String SessionId, String RptSetId, String toolbarname, int[] buttonId,
boolean isVisible);
Explanation of these parameters:
●
SessionId - session ID, which can be retrieved by DHTMLUtil.getSessionID(request).
●
RptSetId - report set ID, which can be retrieved by obDHTMLUtil.getRptSetId(request).
●
toolbarname - toolbar name, such as "Standard", "Analysis", "View", or user-defined ones.
●
buttonId[] - toolbar button ID. It is an integer array, so you need define an integer array variant.
For example: int[] mybuttonid ={DHTMLConstant.TOOLBAR_EXPORTTOPDF, DHTMLConstant.
TOOLBAR_EXPORTTOXLS, TMLConstant.BTN_EXPORT_TO_RTF}
The array elements available for one-step exporting are:
●
❍
DHTMLConstant.TOOLBAR_EXPORTTOPDF
❍
DHTMLConstant.TOOLBAR_EXPORTTOXLS
❍
DHTMLConstant.TOOLBAR_EXPORTTORTF
❍
DHTMLConstant.TOOLBAR_EXPORTTOHTML
❍
DHTMLConstant.TOOLBAR_EXPORTTOTEXT
❍
DHTMLConstant.TOOLBAR_EXPORTTOPS
❍
DHTMLConstant.TOOLBAR_EXPORTTOXML
isVisible - whether or not to show the button(s) defined with buttonID[]. true -- show, false -- hide.
This parameter can be absent, and then the value is true.
For example, if you want to add the Export to HTML button to the Export toolbar, then:
1. Open the file index.jsp.
2. Add the code
int[] temparray = {DHTMLConstant.TOOLBAR_EXPORTTOHTML};
dhtmlConfig.customizeToolbar(SessionID, RptSetId, "Export", temparray, true);
before
//<!-- Tool Bar -->
if(dhtmlConfig.isFeatureEnabled(SessionID, RptSetId, DHTMLConstant.
FEATURE_TOOLBAR)){
3. Start JReport Enterprise Server.
4. Run a report set in the DHTML format, and you will see a new button Export to HTML is displayed
on the Export toolbar.
To add more than one button to the toolbar area, for example, adding Export to HTML and Export to
PDF buttons to the Export toolbar:
1. Open the file index.jsp.
2. Add the code
int[] temparray = {DHTMLConstant.TOOLBAR_EXPORTTOHTML, DHTMLConstant.
TOOLBAR_EXPORTTOPDF};
dhtmlConfig.customizeToolbar(SessionID, RptSetId, "Export", temparray, true);
before
//<!-- Tool Bar -->
if(dhtmlConfig.isFeatureEnabled(SessionID, RptSetId, DHTMLConstant.
FEATURE_TOOLBAR)){
3. Start JReport Enterprise Server.
4. Run a report set in the DHTML format, and you will see the buttons Export to HTML and Export to
PDF are displayed on the Export toolbar.
5. Click the added button on the toolbar of the report page, the report will be exported to the
corresponding format, using the default values of the format options.
Controlling user access to different export formats
JReport introduces an access control ability which can restrict different users to export report result to
different formats.
How to realize the access control ability
You can restrict the report result formats for users by passing values to a variable. That is the global
variable enableTypes in both customize_panel.jsp and save_result.jsp files in <install_root>
\public_html\dhtmljsp folder. The value of enableTypes should be Integer, and JReport gives you the
following integers to represent the corresponding report result types:
Report Result
Format
Int. Value
HTML
0
PDF
1
Excel
2
Text
3
RTF
4
XML
5
PostScript
6
You can specify a value or an array to enableTypes using the integers in the above table. Or you can
also use the integers which are not mentioned above, but if you do so, the Int. values will be ignored,
and do not function. That is to say, if you pass the array {1,2,5,9,-2} to enableTypes, 9 and -2 will be
ignored and {1,2,5} will work, so PDF, EXCEL, XML formats can be in use.
Example
Assume that there are two users, user1 and user2. When user1 logs on, run a DHTML report set, he
can only export the report result as PDF and HTML formats. While user2 can export the report result as
RTF and XML formats when logging on. To realize it, you can use the following codes in
customize_panel.jsp or save_result.jsp file:
int[] enableTypes=null;
String UserName=null;
UserName=DHTMLUtil.getUserName(request);
if(UserName.equalsIgnoreCase("user1"))
enableTypes=new int[]{1,0};
if(UserName.equalsIgnoreCase("user2"))
enableTypes=new int[]{4,5};
Customizing warning messages
You can customize the warning messages when exporting the report result to XML through JReport
Web. With this function, you can specify what you want to show as a warning message. The custom
warning messages are supported across web browsers.
To customize the warning messages, you need to customize the jsp files using either of the following
two methods:
Method 1
1. Open the save_result.jsp file in the <install_root>\public_html\dhtmljsp folder with your
favorite editor.
2. Specify the value of customMsgForXML in the save_result.jsp to whatever you want. The value
cannot be "" or null.
3. Run a report set in JReport Web, click Menu > File > Export to display the Export dialog.
4. Select XML from the Select Report Result Format drop-down list, and if necessary, modify other
properties as required, then click OK.
5. A warning message shows as you have defined.
Method 2
You can also export the report result via the Export panel instead of clicking Menu > File > Export. By
default, the panel is hidden. So, the following is another way to create custom warning messages:
1. Open the customize_panel.jsp file in the <install_root>\public_html\dhtmljsp folder with your
favorite editor.
2. Set the class of panelDIV to visibleMargin to show the Export panel on web browser.
3. Specify the value of customMsgForXML in customize_panel.jsp.
4. Run a report set in JReport Web, and the Export panel together with the report set shows.
5. Select XML from the Select Report Result Format drop-down list, and if necessary, modify other
properties as required, then click OK.
6. A warning message shows as you have defined.
For example, using method2, when you need to export the report result as XML, and if you want to
show "This is IE Browser" while browser is IE, you need to set panelDIV in customize_panel.jsp file to
visibleMargin as follows:
<div id="<%=DHTMLConstant.DHTML_PREFIX%>panelDIV" class="visibleMargin">
And then customize CustomMsgForXML in the same jsp file as follows:
String browserName=request.getHeader("User-Agent");
String customMsgForXML ="This is "+browserName;
Access JReport Enterprise Server via IE, run a report set in JReport Web, select XML from the Select
Report Result Format drop-down list in the Export panel, and click OK. Then a pop-up box will show
you "This is IE Browser".
DHTML based reporting
JReport Web reporting enables enterprise-wide information delivery. With JReport Web, organizations
can harness the power of the Internet, giving users across the enterprise the ability to access and
generate reports from their own web browsers.
The DHTML based reporting function of JReport empowers you to perform the following operations:
●
Filtering report data
●
Sorting report data
●
Searching for text in a report
Filtering report data
In JReport Web, data is cached in a data buffer. You can set a series of conditions and apply them to a DHTML
server to filter the data buffer and reproduce the report result.
There are three methods you can use to set the filter conditions: using the Filter dialog, using the shortcut
menu, and using labels. However, when you are to filter a crosstab or chart, you can only use the Filter dialog.
The other two methods do not apply to crosstabs and charts.
Using the Filter dialog
To set the filtering conditions using the Filter dialog:
1. Click Menu > Report > Filter (or the Filter button
on the Analysis toolbar) to show the Filter dialog.
2. Select the component on which the filtering will be based from the Apply to drop-down list.
3. Click the Add Condition button to add a filter line.
4. From the field drop-down list, select the field on which the filter will be based.
5. From the operator drop-down list, set the operator with which to compose the filter expression.
6. Type the value(s) of how to filter the field into the value text box, or click the button
to specify one or
more values in the Select Values dialog (for details about how to define values in the dialog, refer to Select
Values dialog).
7. To add another line of filter expression, click the Add Condition button and define the expression as
required, then from the logic drop-down list, specify the relationship between the two filter expressions.
8. Repeat the above steps to add more filter expressions if necessary.
To make some conditions grouped, select them and click the Group button, then the selected conditions
will be added in one group and work as one line of filter expression. To make any condition in a group out,
select it and click Ungroup.
To adjust the priority of the conditions, select it and click the Up or Down button.
To delete a condition you have already added, select the condition and click the Delete button.
To retrieve the opening status of this dialog, click Reset.
9. Click OK to make the filter take effect and return to the report.
Using the shortcut menu
You can also use filter-related commands on the shortcut menu to filter the data in a banded object or table. To
do this, point to any value of the field by which you want to filter data, then right-click to show the shortcut
menu. You will see the Filter item which provides a submenu containing the following commands:
●
●
Remove Filter
This command is enabled after you have applied filtering on the field to the banded object or table. Clicking
this item will remove all filters on this field.
Top N
Shows the Top N dialog with which you can filter data to display records that meet the Top N condition.
For example, if you input 3 in the Top N dialog for a certain field, then only the records with the field value
equal to one of the first three field values will be displayed.
●
Bottom N
Shows the Bottom N dialog with which you can filter data to display records that meet the Bottom N condition.
For example, if you input 3 in the Bottom N dialog for a certain field, then only the records with the field value
equal to one of the last three field values will be displayed.
●
●
Field values
"Field values" is not the name for a command on the Filter submenu, but represents some items which are the
values of the field you have right-clicked. Selecting any field value listed here will make the banded object or
table only display records with the field value equal to the selected one.
More
This command is enabled if the Filter submenu cannot list all field values. When it is enabled, clicking it will
show the Select Values dialog. You can select one value in this dialog and apply the setting, after which the
banded object or table will only display records with the field value equal to that value.
Using labels
You can also use a label to control the filter condition in a banded object or table. This feature needs to be
enabled at report design time.
1. In JReport Designer, select a label in a banded object/table, and then set its Filterable property to true.
2. Set the field by which you want to filter records as the value of the label's Bind Column property.
3. Save the report set and publish it to JReport Enterprise Server.
4. Run the report set in JReport Web, and you can find that a button
is beside the label. Click it to show
the Filter list, which contains All, Top N, Bottom N, Custom Filter, the field values, and More (if there are
too many distinct values for the field), then click the corresponding item to filter the records.
will be affixed with a
After applying a filter on the field decided by the Bind Column property, the button
check mark, and you can still click it to show the Filter list, in which the All item can help you remove the
filters on the field.
Notes:
●
●
●
●
You can also filter records by using the shortcut menu for a label in the same way as for a field value,
provided you have set its Bind Column property value to a field.
When using the shortcut menu for a field value or label to filter, all the items (Remove Filter, Top N, Bottom
N, and More) will be showed by default. If you want to disable some of the items, you should set the field's
Filter Options property when designing the report set in JReport Designer. For details, see Setting filter
options for a field in the JReport Designer User's Guide.
For filtering the data using shortcut menu or labels, you may notice that the corresponding filter expressions
will appear in the Filter dialog if you open this dialog.
JReport allows you to define the display names for fields to be shown in the Filter dialog. For detailed
information, see Customizing the field display names in the JReport Designer User's Guide.
Sorting report data
You can sort the records in a banded object or table, and the groups in a certain group level of the
banded object or table if you have defined one or more group levels. If you want the data of other
types of cube elements to be sorted, you should put the cube element into a banded object or table
and make the data of the cube element inherit from the banded object or table.
●
●
Sorting records: Changing the order of records in the whole banded object or table, or in each
group if there exists one or more group levels. The sorting scope is the whole banded object or table.
Sorting groups in a group level: Changing the order of groups in the group level, that is, the
groups will be sorted by the values of the first record in each group on the related field(s). The
sorting scope is the group level.
You can achieve the above by using the Sort dialog, shortcut menu, or labels.
Using the Sort dialog
To set the sort conditions in the Sort dialog:
1. Click Menu > Report > Sort (or the Sort button
Sort dialog.
on the Analysis toolbar) to bring up the
2. From the Sort in Scope drop-down list, select a banded object/table or a group field on which the
sort condition will be based.
3. From the field drop-down list, select the name of the field on which to sort the data. Set the sort
order to Ascending or Descending.
4. If you select a banded object/table in Step 2, you can click
condition if required, click
and click
or
to add a new row of sorting
to move a row up or down so as to set the sorting priority,
To delete the corresponding sorting condition.
If what you select in the Sort in Scope drop-down list is a group field, then only one sort condition
can be composed.
To retrieve the opening status of this dialog, click the Reset button.
5. Click OK to accept the settings and to reload the result.
Using the shortcut menu
To sort data on a certain field using shortcut menu:
1. Point to any value of a detail field or group field by which to sort the data in the banded object/
table, and then right-click.
2. Choose the command Sort > Ascending or Sort > Descending from the shortcut menu.
If what you right-click in Step 1 is a detail field value, the sorting will affect the order of detail
records in the banded object or table; if it is a group field value, the order of groups in the group
level represented by the group field will be rearranged.
To remove the sort condition on a field, click Sort > No Sort.
Using labels
You can use a label to control the sorting order for a certain field. This feature needs to be enabled at
report design time.
1. In JReport Designer, select a label in a banded object/table, and then set the Sortable property of
the label to true.
2. Set the field by which you want to sort records as the value of the label's Bind Column property.
3. Save the report set and publish it to JReport Enterprise Server.
4. Run the report set in JReport Web, and you can click
beside the label to sort the data. This
button will change after you have clicked it, and you can further click it to switch the sorting
direction among ascending, descending, and no sort.
Notes:
●
●
●
●
●
You cannot sort the data by a global type formula.
You can also conduct sorting by using the shortcut menu for a label in the same way as for a field
value, provided you have set its Bind Column property.
For sorting the data using shortcut menu or labels, you may notice that the corresponding sort
expressions will appear in the Sort dialog if you open this dialog.
If you use the shortcut menu to sort the report data by a field and then sort by another field, the
later sort condition will replace the former one.
JReport allows you to define display names for fields to be showed in the Sort dialog. For detailed
information, see Customizing the field display names in the JReport Designer User's Guide.
●
●
You can right-click an object in a banded object to show a shortcut menu, and then select the Reset
item to reproduce the data of the banded object using the data cached in the data buffer. This will
clear all sort and filter conditions except for those predefined in JReport Designer.
Administrators can customize the buffer size for sorting of each report in the Configuration page of
JReport Enterprise Server so as to improve performance.
Searching for text in a report
You can use the Search dialog to find text in the values of a certain field or in the whole report content.
To show this dialog, click Menu > Edit > Search (or the Search button
●
on the Standard toolbar).
To find text in the values of a particular field:
1. Make sure the Search in Whole Report option in the Search dialog is NOT checked.
2. Select the field from the Select Field drop-down list.
3. Set the range with which to search for the value from the Value Range drop-down list.
4. Select the field value you want to search for from the Value drop-down list.
Note: If All is selected in the Value Range drop-down list, the only item in the Value dropdown list will be All and you cannot change the value, in which case, when you submit the
search, JReport will search for all the values of the selected field.
●
Specify whether or not to match case, whether or not to match whole word, whether or not to
highlight all the matching values and the searching direction.
●
Click the Search button.
●
To find text in the report content:
1. In the Search dialog, check the Search in Whole Report checkbox.
2. Type the string you want to search for in the Value box.
3. Set the other options such as the searching direction.
4. Click the Search button.
Notes:
●
●
●
●
If you check Highlight All in the Search dialog, to clear the highlighting in the search result, uncheck
the option and submit the search again, or refresh the report.
You can also right-click a field value or label (or object such as text box), and then click Search on
the shortcut menu to show the Search dialog.
If you have not selected the Search in Whole Report option, you will not be able to search special
fields for strings.
JReport allows you to define display names for fields to be shown in the Search dialog. For detailed
information, see Customizing the field display names in the JReport Designer User's Guide.
Analytic reporting
JReport Web provides you with a convenient and powerful tool to analyze your business information. By
providing secure web access to business data and making the data interactive, JReport Web facilitates
data analysis.
JReport Web enhances the utility of production reports by making them interactive - allowing you to
define your view of data to make it more useful. Through a user-friendly web GUI, report contents can
be easily navigated, drilled, and viewed in detail.
JReport Web uses the Resource View panel to provide a business-oriented view of databases. This view
shields end users from having to understand database connectivity and SQL syntax while allowing IT
professionals to maintain control of business data and to ensure its integrity. Using the Resource View
panel, JReport Web dynamically builds SQL statements to retrieve data and automatically generate
multidimensional data cubes. These cubes contain the underlying data structure which makes data
analysis possible.
The following topics describe the analytic reporting features:
●
An introduction to business/report cubes
●
Applying filters to business/report cubes
●
Using cube elements
●
Using dynamic resources
●
Drilling through the report data
●
Manipulating components
●
Adding conditional formats to fields
●
Converting between components
●
Navigating through the report data
Notes:
●
●
A component created in JReport Designer is based on a dataset, while that created in JReport Web is
based on a business/report cube. For the former, if you want to do analytic actions in JReport Web,
such as adding a cube element, converting the component type, drilling it, or changing chart
definition, JReport Web will need to convert its fields to cube elements (for details, see Converting
query-based components to report cube-based in the JReport Designer User's Guide). When
conversion conditions are fulfilled, when you perform analytic actions in JReport Web, you will be
prompted with the Convert Data Fields dialog to confirm the conversion. However, if the report
property Automatic Cube Initialization has been set to true when the report is designed in JReport
Designer, the data fields will be automatically converted to cube elements when the report is opened
in JReport Web.
If you do not have JReport Live, please contact your Jinfonet Software account manager for a license.
An introduction to business/report cubes
A business/report cube, which is needed for creating multidimensional data cubes, contains database
connections and relationships between cube elements. The business/report cube shields report end
users from having to understand the physical structure of a data source, and enables them to build
reports and analyze data based on a set of cube elements they can understand. It also enables IT
professionals to maintain control of the business data and ensure its integrity, while presenting end
users with an intuitive view of the underlying data structures.
A business/report cube may contain category objects and cube elements (dimension objects, measure
objects, and detail information objects). You can insert these cube elements or remove them to change
the report result when you view reports in DHTML format.
●
●
Category objects
Category objects contain a collection of cube elements. A business/report cube may contain more
than one category. In the Resource View panel, the icon
indicates that an object is a category.
Categories are only for categorizing cube elements, and they cannot be inserted into a report. The
category is often used for indicating the name of the underlying DBMS table.
Dimension objects
Dimension objects are cube elements that will become the basis for analysis in a report. They
characteristically return text or date values. In the Resource View panel, the icon
indicates that
an object is a dimension object. A dimension object can be inserted wherever a group field can be
inserted into. It can be inserted as a column or row field in a crosstab, or as a group field or detail
field in a banded object or a table, or displayed as category/series field in a chart.
●
Measure objects
Measure objects are numeric cube elements that have been calculated at the data warehouse level.
The icon
indicates that an object is a measure object. A measure object can be inserted to
wherever a summary can be inserted. For instance, it can be inserted into the group header or footer
panel in a table or banded object, or into a crosstab as an aggregate field. A measure object can also
be used as a detail field in a banded object or table. JReport Web will calculate the summary values
based on the group level the measure object has been inserted into.
●
Detail Information objects
indicates that an object is a
Detail Information objects provide additional information. The icon
detail information object. It can be inserted to wherever a DBField can be inserted. For example, you
can insert a detail information object into a table or banded object as a detail field.
Notes: To make use of a business/report cube, you need to first define it at report design time in
JReport Designer. For additional information, see Using business/report cubes in the JReport
Designer User's Guide.
Applying filters to business/report cubes
When creating reports in JReport Web, you can choose to apply some filter to the specified business/report cube to
narrow down the data scope of the business/report cube.
In JReport Web, filter for business/report cubes are defined into two categories: predefined filters and user defined
filters. As the name suggests, predefined filters are defined in advance in JReport Designer (for details, refer to
Defining and applying business filters in the JReport Designer User's Guide), and user defined filters are created
on business/report cubes while they are used in JReport Web.
Filter can be applied to a business/report cube in JReport Web in the following ways:
●
Applying a filter to a business/report cube while creating report with the report wizard
1. In a JReport Web window, click Menu > File > New Report to display the New Report dialog.
2. Specify the title of the report as required in the Report Title text box.
3. In the Choose Report Layout box, select the layout as Standard Banded Object, Crosstab, Table or Chart
and then click OK.
4. In the corresponding report wizard, select the required business/report cube for the report, and the fields you
want to display in the report.
5. Click the Query Filter screen.
All the predefined filters of the selected business/report cube are listed in the Query Filter drop-down list.
Choose the one you want to apply. If you want to further edit the filter, click the Edit button and then redefined
the filter as required. The edited filter will then be saved as a user defined filter to the business/report cube.
If you prefer to define a filter by your own, select User Defined from the Query Filter drop-down list, click the
Add Condition button and then define the filter according to your requirements.
To define a filter:
1. From the field drop-down list, select the field on which the filter will be based.
2. From the operator drop-down list, set the operator with which to compose the filter expression.
3. Type the value(s) of how to filter the field in the value text box, or click the button
more values in the Select Values dialog.
to specify one or
4. To add another line of filter expression, click the Add Condition button and define the expression as
required, then from the logic drop-down list, specify the relationship between the two filter expressions.
5. Repeat the above steps to add more filter expressions if necessary.
To make some conditions grouped, select them and click the Group button, then the selected conditions
will be added in one group and work as one line of filter expression. To make any condition in a group out,
select it and click Ungroup.
To adjust the priority of the conditions, select it and click the Up or Down button.
To delete a condition line, select it and click the Delete button.
6. When done, click OK to create the filter.
6. Click Finish in the report wizard and the specified filter will be applied to the business/report cube, so that your
report will get data that meets the filter condition only.
●
Applying a filter to a business/report cube while inserting data component into a report
1. Click Menu > Insert > Banded Object/Table/Crosstab/Chart in a JReport Web window.
2. Point to the destination, and then click the mouse button.
3. In the corresponding report wizard, select the required business/report cube for the component, and the fields
you want to display in the component.
4. In the Query Filter screen, specify the filter you want to apply to the business/report cube from the Query Filter
drop-down list.
5. Click Finish to create the component and the specified filter will be applied to the business/report cube.
●
Applying a filter to a business/report cube after a report is built
1. Select the component in a report which are created on a business/report cube by clicking anywhere in it, and
then clicking the icon
at the upper left corner of the component.
2. Click Menu > Report > Query Filter (or right-click the component and select Query Filter from the shortcut
menu) to display the Query Filter dialog.
3. From the Query Filter drop-down list, select the filter you want to apply to the business/report cube used by the
component.
4. Click OK to apply the filter to the business/report cube.
Notes:
●
●
Business/report cube filters are defined on component level in JReport Web, which means each time you create a
component, you can apply a filter to the business/report cube it applies, and it will not affect other components
based on the business/report cube.
In JReport Web, you cannot edit the predefined filters that have been created on a business/report cube at the
Designer side. You can just edit the condition based on a predefined filter and then the edited filter will be saved as a
user defined filter.
Using cube elements
After a report set has been built and published to JReport Enterprise Server, you can open it in JReport Web and use the Resource
View panel to analyze data of any report in the report set by dragging cube elements from the panel to the component (banded
object, table or crosstab) in the report, provided that the data objects used by the component can be converted to corresponding
cube elements (see the note in Analytic reporting for details).
Tip: To display the Resource View panel, click Menu > View > Resource View or the Resource View button
on the View
toolbar. You can use the search bar at the top of the panel to search for any desired resource in a fast and convenient way.
The following examples show how to analyze reports using cube elements. These examples are based on the WorldWideSales report
cube in Data Source 1 of the SampleReports catalog. The report cube contains thirteen dimension objects (City, Country, Customer
Name, Region, State, Territory, Sales Month, Sales Quarter, Sales Year, Category, Product ID, Product Name, and Product Type),
eleven detail information objects (Address 1, Country, Customer Name, CustomerCityStateZip, Phone, Cost, Discount, Order Date,
Quantity, Total, and Unite Price), and three measure objects (Total Cost, Total Quantity, and Total Sales). Total calculates the value
of the formula ("Unit Price" * Quantity - "Unit Price" * Quantity * Discount/100), Total Sales defines an aggregate function Sum on
the formula Total, Total Cost is Sum on Cost, and Total Quantity is Sum on Quantity.
●
Example 1: Analyzing a standard banded report
●
Example 2: Analyzing a crosstab report
●
Example 3: Analyzing a table report
Example 1: Analyzing a standard banded report
1. In JReport Web, design a standard banded report titled Sales in China on WorldWideSales, which shows the fields Product ID,
Country, Product Name, Unit Price, Quantity and Discount, and applies the ClassicBlue style. See the report:
First, we will apply a filter to the banded object to narrow down data scope.
2. Click the Filter button
on the Analysis toolbar. In the Filter dialog, define the filter as COUNTRY = 'China', and then click
OK to confirm. See illustration:
We want to further sort the banded object by Product Name ascending.
3. Right-click any of the Product Name values and select Sort > Ascending from the shortcut menu. See illustration:
4. As the banded header panel holds no data, we can hide it by right-clicking it and selecting Hide from the shortcut menu.
See the result:
Next, we will add the Total field to the banded object and group by the City field.
5. Click the Resource View button
shown in the panel.
on the View toolbar, then resources of the report cube the banded object uses will be
6. From the Resource View panel, drag the detail information object Total in the Orders Detail category to the detail panel of the
banded object. See illustration:
7. Drag the dimension object City in the Customers category to the banded page header panel, when a blue line appears, release
the mouse button. See illustration:
8. Finally, drag the measure object Total Sales in the Orders Detail category to the group footer panel. See illustration:
9. We can now analyze the data in various ways, for example if we want to see the sales by category instead of city, right-click on
any of the City fields and select Drill To > Category from the shortcut menu. See illustration:
Now, we can see the same report with an entirely different view of the data. See the result:
Example 2: Analyzing a crosstab report
1. Design a crosstab report on WorldWideSales showing product sales information with Product Type (ascending) as the column
field, Category (ascending) as the row field, and Total Cost as the aggregate field. Apply the ClassicBlue style to the crosstab.
See the report:
First, we want to replace the product type information with region information, and display the total sales of each product category
in each region.
2. Remove Product Type from the crosstab by pointing to the header Product Type (Decaf or Regular), then dragging it outside
the report page. A message box will prompt you whether or not to remove the field. Click OK to confirm, and we can see that
the crosstab no longer contains the Product Type information.
3. Click the Resource View button
the panel.
on the View toolbar, then resources of the report cube the crosstab uses will be shown in
4. Drag the dimension object Region in the Customers category from the Resource View panel to the crosstab until a blue line
appears indicating the group level of the dimension. See illustration:
5. Drag the measure object Total Sales in the Orders Detail category to the aggregate area of the crosstab. See illustration:
Now the total sales of each product category in each region is displayed. See the result:
6. Then we would like to see the territory information for the EMEA region. Click in the EMEA header and we will drill down to the
next lower level based on the hierarchy defined in the report cube which in this case is Territory. See the result:
Using the same way, we can further drill down to the country, then the city levels which have been defined in the hierarchy to
get detailed sales information in each city.
Example 3: Analyzing a table report
For a table, you can analyze its data in the same way as for a banded object. Furthermore, JReport Web provides some analysis
methods specific for tables.
1. Design a table report on WorldWideSales, which shows the fields Product Type, Country, Product Name, Unit Price, Quantity
and Discount, and applies the ClassicBlue style.
2. Add a filter COUNTRY = 'China' AND PRODUCT TYPE NAME = 'Decaf' to the table (see Example 1 for details on filtering).
See the result:
For a table, we can insert a column (or row for horizontal table) at a specific position. So next, we will insert the dimension object
City into the table.
3. Click the Resource View button
the panel.
on the View toolbar, then resources of the report cube the table uses will be shown in
4. Drag City in the Customers category from the Resource View panel to the boundary between the first column (Product Type)
and the second column (Country) in the table until a blue line appears. See illustration:
The report result will be regenerated. See the result:
Note: When you add a column to a table, if the width of the table exceeds the defined page size, you will be prompted
whether to allow JReport to adjust the page size automatically so as to place the column. Click Yes in the message box to
have the page size adjusted, or No to make the columns in the table compressed. Also, If you do not want to display the
message in future, check Don't prompt the message again in the message box, or uncheck Always Prompt Whether
to Adjust Page Size Automatically in the Profile > Configure DHTML Profile > Properties > Default Properties tab. If you
choose not to show the message box again, when the table width exceeds the defined page size, JReport will always
adjust the page size automatically.
Next, we want to show the total information and remove the product name information. This can be done with a single drag-anddrop.
5. Drag the detail information object Total in the Orders Detail category to the header Product Name until the label Product Name
is highlighted in a blue background. See illustration:
Now, the total value for each record will be generated. See the result:
As a table column can contain more than one field, next, we will add the measure object Total Sales to the Total column.
6. Drag Total Sales from the Resource View panel to any value in the Total column. See illustration:
The report result will be regenerated. See the result:
Here 182,298.76 is the sum of all total values. In this way, the title for the added field will not be automatically created.
At last, we want to change the order of the Total and Discount columns in the table.
7. Drag the label Total to the right of the Discount column, when a blue line appears along the right boundary of the Discount
column, release the mouse button. See illustration:
We can see that order of the columns changes. See the result:
Notes:
●
●
When you are using a report cube, the records will be fetched based on the query which contains the report cube in JReport
Designer; while for a business cube, there is no predefined query and you will fetch records from the data source using dynamic
SQL.
To use the Resource View panel so as to add cube elements to the report, you should make sure that this ad hoc feature is
enabled in the specified DHTML feature profile. This setting can only be made by administrators.
Using dynamic resources
When you drag cube elements from the Resource View panel to analyze data of a report, sometimes you may find that the cube elements that
have been predefined in the business/report cube cannot meet your requirements, in which case, you can create some dynamic resources and
use them in the report to get the desired data. Then when you save the report, the dynamic resources will be saved along with the report as
report resources. Dynamic resources in JReport Web include formulas and measures.
Creating and using dynamic formulas
To create a dynamic formula, follow the steps below:
1. In the Resource View panel, expand the Dynamic Resources > Formulas node, then click <Add Formula…> to display the Formula
Editor window.
2. Enter a name for the formula in Formula Name text field.
3. Compose the formula by selecting the required fields, functions and operators from the Fields, Functions and Operators panels. You can also
write the formula by yourself in the editing panel.
For details about the functions and operators, refer to Built-in functions and Operators in the JReport Designer User's Guide.
4. Click the Check button
to check whether or not the syntax of your formula is correct.
5. When done, click the OK button to create the formula.
Once a dynamic formula has been created, you can then drag it from the Resource View panel to the desired position in the report as a detail
information object for data analyzing. The formulas can also be used to control object properties if you are an advanced user and provided that
the Use Dynamic Formula in Property is checked on the Report menu.
Also, if you want to further edit an existing formula or remove any formula that is not required, right-click the formula and then click the
corresponding command on the shortcut menu. However, if the formula has been used in the report or referenced by another formula, it cannot
be deleted.
Notes:
●
You should have some knowledge of the formula syntax before you can successfully compose a formula with no errors. To learn the formula
syntax, refer to Formula syntax in the JReport Designer User's Guide.
●
You can only save a formula with no errors into a report set.
●
Currently, global variables and User Defined Formulas (UDF) are not supported in dynamic formulas.
Creating and using dynamic measure objects
In JReport Web, you can also create dynamic measure objects by mapping them to the available resources which include dimension objects,
detail information objects in the current business/report cube and the dynamic formulas that have been created in the report.
To create a dynamic measure object:
1. In the Resource View panel, expand the Dynamic Resources > Measures node, then click <Add Measure…>. The Add Measure dialog is
then displayed.
2. In the Measure Name text field, specify the display name of the measure.
3. Click the chooser button
mapped.
next to the Mapping Name text field to specify the mapping name of the field to which the measure object is
4. From the Aggregate drop-down list, specify the aggregate function for the measure object.
5. When done, click OK to create the measure object.
If you want to create a measure object on a dynamic formula you have created, right-click the formula in the Dynamic Resources > Formulas
node in the Resource View panel, then select Create Measure from the shortcut menu. In the Add Measure dialog, specify the display name of
the measure object and the aggregate function as required, then click OK.
Once a dynamic measure object has been created, you can then drag it from the Resource View panel to the desired position in the report so as
the get the desired data. And if you want to edit any dynamic measure object or delete it, right-click the measure object and click Edit or Delete
on the shortcut menu (a measure object that has been used in report cannot be deleted).
Note: From Version 9 on, the display names of the objects in a category in business/report cubes cannot be duplicated. Thus, when you choose
to create a dynamic formula/measure object on an object which has duplicated display name with another object, you will be prompted with a
message, asking you to give a new name for the object in JReport Designer first.
Drilling through the report data
In a DHTML report, you can choose to show certain groups of records according to your requirements,
and switch among the groups to see the data you want. Moreover, you can define some methods to
view specific data.
This section presents three kinds of drilling in JReport Web. They are:
●
Automatic drilling
●
User defined drilling
●
Going
Automatic drilling
Automatic drilling enables you to switch from the current dimension to another dimension by using
system-defined commands on the shortcut menu, and it is divided into three kinds:
●
●
●
Drill-to
It enables you to obtain a different view of data by switching among dimensions.
Drill-to-by-value
It allows you to filter data based on a drill-to action so as to obtain a more detailed view of the data.
Drill-down
It enables you to drill data according to predefined hierarchies.
Drilling actions are performed on crosstabs, and grouped tables and banded objects, whose data are
based on business/report cube or if on query, data fields of which can be converted to corresponding
cube elements (see the note in Analytic reporting for details). After drilling, the new component can be
analyzed in the same way as the original one, and a "drill path" will be displayed in the Go To dropdown list on the navigation bar if you are drilling on a table or banded object, with which you can
return to any level easily by selecting the node from the list.
Assume you have created a crosstab report on the report cube WorldWideSales in Data Source 1 of the
SampleReports catalog showing product sales information with Product Type (ascending) as the column
field, Category (ascending) as the row field, and Total Sales as the summary field, and applied the
default style to the crosstab. We will now take the crosstab as an instance to illustrate the automatic
drilling functions. See the report:
Drill-to
1. Right-click any value of Product Type, Decaf for example, and choose Drill To from the shortcut
menu. The list of dimensions available for Drill To will appear on the submenu. See illustration:
2. Click Region on the submenu, then in the regenerated result, we can see that Category remains
the dimension for rows and Region becomes the dimension for columns. See the result:
3. Repeat Steps 1 and 2 to drill the data to other dimensions. Row field can also be drilled freely.
Drill-to-by-value
1. Undo the drill-to action in the above example.
2. Right-click the value Decaf of the Product Type dimension, and point to Drill to By Value on the
shortcut menu. A submenu for the command is displayed, which lists the same items as those of
Drill To.
3. Click Region too and the result will be regenerated. See the result:
We can see that the result is different from that of drill-to. This is because that, for the drill-to-byvalue action, the dimension of columns changes to Region by the Product Type value Decaf. That
is, on the basis of the drill-to action, a filtering action where Product Type = Decaf is further
performed, and thus the result of drill-to-by-value is generated.
Drill-down
Drill-down actions are based on predefined business/report cube hierarchies. The report cube
WorldWideSales contains a hierarchy Geography, which allows you to drill a dimension (corresponding
to a high level) down to the one-level-lower dimension.
1. Based on the report result after drill-to-by-value, right-click the value APAC, on the shortcut
menu, point to Drill Down, and we can see that Territory is listed as the submenu item. See
illustration:
2. Click Territory to see the result. It displays the data about countries in Asia Pacific. See the
result:
3. The one-level-lower dimension for Territory defined in the hierarchy is Country. Now click Asia
directly and JReport will also drill it down to Country. See the result:
4. Along the way defined by the hierarchy, we can further drill the column dimension down to State
and then City.
Notes:
●
●
●
For banded object and table, you can right-click its group header/footer to show the shortcut menu
so as to use the automatic drilling functions, you can also right-click field values in the group header/
footer to achieve this.
For dimension objects not used as group fields in a banded object or table, automatic drilling doesn't
take effect.
JReport allows you to define display names for items to be shown on the drill-related menu items.
For detailed information, see Customizing the field display names in the JReport Designer User's
Guide.
User defined drilling
Besides automatic drilling, JReport provides you with custom drilling functions including support for
linking to another report and for linking to a detail report, making the analysis of a report more diverse
and useful.
Linking to another report
A link to another report can be bound to a field, a lable, an image, or a map area in JReport Designer.
This is useful for viewing some information related to the current report, especially with viewing a
report for comparison.
For details about how to set up the link relationship between two reports, see Linking a report to
another report in the JReport Designer User's Guide.
To use a link in JReport Web:
1. Develop a report set in which a report contains an object which is linked to another report in
JReport Designer.
2. Publish the report set to JReport Enterprise Server.
3. Run the report set in DHTML format with JReport Web.
4. Click the trigger object in the report, or right-click the object and then select Link Report from
the shortcut menu.
5. The linked report will then be shown.
Linking to a detail report
In most cases, your reports will be related to each other, instead of being isolated. Each report may
have a particular emphasis on one or more aspects. In some circumstances, you may want to set up
certain relationships among your reports so that you can browse from one report to another through
the relationship "channels" that you create.
Such an inter-report relationship network can be achieved by setting up "Anchor" and "Filter"
conditions between two reports. You can use one report to hold comprehensive report data, and
another to show detailed information on a specific topic.
JReport reports can be joined together to compose a master/detail report group. Normally, a master
report holds more comprehensive data, while detail reports hold related detail information. A detail
report can be the master report of another report. In this way, by setting up more and more pairs of
master/detail reports, many reports can be joined together, and a report chain is formed.
For details about how to set up a pair of master/detail reports, see Linking a report to a detail
report in the JReport Designer User's Guide.
To use master/detail reports in JReport Web:
1. Develop the report sets with master/detail relationship in JReport Designer.
2. Publish the report sets to JReport Enterprise Server.
3. Run the report set which contains the master report in DHTML format on JReport Enterprise
Server.
4. Click the trigger object in the master report, or right-click the object and then select Detail
Report from the shortcut menu.
5. You may be prompted to provide encoding and DB security information before the report result is
produced. Click OK if you want to run a detail report using the same encoding and DB security
settings as that of the master report.
6. The detail report will show only the records in conformity to the anchor and filter conditions.
Notes:
●
●
●
In JReport Designer, you may find that the user defined drilling feature can provide more functions,
such as assigning values to parameters of the link report or detail report automatically and passing
style information to the link report. For detailed information, see Linking reports in the JReport
Designer User's Guide.
To make the detail report show only the records related to a trigger field value in the master report,
you should specify the Target Frame option as Same Frame when you set up the master/detail
relationship in JReport Designer. If you select Server Setting, you should further make sure that the
Pop Up New Window for Links option has not been checked in the Profile > Configure DHTML Profile
> Properties > Default tab. Otherwise, the detail report will be opened in a new web browser window
with no relationship to the master report.
A "link path", which tracks the linking (user defined drilling) actions, will be displayed in the Go To
drop-down list on the navigation bar after you have drilled to the link report or detail report if it is
opened in the current window. Clicking an item in the list will switch to the corresponding report.
Going
In a DHTML report, you can select to show certain groups of records in a banded object according to your requirements. You can also
switch among the groups to see the data you want. This action is called going, which divides into go-to, go-up, go-down, and go-todetail, as indicated in the diagram.
●
●
●
●
Go-to
The go-to action allows you to switch the data presented in a banded object from any group to any other group.
Go-up
Go-up means to jump up one group level to show the records of a particular group.
Go-down
Go-down means to jump down one group level to show the records of a particular group.
Go-to-detail
Go-to-detail allows you to concentrate on the details of a group.
Going actions are available only for banded objects that contain groups, and fields in which have not been converted to cube elements
of a report cube. Going actions do not apply to banded objects created in JReport Web. After a going action has been performed, the
data presented in the banded object will be re-loaded from the data buffer, showing only the records in the selected group, and the new
report created by going can also be viewed, printed, and exported to other format in the same way as the original report. In addition, a
"going path", which tracks the going action, will be displayed in the Go To drop-down list on the navigation bar, with which you can
easily return to the original report.
The following describes the use of the going actions based on Banded Link.cls in the SampleReports folder of Public Reports, which
contains a standard banded report.
Go-to
1. Run Banded Link.cls. See the report:
2. Point to the region APAC, right-click and select Go To > APAC > Vietnam from the shortcut menu. See illustration:
Then only the data about Vietnam is displayed. See the result:
3. To return to the original status, right-click any value and then click Go To > ROOT on the shortcut menu; or from the Go To dropdown list on the navigation bar, select Product Sales by Country.
You may notice that the result is not dependent on what you right-clicked, in other words, you can right-click any field value in the
banded object or even the blank part of a group header/footer panel or detail panel, in order to perform a go-to action.
Go-up
For a go-up action, you need to right-click a group header/footer panel or any object in the panel, at the same time, you should make
sure that this group level is lower than some other group levels.
1. Undo the go-up action in the above example.
2. Point to any country, for example China, right-click and select Go Up > LATAM from the shortcut menu. See illustration:
Then only the data about LATAM is displayed. See the result:
At Step 2, you may find that items listed on the Go Up submenu are regions of the Region group level which is one level higher than the
current group level - Country. That is, the go-up action allows you to focus your attention on the groups of a higher level than what you
right-click.
Go-down
For a go-down action, you need to right-click a group header/footer panel or any object in the panel, at the same time, you should
make sure that this group level is higher than some other group levels.
1. Undo the go-up action in the above example.
2. Point to APAC, right-click and select Go Down > Singapore from the shortcut menu. See illustration:
Then data about Singapore is displayed. See the result:
At Step 2, you may find that items listed on the Go Down submenu are countries of the Region group level which is one level higher
than the group level of Country, and only countries in the Asia Pacific (APAC) region are displayed. That is, the go-down action allows
you to focus your attention on the groups of a lower level than what you right-click, and only those lower-level groups which are related
with the higher-level group value you right-click will be concerned.
Go-to-detail
If a banded object contains group information, then a field, label, image or map in a group header/footer panel of the banded object
can be used to obtain information of that group, and a chart in a banded object also has the similar function. The Go-to-detail action
should be predefined at report design time. You can refer to Obtaining detailed information from a banded object in the JReport
Designer User's Guide for more information.
1. Undo the go-down action in the above example.
2. Point to LATAM, right-click and select Go to Detail from the shortcut menu.
Then only the data about this region is displayed. See the result:
Manipulating components
You can manipulate components, which refer to crosstabs, tables, banded objects, charts and tabulars,
in JReport Web as shown below. Note that, most of the manipulations require selecting the component
first. To select a component, click anywhere in the component, when the icon
appears at its upper
left corner, click the icon.
Setting the number of records retrieved by report components
You can set the number of records that can be retrieved by all components in all reports of a report set.
To do this, select a value to your liking (All or Top 50 to name a few) from the Max Records combo
on the Analysis toolbar. You can also directly input a positive integer here
box
and press Enter to retrieve the corresponding records. Alternatively, you can click Menu > Report >
Max Records to show the Max Records dialog, and then achieve the same goal.
Manipulating a crosstab
●
●
Changing the dimension index in a crosstab
The dimension index in a crosstab can be modified, namely, you can move a dimension to a higher or
lower level. This operation can be performed on crosstab's containing two or more dimensions. To do
this, you can simply drag a dimension object (row/column header) to the required destination till a
blue line appears. You can also drag a column header to a row level and vice versa.
Rotating a crosstab
Columns and rows in a crosstab can be exchanged. This operation is called rotating a crosstab.
To rotate a crosstab, first select it, and then do one of the following:
●
❍
Click Menu > Report > Rotate Crosstab.
❍
Click the Rotate button
❍
Right-click the icon
on the Analysis toolbar.
of the crosstab and select Rotate from the shortcut menu.
Expanding/Collapsing a crosstab
For a crosstab, if it has more than one row/column group level, you can specify whether or not to
enable the crosstab to be expanded in JReport Web, and set the default expanding/collapsing state of
groups in outer level(s). For details, see Expanding/Collapsing a crosstab in the JReport Designer
User's Guide.
Manipulating a table
●
Adjusting order of columns in a table
The order of columns in a table can be easily adjusted. To do this, drag a column header to the left
or right boundary of another column header, when a blue line appears along the column boundary,
release the mouse button, and you will see the order change. Repeat the steps to adjust the order so
as to meet your requirements.
The above description is for a vertical table. With regard to a horizontal table, you can do the same
actions on its row headers.
●
●
●
●
Rotating a table
You can rotate a table to switch its appearance between the horizontal and vertical layout modes by
doing one of the following:
❍
Click Menu> Report > Rotate Table.
❍
Click the Rotate button
❍
Right-click the icon
on the Analysis toolbar.
of the table and select Rotate from the shortcut menu.
Adjusting grouping order in a table
A table may contain several group levels. The order of the group levels can also be adjusted in
JReport Web. To do this, drag a group field value to the required position till a blue line appears.
Showing table columns
You can specify which column(s) will be shown in a table. To do this, right-click the table and check
the column names on the sub menu of Show Column to show the columns.
Hiding/Deleting table columns
A table column (for a horizontal table, the "column" corresponds to a field row) can be hidden or
removed. To do this, select the cell of the column in the table header (if the cell is entirely occupied
by a field or label, you shall resize the field or label or the cell and then click the blank in the cell so
as to select it) and right-click, then select Hide Column or Remove Column from the shortcut
menu, and the column will be hidden or removed from the table.
Manipulating a banded object
●
Hiding/Showing a panel in a banded object
A panel in a banded object can be hidden or shown. To do this, select the banded object, then rightclick the icon
to show a shortcut menu and from the Show submenu, click the item which indicates
the panel name. For a panel which is shown, the item is with a check mark, and vice versa. This
operation is also applicable for hiding/showing a row in a table.
For a banded panel, you can also right-click its blank part to show a shortcut menu and then select
Hide to hide it.
●
Expanding/Collapsing a group panel in a banded object
Group panels in a banded object can also be expanded or collapsed. For details, see Managing the
data of a banded object in the JReport Designer User's Guide.
Modifying the definition of a chart
You can modify the definition of a chart, including the chart type, data display, and style. To do this:
1. Right-click the icon
of the chart or any part of the chart other than the legend and label to
show a shortcut menu, and then select Format Chart from the shortcut menu to display the
Chart Definition dialog.
Note: In the event that the chart is built in JReport Designer, the Format Chart command will
be available only when JReport Web can convert data fields used by the chart to
corresponding cube elements. See the note in Analytic reporting for details.
2. In the Chart Type tab of the Chart Definition dialog, specify the type for the chart.
3. In the Display tab, change the dimension and measure object(s) used by the chart.
4. In the Style tab, modify the style for the chart as required.
5. Upon finishing, click OK to apply the modifications.
For details about how to modify the chart definition with the Chart Definition dialog, see Creating a
chart report.
In addition, if you only want to change the chart type, no matter whether the chart is originally created
in JReport Designer or JReport Web, you can achieve it by doing one of the following:
●
●
Right-click the chart and on the shortcut menu, select the required type from the Chart Type
submenu, which lists all the chart types and subtypes (the current one and the inapplicable subtypes
are grayed out).
Select the chart, click the Chat Type button
suitable subtype from the drop-down menu.
on the Analysis toolbar, and then select a
Splitting and merging cells in a tabular
Adjacent cells in a tabular which can form a rectangle may be merged into one cell.
To merge adjacent cells, select them one by one while holding the Ctrl key, then click Menu > Report
> Merge, and these cells will be merged into one cell.
To split a cell:
1. Select the cell and click Menu > Report > Split.
2. In the Split dialog, specify the number of rows and columns.
3. Click OK and the cell will be split.
Adding conditional formats to fields
You can add some conditional formats to a field, which refer to the DBField, parameter field, formula field,
summary field, and the special field Page Number or User Name, then when the specified condition is fulfilled,
the defined format will be applied to the field values for highlighting.
To add conditional formats to a field:
1. Right-click the field and select Conditional Formatting from the shortcut menu to access the Conditional
Formatting dialog.
2. Click the button
to open the Edit Conditions dialog to define the condition as required.
3. Click the Add Condition button to add a condition line.
4. From the field drop-down list, select the field on which the condition will be based.
5. Choose the operator with which to compose the condition expression from the operator drop-down list.
6. Type the value(s) of how to build the condition into the value text box, or click the button
to specify
one or more values in the Select Values dialog (for details about how to define values in the dialog, refer to
Select Values dialog).
7. Click Add Condition to add another condition line and define the relationship between the two condition
lines if required.
8. When done, click OK to save the condition.
The newly added condition will then be displayed and highlighted in the Condition box in the Conditional
Formatting dialog.
9. In the Format box, set the format which will be applied to values of the field when the specified condition is
fulfilled, for example, the font face, font size, font color, etc.
10. Repeat the above steps to add more conditions and define the format for each condition as required.
To edit a condition, select the condition in the Condition box, then click
. In the Edit Conditions dialog,
edit the condition expressions as required.
To remove a condition and the corresponding format, select the condition in the Condition box and click
.
To adjust the priority of a condition, select the condition in the Condition box and then click
or
11. Click OK to apply the conditional formats to the field.
See also Conditional Formatting dialog and Edit Conditions dialog for details about options in the dialogs.
.
Converting between components
Converting between components enables you to view and analyze data from different aspects with
different focuses. In JReport Web, you can convert a crosstab into a chart and vice versa, however, if a
crosstab/chart is designed in JReport Designer, to enable the conversion, you need to make sure that
data objects used by the crosstab/chart can be converted to corresponding cube elements (see the
note in Analytic reporting for details).
Converting a crosstab into a chart
To convert a crosstab into a chart:
1. Click anywhere in the crosstab, when the icon
select the crosstab, then do any of following:
❍
Right-click the icon
❍
Click Menu > Report > To Chart.
appears at its upper left corner, click the icon to
and select To Chart from the shortcut menu.
2. The Convert Data Fields dialog may appear for your confirmation on converting data fields of the
crosstab to cube elements of a business/report cube. Click OK to confirm, and the To Chart dialog
will be displayed.
3. In the Chart Type tab, specify a suitable type for the chart. With a certain type specified, you can
further define the chart as a combo chart by clicking <Add Combo Type> in the Chart Type
Groups box.
4. In the Display tab, the Resources box lists all the cube elements used in the selected crosstab
including dimension and measure object(s). The chart can only be defined based on the cube
elements listed. Add a dimension object from the Resources box to the Category box, and so to
the Series box, and measure object(s) to the Show Values box respectively.
5. In the Style tab, set the style for the chart as required.
If the crosstab is in a table or banded object, by default, the chart converted from the crosstab will
take on the style of the table or banded object. If you want to apply another style to the chart,
uncheck the Inherit Style option and choose the desired style in the Style box.
6. Click the OK button to finish the conversion.
Converting a chart into a crosstab
To convert a chart into a crosstab:
1. Click anywhere in the chart, when the icon
select the chart, then do any of following:
❍
❍
appears at its upper left corner, click the icon to
Right-click the icon
or any part of the chart except for the legend and label, then click To
Crosstab on the shortcut menu.
Click Menu > Report > To Crosstab.
2. The Convert Data Fields dialog may appear for your confirmation on converting data fields of the
chart to cube elements of a business/report cube. Click OK to confirm, and the To Crosstab dialog
will be displayed.
3. In the Display tab, select a dimension object in the Resources box and click
to add it as a
group field to the Columns or Rows box; select a measure object and click
to add it as an
aggregate field to the Aggregates box. Repeat these to add more aggregate fields.
In the Display Name column, you can edit the display name of a group field or aggregate field,
and the Sort columns allow you to specify a sorting manner on a group field.
If you want to remove any group/aggregate field, select it and click
.
To adjust the order of group/aggregate fields, select a group/aggregate field and click
or
.
4. In the Style tab, apply a style to the crosstab as required.
If the chart is in a table or banded object, by default, the crosstab converted from the chart will
take on the style of the table or banded object. If you want to apply another style to the crosstab,
uncheck the Inherit Style option and choose the desired style in the Style box.
5. Click OK to finish the conversion.
Navigating through the report data
You can use the TOC Browser to navigate through a report. To show the TOC Browser, click Menu >
View > TOC Browser.
In the TOC Browser, expand the Report node, select a component or a node with the group value that
you want to browse to. The page that contains the component or the matching data will then be shown.
The table of contents on the TOC Browser is organized into a tree structure. The root node represents
the report that you are currently viewing. The component names indicate components in the report.
The group values show hierarchical groups.
TOC in JReport Designer
Just like a report, the format of the TOC is designed in JReport Designer. In the root node in the Report
Inspector of JReport Designer, there is an object named TOC. You can modify its properties to
customize your TOC style.
TOC Anchor
Besides the groups, you can also add your own nodes to the TOC Browser. Most components in JReport
Designer hold a property called TOC Anchor which holds a Boolean value. If the TOC Anchor property
value is true, a node for this object will then be added to the TOC tree. When you click such a node,
JReport Web will turn to the page that contains this component. Some objects, such as group panels,
summaries, subreports, and cube elements hold a true value for the TOC Anchor property by default,
which means that by default they will appear in the TOC Browser. Moreover, you can type a string or
even a formula as the Anchor Display Value property for a component holding a true TOC Anchor
property, so that your input for that object can be displayed in the TOC Browser instead of the default
value.
Applying a style
A style can be applied to a report in order to change its appearance and characteristics. You can create
and set up your own styles in JReport Designer. When you publish your report sets to JReport
Enterprise Server, you can include these custom styles with the published reports. When you run the
report set, the style feature will be enabled and you can select a style to apply to the report. After
applying a style, the banded objects, crosstabs, charts, and tables in the report will take a uniform
appearance.
By default, the style feature is enabled in JReport Web. In order to apply a style to a report, click Menu
> Report > Style and select the required one from the submenu, or select the style from the style
drop-down list
on the toolbar. You can also right-click a table, crosstab,
chart, or banded object and select Apply Style from the shortcut menu to select the required style in
the Apply Style dialog.
See also the chapter Styles in the JReport Designer User's Guide for more information about how to
work with styles at report design time.
Working with reports via URL
Besides working on interfaces, most of the JReport Web operations such as filter, sort, search, save
and so on, can also be accomplished via URL. When using URLs to access JReport Web, you should
follow the specifications described in this section.
The URL in DHTML is:
http://localhost:8888/dhtml?sessionid=XXXXXXX&rptsetid=XXXXXXX&rptname=XXXXXXX&op=...
●
●
●
●
●
●
●
●
http
The web service protocol.
localhost
The host address.
8888
The port.
dhtml?sessionid=XXXXXXX&rptsetid=XXXXXXX&rptname=XXXXXXX&
The path.
?
URL separator.
=
URL separator.
&
URL separator.
op
The key of operation in DHTML.
There are some methods in the file API.js located in <intall_root>\public_html\javascript\dhtml.
These methods are the tools you can use to generate URLs. The result of each of these functions will be
a URL.
Parameter Description
Key
Value
Operation code
op
51
Export report type
ty
2/3/4/5/6/7 means PDF/PostScript/RTF/TEXT/
EXCEL/XML respectively.
Example
op=51&ty=2
Note
The order begins with 2.
A file of HTML type cannot be downloaded.
Prototype
function user_downloadReport(type)
Download Report
Exit
Prototype
function user_exit (popwin)
Navigate Page
Operation code
op
24
Page number
pn
1...n
Example
op=24&pn=2
Note
The page number begins with 1 and is less than total page number.
Prototype
function
function
function
function
user_firstPage()
user_lastPage()
user_nextPage()
user_prevPage()
One Step Filter
Operation code
op
25
the column name
col
Mapping the name of a column in JReport.
operator of filter condition
operator
eq/gt/geq/lt/leq/neq, means "equal to/greater
than or equal to/greater than/less than/less than
or equal to/unequal to" respectively.
the column value
value
logic of filter condition
logic
AND/OR/END, means "and/or/end" respectively.
comp
instance name of the column
component instance name
op=25&col=CusID&operator=eq&value=1&logic=OR&col=CusName
Example
&operator=0&value=ZhangKe&logic=2&comp=convert_sectionObject
Note
The value is case-sensitive.
Prototype
function user_oneStepfilter(columns, operators, values, logics,
instanceName)
One Step Search
Operation code
op
128
the column name
column
Mapping the name of a column in JReport.
the column value
value
the value to search for
whether or not to search
content only
isContent
true/false
whether or not to match
case
isMatchCase
true/false
The search direction
isUp
true/false
whether or not to match
whole word
isWholeWord
true/false
Example
op=128&column=CusID&value=1&isContent=true
&isMatchCase=false&isUp=false&isWholeWord=false
Note
Prototype
function user_oneStepSearch(value, isContent, colName, isUp,
matchcase, isWholeWord)
One Step Sort
Operation code
op
12
the column name
col
Mapping the name of a column in JReport.
the column sort order
ord
true/false
instance name of the column comp
component instance name
op=12&col=CusID&ord=true&col=CusName
Example
&ord=false&comp=convert_sectionObject
Note
The value is case-sensitive.
Prototype
function user_oneStepSort(columns, sorts, instanceName)
Open Report
JSP page
/dhtmljsp/dhtml.jsp
Action
jrs.cmd
jrs.try_vw
Report name
jrs.report
path/name
Catalog path
jrs.catalog
Result type
jrs.result_type
int
Example
http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.report
=%2fSampleReports%2fEmployeeInformation.cls&jrs.cmd
=jrs.try_vw&jrs.catalog=%2fSampleReports%2fSampleReports.cat
Note
The path delimiter is "/". If you encounter problems, you can replace it
with "%2f".
The version number can be none, as with the example.
Prototype
Open RSD File
JSP page
/dhtmljsp/dhtml.jsp
Result path
jrs.path
path/name
Result name
jrs.result
path/name
Result version number
jrs.rst_version
int
http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.resource_path=
/USERFOLDERPATH/admin/test&jrs.file=1980996366.rsd
Example
Note
The path delimiter is "/". If you encounter problems, you can replace it
with "%2f".
The version number cannot be none.
Prototype
Redo
Operation code
Example
op
op=85
85
Note
Prototype
function user_redo()
Refresh
Operation code
Example
op
op=83
83
Note
Prototype
function user_refresh()
Reset
Operation code
Example
op
op=76
76
Note
Prototype
function user_reset()
Save Report
Operation code
Example
op
op=82
82
Note
Prototype
function user_saveRpt()
Search Next
Operation code
Example
op
op=34
34
Note
Prototype
Show Export to Dialog
Prototype
function user_showSaveResultDialog()
Show Help
Dialog id
Example
HELP_OP
182
http://localhost:8888/dhtmljsp/help.jsp?sessionid=XXXXXXX
&rptsetid=XXXXXXX&rptname=XXXXXXX&HELP_OP=XXX
Note
The URL gets the body of a window, you should put it as xxx in
window.open("xxx", ..)
Prototype
function user_showHelp(helpId)
Show Panel or Dialog
Prototype
function
function
function
function
function
function
function
function
function
function
function
function
function
user_showUserPanel()
user_showTOC()
user_showDHTMLView()
user_showToolbox()
user_showSortDialog()
user_showFilterDialog()
user_showNewRptDialog()
user_showOpenRptDialog()
user_showSaveAsDialog()
user_showPageSetupDialog()
user_showSaveResultDialog()
user_showPageSetupDialog()
user_showPrintDialog()
Undo
Operation code
Example
op
op=84
84
Note
Prototype
function user_undo()
Zoom
Operation code
op
50
Proportion
0~400
Example
val
op=50&val=250
Note
val must be an integer between 0 and 400
Prototype
function user_zoom(value)
Tuning JReport Web performance
JReport provides you with methods for adjusting DHTML performance. You can limit the number of
DHTML reports opened simultaneously by setting the DHTML preferences on the JReport Administration
page. Furthermore, you can modify a property file to control the Action Task Manager, which can
improve DHTML service performance.
This section covers the following topics:
●
Limiting the number of simultaneously open reports
●
Action Task Manager
Limiting the number of simultaneously open reports
Whether or not an open DHTML report interacts with the server, it holds many resources. As a result,
opening many reports will decrease server performance. Thus, JReport allows the administrators to
specify the maximum number of DHTML reports that can be opened at the same time so as to prevent
large number of DHTML reports from being opened simultaneously and to improve the server
performance.
To set the maximum number of DHTML reports that can be open at the same time:
1. On the JReport Administration page, click Profile on the system toolbar, then click Configure
DHTML Profile on the task bar of the Profile page.
2. Click the Properties > Advanced tab.
3. Check the Maximum Number of Open Reports option and type the number to your
requirement in the text box.
4. Click Save upon finishing.
If the number of open reports exceeds the limit, an error page will be displayed prompting you to close
one before opening a new one.
Note: The Maximum Number of Open Reports option works together with the maximum number of
concurrent reports allowed by your product license. Of these two values, whichever is smaller will be
used as the real maximum number of open reports allowed. For example, if the value of the Maximum
Number of Open Reports option is 10, and the number that the license allows is 20, 10 will be used as
the maximum number of DHTML reports that can be opened simultaneously; however, 10 non-DHTML
reports may use the remaining licenses.
Action Task Manager
Some DHTML operations require a large amount of memory and CPU processing power. The Action
Task Manager improves DHTML service performance by preventing a large number of actions from
being run simultaneously.
The Action Task Manager coordinates DHTML actions through two fixed-size tables:
●
●
Concurrent Processing Table - This registers the requests that are currently being processed by
the DHTML service.
Waiting Requests Queue - This registers the requests that are waiting for being processed by the
DHTML service.
Note: Only certain operations that consume considerable hardware resources need to be prevented
from being run at the same time. You can define which kind of requests need to be queued before
being processed.
When a new DHTML request reaches the server, it will be processed according to the following flow:
1. The DHTML service determines whether the requested operation is a restricted action. If it is, the
Action Task Manager will take over the request. Otherwise, it will be processed directly, without
being managed by the Action Task Manager.
2. If the Concurrent Processing Table is full, the restricted request will be assigned to the Waiting
Requests Queue. If the queue is full, the DHTML service will refuse the request and return a
warning message.
3. After the request has been processed, it will be de-registered from the Concurrent Processing
table. The DHTML service will then automatically continue to process the requests in the Waiting
Requests Queue.
By using the property file dhtml.properties provided in JReport Web, you can balance the server load
by adjusting table sizes and specify which kind of requests are managed by the Action Task Manager.
dhtml.properties
The dhtml.properties file is located at <install_root>\bin. It allows you to control three major
options for the Action Task Manager:
●
Specifying the size of the Concurrent Processing Table
Use queue.actions.max.concurrent=[integer] to set the maximum number of requests that can
be processed simultaneously. The value of this property can be equal to or larger than 0. Use 0
(default) to disable the request queue feature.
●
Specifying the size of the Waiting Requests Queue table
Use queue.actions.max.pending=[integer] to set the maximum number of to-be-handled
requests that the queue can contain. The value of this property can be equal to or larger than 0. 0
means no requests will be stored in the queue. A request will either be handled by the DHTML service
or be rejected when the maximum limit of the Concurrent Processing table has been reached.
●
Specifying the actions that can be applied for the DHTML Request Queue feature
These are listed below:
queue.actions.init=false
queue.actions.undo=true
queue.actions.redo=true
queue.actions.drill=true
queue.actions.drillup=true
queue.actions.refresh=false
queue.actions.filter=true
queue.actions.sort=true
queue.actions.search=true
queue.actions.finishNewReport=true
#
#
#
#
#
#
#
#
#
#
Action:
Action:
Action:
Action:
Action:
Action:
Action:
Action:
Action:
Action:
DHTML report initialization
Undo
Redo
Drilling
Drilling up
Refreshing
Filtering
Sorting
Searching
Finishing creating a new report
These properties will only work when the queue feature has been enabled by setting queue.max.
concurrent.actions>0.
True - The action will be handled by the Action Task Manager.
False - The action will not be handled by the Action Task Manager, but be directly processed by the
DHTML service without being queued.
Clustering
A JReport Enterprise Server cluster is a group of servers that work together to provide cluster-wide
shared resource, security, schedule and version services. In a JReport Enterprise Server cluster, there
is one admin server, one or more backup servers, and one or more or no slave servers.
This chapter shows you the infrastructure of the JReport Enterprise Server cluster, what features it
owns, and how to set it up.
The following topics are covered:
●
Cluster overview
●
JReport Enterprise Server cluster main features
●
Setting up a JReport Enterprise Server cluster
●
Starting a JReport Enterprise Server cluster
●
Clustering JReport Enterprise Server with other application servers
●
Sample solution: Dispatch RMI DHTML requests in clustered server environment
Cluster overview
There are three roles in a JReport Enterprise Server cluster. They are admin server, backup server, and
slave server. The following is a diagram of the JReport Enterprise Server cluster infrastructure:
Each server has its own responsibility. You can set a server to perform a specific role in a JReport
Enterprise Server cluster by configuring its properties. The following list shows all the tasks each server
in the server cluster can complete.
Business tasks
Run
Report
Sets
Submit
Scheduled
Tasks
Administrative tasks
LoadBalancing
Failover
LoadBalancing
Administration
Security
Administration
Resource
Administration
Admin
Server
Y
Y
Y
Y
Y
Y
Y
Backup
Server
Y
Y
Y
Y
-
-
-
Slave
Server
Y
Y
Y
-
-
-
-
Related topics:
●
JReport Enterprise Server cluster
JReport Enterprise Server cluster main features
This section details the main features of the JReport Enterprise Server cluster. Some of these features
are also available on API. With these features in mind, you will be better able to understand JReport
Enterprise Server clusters and easily use them.
●
Administering security and resources centrally
●
Load balancing
●
Failover
●
Public storage
Administering security and resources centrally
In a cluster, you can accomplish all administrative tasks from a central place - the admin server.
After logging onto the cluster from the admin server as an administrator, certain security
administrative tasks can be performed:
●
Create, remove and edit users, groups, realms, protections and ACLs.
●
Edit resource nodes and sub resource nodes. Add reachable virtual resource nodes.
●
Customize the default page appearance for users.
Load balancing
In the cluster environment, JReport Enterprise Server provides a mechanism named load balancing
which enables the server to work more effectively.
When a clustered server receives a task, it will send a load balancing request to the admin server. After
receiving the request, the admin server can use one of the four algorithms JReport provides to select a
clustered server, and then allocate the task to it.
Here are the benefits of deploying load balancing in a JReport Enterprise Server cluster.
●
Automatically allocates tasks to suitable servers according to their current load and performance.
●
Makes sure that all of the servers in the cluster are fully utilized.
●
Automatically re-balances the network load when one server is added or removed.
Note: You can directly specify a server in a cluster to perform a scheduled task or an advanced-run
task instead of using load balancing. To do this, first make sure that the Identify Server Preference
option is enabled in the Profile dialog (Profile > Customize Server Preferences > Advanced >
Identify Server Preference), and then use the With Load Balancer, prefer a server to run the task
option in the Format tab of the Advanced Run dialog or the General tab of the Schedule dialog to
specify a server manually.
Load detection
There is a JReport Enterprise Server residing in each node of a JReport Enterprise Server cluster. The
main factor that affects load balancing is the number of concurrent report sets that are running on
every JReport Enterprise Server. In order to avoid heavy load, two properties cluster.
send_concurrent_reports and cluster.update_concurrent_reports_immediately are provided to enable
sending the number of concurrently running report sets on member servers to the admin server
immediately when the number changes.
Built-in load balancing algorithm
JReport Enterprise Server cluster supports several algorithms for load balancing clustered servers.
Configurable algorithms for load balancing clustered servers are:
●
●
●
Least Current Report Sets (Min-load) (loadbalance.type=0)
The admin server will select the server which has the least number of currently running report sets.
If the local server is one of the qualified servers, it will be given higher priority.
Round Robin (loadbalance.type=1)
The admin server will select each server in sequence one by one until each has been allocated a
report set to run then will repeat the cycle.
Least Weighted Current Report Sets (Weighted Min-load)(loadbalance.type=2)
The admin server will select the server that has the least Weighted current report sets. If the local
server is one of the qualified servers, it will be given higher priority.
Number of currently running report sets
Weighted current report sets=
Performance Weight
Performance weight is a positive float number that you set to each server in a cluster on the JReport
Administration page on the admin server > Cluster > Weight tab. The higher performance
weight you set to a clustered server, the higher chance it may get selected by the admin server
during load balancing. See Configuring performance weight for how to set performance weight and
how this algorithm works.
If you do not set performance weight, by default the algorithm will work same as Least Current
Report Sets (Min-load) (loadbalance.type=0).
●
Random (loadbalance.type=3)
The admin server will select the server randomly.
Notes:
●
●
You can choose the load balancing type by setting the property loadbalance.type in the server.
properties file in <install_root>\bin.
For the load balancing algorithms: the admin server selects from the servers with the number of
concurrently running report sets less than maximum number first. However, if all servers are full, it
will select from all of them.
Related topics:
●
Balancing the server load
Failover
Failure detection
To maintain the state of a JReport Enterprise Server cluster, each member server sends its heart beat
to the admin server periodically, and then the admin server checks and responds to those heart beats.
If a member server's heart beat cannot be received for a certain period of time, which depends on two
properties' values - cluster.heart_beat.interval and cluster.heart_beat.max_retries, the admin server
will remove it from the active clustered server list. Likewise, if a member server's heart beat signal to
the admin server fails for a certain period of time, the admin server is judged as failed.
Admin server failure
In a cluster, each backup server possesses a unique priority value. If the admin server fails to work,
the one that has the highest priority among the active backup servers will promote itself to be the new
admin server, and will take over all administrative tasks in the cluster. All tasks running previously on
the admin server will be reallocated to the other servers.
When the previous admin server recovers, it will join the cluster automatically either as a backup
server or as a slave server, depending on your settings:
●
As a backup server when the following properties have been specified in server.properties in the
<install_root>\bin directory and when the specified paths exist:
resource.root
resource.share.hist.dir
resource.share.properties.dir
resource.share.realm.dir
●
As a slave server when the above properties have not been specified or the specified paths do not
exist.
The priority value set to a backup server must be a non-negative integer. 0 represents the highest
priority.
Member server failure
Effect on load balancing
When the admin server detects a failed member server, it will remove the member server from the
active server list and will not schedule reporting tasks to that server any more. Load balancing will
proceed on the remaining active servers.
Effect on incompleted tasks
When the admin server detects a failed clustered server, it will check the shared table for the list of
incompleted tasks and will then reassign all incompleted tasks to other active servers using the load
balancer.
Effect on completed tasks
JReport supports only report set lever recovery but not session level recovery. Once a report task is
completed, it will be written to a temporary storage for redirection to the requester. Failure after that
will not be recovered.
Notifying of server down
If you have enabled the notifying of server down feature, when a member server crashes or is
disconnected with the admin server, the admin server will send a notification e-mail to a specified
address. If the admin server crashes, a backup server will promote itself to be the new admin server
and send a notification e-mail instead.
Public storage
You can use a disk (disk array) on a computer that does not perform a role in a cluster as a shared
disk. All the temporary files and result files will be stored in this disk and they can be accessed from
the servers in the cluster. This can improve performance when running report sets.
Here are the resources that can be stored on a shared disk:
●
●
Temp Directory
When viewing report sets from any server in a JReport Enterprise Server cluster, some temporary
files will be generated. All temporary files are saved in the temp directory.
History Directory
When publishing report sets to the versioning system from any server in a JReport Enterprise Server
cluster, all the result files are saved in the history directory.
Setting up a JReport Enterprise Server cluster
This section introduces the steps for setting up a JReport Enterprise Server cluster. Here, it is assumed
that you already have a general idea about the infrastructure of JReport Enterprise Server clusters and
know the roles and functions of the clustered servers, such as the admin server, backup server, and
slave server. If this isn't the case, see Cluster overview and JReport Enterprise Server cluster.
Meanwhile, there is another chapter that explains how to manage servers in a cluster. You can see
section Managing JReport Enterprise Server clusters for details.
Following are steps and examples for how to set up a JReport Enterprise Server cluster:
●
JReport Enterprise Server cluster license
●
Preparation
●
Setting up the cluster
●
Example 1: Setting up a simple JReport Enterprise Server cluster
●
Example 2: Setting up a JReport Enterprise Server cluster for a production environment
JReport Enterprise Server cluster license
JReport Enterprise Server cluster uses a license which is different from the other licenses you use for
JReport Enterprise Server. When installing JReport Enterprise Server to run in a JReport Enterprise
Server cluster, you should use the special license key only for JReport Enterprise Server cluster.
Contact JReport Sales to obtain the special license key for the cluster.
Preparation
To set up a JReport Enterprise Server cluster, you must determine the following factors:
●
How many servers will be included in the cluster?
The maximum number of servers is unlimited as long as you install JReport Enterprise Server with
the license key for cluster.
●
Which server will run as the admin server?
There should be one and only one admin server in a JReport Enterprise Server cluster.
●
Is a backup server needed in the cluster?
With at least one backup server in the cluster, you can reduce the risk of the whole cluster being
interrupted or crashing down.
●
Whether to use the shared disk feature in the cluster?
Using a shared disk in your cluster will improve performance when running report sets.
Setting up the cluster
The setup process for JReport Enterprise Server cluster falls into the following procedures:
1. Set up the shared disk (disk array). If you do not want a shared disk, skip the step.
2. Install JReport Enterprise Server on every target computer that will join the cluster, using the
appropriate license key for cluster.
3. Configure the clustered servers individually.
You should configure each server in turn respectively, starting from the admin server, then backup
servers, and finally the slave servers.
Notes:
●
●
●
All servers in a JReport cluster should be set up on one platform.
To use the old result files in <reporthome>\history, install the new JReport Enterprise Server to the
same directory with a new license key, overriding the existing program files.
In order to fax report set results successfully in a cluster, you need to configure the fax settings for
both the admin server and backup server respectively according to your requirements.
The following topics show detailed steps for setting up a cluster:
●
Setting up the shared disk
●
Installing JReport Enterprise Server on cluster target computers
●
Configuring the admin server
●
Configuring the backup servers
●
Configuring the slave servers
Setting up the shared disk
JReport Enterprise Server cluster requires a place to store certain files generated or required when the
cluster is functioning, such as properties files, realm files, resource information files, temporary files,
and history files. To accomplish this goal, you can use a shared disk, which can be one of any network
disks (or directories) that can be accessed by the servers in the cluster. The shared disk shares a
common drive letter on all clustered servers.
Since the shared disk is a mapped network disk (or directory) with a common drive letter on all
clustered servers, you have to map the shared network disk (or directory) on each machine individually
(to map a network drive, open a My Computer window, then on the Tools menu, click Map Network
Drive).
To set up a shared disk:
1. Share a disk (or directory), which can be on any computer in the network, so that the disk (or
directory) can be mapped to a drive letter by a clustered server. A reliable and stable system is
recommended for the shared disk (or directory), since a lot of file-accessing operations will take
place there.
2. On each clustered server, map the shared directory to a drive letter. Keep in mind that you should
use the same drive letter for all the clustered servers. If for example, K is used as the drive letter
for the mapped drive, then all the servers in the cluster should use K as the drive letter for the
mapped drive.
Installing JReport Enterprise Server on cluster target computers
On each computer that will join the cluster, install JReport Enterprise Server using the appropriate
license key for cluster. For instructions on installing JReport Enterprise Server, see the chapter
Installing and Uninstalling.
Configuring the admin server
You can configure the admin server by using the JReport Administration page or the server.properties
file.
Using the JReport Administration page
1. Launch JReport Enterprise Server on the admin server, and then log onto the JReport
Administration page (port 8889 by default).
2. Click Configuration on the system toolbar and switch to the Cluster tab.
3. Check the Admin Server option to indicate that this server will run as the admin server in the
cluster.
4. In the Server's RMI Host text field, type the RMI IP address or host name of the local server, or
localhost.
5. In the Server's RMI Port text field, type the RMI port number of the local server.
6. Specify the paths of the shared directories on the shared disk (mapped network drive), such as
shared properties directory, shared realm directory, shared resource root directory, shared
temporary directory, and shared history directory.
7. If you are using HSQLDB for JReport Enterprise Server's system database, click Data on the
system toolbar, then in the URL text field, make the system database be in the shared properties
directory as set in step 6.
8. Shut down JReport Enterprise Server on the admin server.
Using the server.properties and dbconfig.xml files
1. Launch JReport Enterprise Server once on the admin server, and then shut it down.
2. Open the server.properties file in <install_root>\bin.
3. Modify the properties file as follows:
❍
❍
❍
❍
❍
server.rmi.port=1129
Specifies the RMI port number of the local server.
cluster.server.admin=true
Specifies whether the server is the admin server. The default value is true.
cluster.server.backup=false
Specifies whether the server is a backup server. The default value is false.
loadbalance=(boolean)
Specifies whether to enable the load-balancing feature. The default value is true.
loadbalance.type=(integer)
Specifies the load-balancing algorithm type. This property only applies to the admin server.
Value
Description
0
Allocates tasks with the Least Current Report Sets Algorithm.
1
Allocates tasks with the Round Robin Algorithm.
2
Allocates tasks with the Least Weighted Current Report Sets Algorithm.
3
Allocates tasks randomly.
See Built-in load balancing algorithm for details about the four load balancing types.
❍
❍
cluster.only_accept_predefined_server=true
If this value is set to true, the admin server will only accept connections from servers that exist
in the Predefined Server List. The default value is false.
cluster.update_concurrent_reports_immediately=(boolean)
Specifies whether to send the number of concurrently running report sets on this server to the
admin server immediately when the number is changed. The default value is false.
If it is set to false, each clustered server will check whether this number has changed at a
certain time interval. If it has changed, the number will be sent to the admin server. Otherwise
it will not be sent.
This property can be set to true when you have enough network bandwidth.
4. Specify the paths of the shared directories on the shared disk (mapped network drive), such as
shared properties directory, shared realm directory, shared resource root directory, shared
temporary directory, and shared history directory.
Add the following properties to the server.properties file:
❍
❍
❍
❍
❍
resource.share.temp.dir=
Specifies the directory for storing temporary files.
resource.share.hist.dir=
Specifies the directory for storing all versions of report set results in the cluster.
resource.share.realm.dir=
Specifies the directory of the realm files.
resource.share.properties.dir=
Specifies the directory of the properties files.
resource.root=
Specifies the directory of the JReport demo report sets.
5. If you are using HSQLDB for JReport Enterprise Server system database, edit dbconfig.xml in
<install_root>\bin by making the system database be in the shared properties directory as set
in step 4.
Notes:
●
The shared directories must exist in the shared disk before the cluster can begin to function. If they
do not exist, create or copy them from the JReport Enterprise Server home directory. They are
properties, realm, jreports, temp, and history.
If you choose to copy folders such as properties, realm, jreports, temp, and history from the JReport
Enterprise Server home directory to the shared disk, you must first clear the content of the folders.
Otherwise, the existing settings and information the folders contain will cause conflicts when JReport
Enterprise Server is running.
●
●
The folder names for the shared directories can be different from that of JReport Enterprise Server.
However, you must make sure the paths you specify are consistent with that of the existing
directories.
If the content of the shared resource root directory jreports is removed, the Public Reports folder in
the resource tree will be empty. When JReport Enterprise Server finds that there is no content in the
properties folder, it will re-scan the resource directory in order to re-construct the properties folder's
content.
Configuring the backup servers
You can configure the backup server by using the JReport Administration page or the server.properties
file.
Using the JReport Administration page
1. Launch JReport Enterprise Server on the backup server, and then log onto the JReport
Administration page (port 8889 by default).
2. Click Configuration on the system toolbar, then click the Cluster tab.
3. Check the Backup Server option to indicate that this server will run as a backup server in the
cluster.
4. In the Admin Server's RMI Host text field, type the RMI IP address or host name of the admin
server.
5. In the Admin Server's RMI Port text field, type the RMI port number of the admin server.
6. In the Server's RMI Host text field, type the RMI IP address or host name of the local server.
7. In the Server's RMI Port text field, type the RMI port number of the local server.
8. Specify the paths of the shared directories on the shared disk (mapped network drive), such as
shared properties directory, shared realm directory, shared resource root directory, shared
temporary directory, and shared history directory. Make these settings consistent with those of
the admin server.
9. Make sure that the backup server uses the same database as the admin server. If the system
database of the backup server is different from the admin server's, after the backup server is
promoted to be the admin server, the new admin server cannot retrieve data stored in the original
admin server's system database.
If you are using HSQLDB for JReport Enterprise Server's system database, click Data on the
system toolbar, then in the URL text field, make the system database be in the shared properties
directory as set in step 8.
10. Shut down JReport Enterprise Server on the backup server.
Using the server.properties and dbconfig.xml files
1. Launch JReport Enterprise Server once on the backup server, and then shut it down.
2. Open the server.properties file in <install_root>\bin.
3. Modify the properties file as follows:
❍
❍
cluster.admin.rmi.port=1129
Specifies the admin RMI (remote method invocation) port. The default value is 1129.
server.rmi.port=1130
Specifies the RMI port number of the local server.
❍
❍
❍
cluster.server.admin=false
Specifies whether the server is the admin server. The default value is true.
cluster.server.backup=true
Specifies whether the server is a backup server. The default value is false.
loadbalance.type=(integer)
Specifies the load-balancing algorithm type.
This property only applies to the admin server. The reason why this property should be set for
every backup server is that when the admin server is down, the promoted backup server will
use its local load-balance type settings. This property will not take effect until this server is
promoted to be the admin server. Make sure that the values for this property are identical on all
backup servers.
4. Specify the paths of the shared directories on the shared disk (mapped network drive), such as
shared properties directory, shared realm directory, shared resource root directory, shared
temporary directory, and shared history directory.
Add the following properties to the server.properties file:
❍
❍
❍
❍
❍
resource.share.temp.dir=
Specifies the directory for storing temporary files.
resource.share.hist.dir=
Specifies the directory for storing all versions of report set results in the cluster.
resource.share.realm.dir=
Specifies the directory of the realm files.
resource.share.properties.dir=
Specifies the directory of the properties files.
resource.root=
Specifies the directory of the JReport demo report sets.
Make sure that these settings are consistent with those of the admin server.
5. Make sure that the backup server uses the same database as the admin server. If the system
database of the backup server is different from the admin server's, after the backup server is
promoted to be the admin server, the new admin server cannot retrieve data stored in the original
admin server's system database.
If you are using HSQLDB for JReport Enterprise Server's system database, edit dbconfig.xml in
<install_root>\bin by making the system database be in the shared properties directory as set
in step 4.
Notes:
●
To make sure the backup server obtains report font information after it is promoted to be the admin
server, set the font directory of the admin server and backup server on the shared disk (mapped
network drive). There are two ways to set the font path:
❍
❍
●
Use the -D parameter to set the property jreport.server.font.path in the JReport Enterprise Server
startup file.
Add and set the property server.font.path in the server.properties file.
The shared directories must exist in the shared disk before the cluster can begin to function. If they
do not exist, create or copy them from the JReport Enterprise Server home directory. They are
properties, realm, jreports, temp, and history.
If you choose to copy folders such as properties, realm, jreports, temp, and history from the JReport
Enterprise Server home directory to the shared disk, you must first clear the content of the folders.
Otherwise, the existing settings and information the folders contain will cause conflicts when JReport
Enterprise Server is running.
●
●
The folder names for the shared directories can be different from that of JReport Enterprise Server.
However, you must make sure the paths you specify are consistent with that of the existing
directories.
If the content of the shared resource root directory jreports is removed, the Public Reports folder in
the resource tree will be empty. When JReport Enterprise Server finds that there is no content in the
properties folder, it will re-scan the resource directory to re-construct the properties folder's content.
Configuring the slave servers
You can configure the slave server by using the JReport Administration page or the server.properties
file.
Using the JReport Administration page
1. Launch JReport Enterprise Server on the slave server, and then log onto the JReport
Administration page (port 8889 by default).
2. Click Configuration on the system toolbar and switch to the Cluster tab.
3. Check the Slave Server option to indicate that this server will run as the slave server in the
cluster.
4. In the Admin Server's RMI Host text field, type the RMI IP address or host name of the admin
server.
5. In the Admin Server's RMI Port text field, type the RMI port number of the admin server.
6. In the Server's RMI Host text field, type the RMI IP address or host name of the local server.
7. In the Server's RMI Port text field, type the RMI port number of the local server.
8. Shut down JReport Enterprise Server on the slave server.
Using the server.properties file
1. Launch JReport Enterprise Server once on the slave server, and then shut it down.
2. Open the server.properties file in <install_root>\bin.
3. Modify the properties file as follows:
❍
cluster.server.backup=false
❍
cluster.server.admin=false
❍
cluster.admin.rmi.port=1129
❍
cluster.update_concurrent_reports_immediately=(Boolean)
4. Specify the paths of the shared directories on the shared disk (mapped network drive).
Add the following properties to the server.properties file:
❍
❍
❍
resource.share.realm.dir=
Specifies the directory of the realm files.
resource.share.properties.dir=
Specifies the directory of the properties files.
resource.root=
Specifies the directory of the JReport demo report sets.
❍
❍
resource.share.temp.dir=
Specifies the directory for storing temporary files. It is not a must for a slave server.
resource.share.hist.dir=
Specifies the directory for storing all versions of report set results in the cluster. It is not a must
for a slave server.
Make sure that these settings are consistent with those of the admin server.
After configuring each server in the cluster accordingly, the setting up process is done and you can now
launch JReport Enterprise Server on each server one by one, starting with the admin server.
Example 1: Setting up a simple JReport Enterprise Server cluster
This example demonstrates how to configure a simple JReport Enterprise Server cluster by modifying
the configuration options on the JReport Administration page on each JReport Enterprise Server.
Example description:
●
●
Setting up a simple JReport Enterprise Server cluster using the JReport Administration page.
The cluster consists of two copies of JReport Enterprise Servers. One serve as the admin server,
while the other serve as a slave server.
Take the following steps to set up the cluster:
1. Install JReport Enterprise Server to C:\JReport\Serveradmin. This server will run as the admin
server.
2. Install JReport Enterprise Server to C:\JReport\Serverslave. This server will be configured to
run as a slave server.
Note: When installing the two JReport Enterprise Servers, you should use the special license
key only for JReport Enterprise Server cluster.
3. Launch the JReport Enterprise Server installed to C:\JReport\Serverslave.
4. In the address bar of an Internet Explorer browser, type http://localhost:8889.
5. On the JReport Administration page, click Configuration on the system toolbar.
6. In the Cluster tab, select the Slave Server radio button, and then type the IP address or host
name of the admin server in the Admin Server's RMI Host box. Here 127.0.0.1 is used.
7. In the Service tab, type the port number as required in the Port box.
The port is the service port you use to access the JReport Console page. The default port number
is 8888. If there are two or more JReport Enterprise Servers started on one machine, the service
port number of each server must be changed to a unique one, in order to avoid port conflicts.
In this example, the port number is changed to 8886, since the admin server will use the default
port number 8888.
8. Type the port number you want in the Administration Port box. In this example, 8887 is used.
The reason why the port number should be changed here is for the same reason as that of step 5.
9. Click OK to accept all the changes.
10. Shut down this JReport Enterprise Server.
11. Launch the JReport Enterprise Server installed to C:\JReport\Serveradmin.
Note that when installing a JReport Enterprise Server with a special license key for cluster, the
server will be an admin server by default. In this example, the shared disk and load balance
feature are not required, and so the admin server does not need to be configured.
12. Launch the slave server. The following information is available in the Command Prompt window.
Connecting to admin server [127.0.0.1:1129].
Connected to admin server [127.0.0.1:1129] successfully.
This means that the JReport Enterprise Server cluster has been configured and started
successfully.
13. Access the JReport Console page of the admin server using port 8888 as an administrator, and
then submit a scheduled task. In the Scheduled tab, you will see the newly scheduled task.
14. Access the JReport Console page of the slave server using port 8886 as Tom, and then submit
another scheduled task.
Notes:
●
●
●
You can only view scheduled tasks that you have submitted.
From the JReport Console page of the admin server or the slave server, you can only view completed
tasks that you have submitted.
If you shut down the slave server, all the scheduled tasks will be run on the admin server, no matter
on which server you submitted the task.
Example 2: Setting up a JReport Enterprise Server cluster for a production
environment
This example demonstrates how to configure a JReport Enterprise Server cluster by modifying the
server.properties file on each JReport Enterprise Server. There will be three computers in the cluster.
They are node0, node1 (IP address: 127.0.0.1) and node2 (IP address: 127.0.0.2). All JReport
Enterprise Server in the cluster use HSQLDB as the server system database.
Take the following steps to set up the cluster:
1. Configure the shared directory on node0. Share a folder on the node0 computer so that it can be
accessed by the network computers. On node1 and node2, select drive letter K to map to the
shared directory.
2. Configure node1 to run as the admin server.
Install JReport Enterprise Server to C:\JReport\Serveradmin on node1. Launch JReport
Enterprise Server on node1 and then shut it down. Open the server.properties file in C:\JReport
\Serveradmin\bin, and modify it as below:
cluster.server.backup=false
cluster.server.admin=true
server.rmi.port=1129
Add the following properties:
loadbalance.type=1
resource.share.temp.dir=K:\temp
resource.share.hist.dir=K:\history
resource.share.realm.dir=K:\realm
resource.share.properties.dir=K:\properties
resource.root=K:\jreports
Then edit dbconfig.xml in <install_root>\bin by making the system database be in the shared
properties directory K:\properties as set above.
3. Configure node2 to run as a backup server.
Install JReport Enterprise Server to C:\JReport\Serverbackup on node2. Launch JReport
Enterprise Server on node2 and then shut it down. Open the server.properties file in C:\JReport
\Serverbackup\bin, and modify it as follows:
cluster.server.backup=true
cluster.server.admin=false
cluster.admin.rmi.port=1129
server.rmi.port=1130
Add the following properties:
loadbalance.type=1
resource.share.temp.dir=K:\temp
resource.share.hist.dir=K:\history
resource.share.realm.dir=K:\realm
resource.share.properties.dir=K:\properties
resource.root=K:\jreports
Then edit dbconfig.xml in <install_root>\bin by making the system database be in the shared
properties directory K:\properties as set above.
4. Copy the five folders (temp, history, realm, properties and jreports) in C:\JReport\Serveradmin
on node1 to the network drive K. Empty the other four folders while keeping the jreports folder
intact, since the resources in this folder will be used in the following steps.
5. Launch the admin server on node1. In the Command Prompt window, you will see the following
information:
JReport Enterprise Server is ready for service.
Launch the backup server on node2. In the Command Prompt window, you will see the following
information:
Connecting to admin server [127.0.0.1:1129].
Connected to admin server [127.0.0.1:1129] successfully.
This means that the cluster has been configured and launched successfully.
6. Log onto the JReport Administration page on the admin server on node1, click Cluster on the
system toolbar, click the Config tab, and then click Add Server. Provide the following server
information:
❍
Server Name: B1 (The server name can be any string you prefer. It does not need to be the
computer network ID.)
❍
Host Address: 127.0.0.2 (The IP address of the backup server).
❍
RMI Port: 1130
❍
Backup Priority: 1 (The backup priority can be any integer. However, it must be unique among
the backup servers. A slave server does not require this property to be set).
Only after a server has been added to the predefined server list, can it be tracked and monitored
by the JReport Server Monitor.
Starting a JReport Enterprise Server cluster
To start a JReport Enterprise Server cluster, first start the admin server, then start other clustered
servers one by one. When starting the clustered servers, they are connected to the admin server to
join the cluster.
Clustering JReport Enterprise Server with other application
servers
This section provides examples of clustering JReport Enterprise Server with two popular application
servers:
●
Clustering with IBM WebSphere Server 5.1
●
Clustering with BEA WebLogic Server 813
Clustering with IBM WebSphere Server 5.1
The following example describes how to configure a WebSphere 5.1 cluster and then integrate JReport
Enterprise Server in the cluster.
Configuring a WebSphere 5.1 cluster
Assuming that there are four computers named admin-PC, PC1, PC2, and PC3 in the server cluster. The
admin-PC is used as a dispatcher. Each clustered computer should have a unique IP address and host
name.
Take the following steps:
1. Installation
a. Install IBM Http Server1.3.28 on admin-PC.
b. Install IBM WebSphere Network Deployment Server 5.1 on admin-PC. Set Admin Console
Port to 9091 and Soap Connector Address to 8889.
c. Install IBM WebSphere Application Server 5.1 on PC1, PC2, and PC3.
2. Adding PC1, PC2, and PC3 to Deployment Manager
a. Start Deployment Manager on admin-PC.
b. On PC1, go to the folder <WebSphere_Application_server_install_root>/bin. Then, use
the command addnode.bat admin-pc 8889 to add the node agent to Deployment Manager.
Where 8889 is the Soap Connector Address of the Deployment Manager.
c. After receiving the successful message, perform the same action on PC2, and then on PC3.
Never do this on more than one node at a time.
After that, on each node there is a node agent running.
3. Creating a cluster
a. Open a web browser and then use the URL http://admin-pc:9091/admin to open the
Deployment Manager Administrative Console.
b. In the Administrative Console, go to Servers > Clusters.
c. Click New to create a new cluster.
d. Input a cluster name jreport-cluster. Uncheck the Prefer Local option and check the
Create Replication Domain for this cluster option. Then click Next.
e. Input a clone name clone1 and then select PC1 to assign to. Check the Generate Unique
Http Ports and Create Replication Entry in this Server options. Select the Default
application server template option. You also can assign a value to weight of this clone.
Then click Apply.
f. Repeat the above step to create clone2 and clone3 which are assigned to PC2 and PC3. Then
click Next.
g. Click Finish. Now, you can start the cluster jreport-cluster.
4. Testing the cluster workable
a. By default, after installing the WebSphere Application server, there is a standalone server
instance named server1 created. The server1 uses port 9080 for the HTTP transport. When a
clone is created, another unique HTTP port is created. In this demonstration, this port on
clone1, clone2, and clone3 are all set to 9081. You need to add this port to the host alias.
Follow Environment > Virtual Hosts > default_host > Host Aliases > New to do this.
b. Deploy the DefaultApplication.ear from <WebSphere_install_root>/installableApps.
During the deployment, map the application to the cluster jreport-cluster.
c. When the deployment has finished, start the application. You can then use these URLs to test
whether the clones work or not:
http://PC1:9081/hello
http://PC2:9081/hello
http://PC3:9081/hello
5. Working with IBM Http Server
a. In the Administrative Console, use Environment > Update Web Server Plugin to generate
the plugin-cfg.xml file. The file will be generated in <Network_Deployment_install_root>/
config/cells.
b. Edit the httpd.conf in <Http_Server_root>/conf by adding the following lines:
LoadModule ibm_app_server_http_module "d:\WebSphere\AppServer/bin/
mod_ibm_app_server_http.dll"
WebSpherePluginConfig "d:\WebSphere\ DeploymentManager\config \cells\plugincfg.xml"
The plugin file should point to the one generated before.
c. Start Http Server, then test the working load, using the following URL:
http://admin-pc/snoop
Integrating JReport Enterprise Server in the cluster
1. Create a WAR file including the JReport Enterprise Server application. Be sure to add <load-onstartup> in the web.xml.
For information about creating a JReport Enterprise Server WAR file, see Building a WAR/EAR file
to include a self-contained JReport Enterprise Server.
2. Deploy the application WAR. Make sure that it is mapped to the cluster. Set context root to /
jreport.
3. Set JVM parameter –Dreporthome in each clone.
4. Regenerate the plugin-cfg.xml file.
5. Copy the admin, dhtmljsp, images, javascript, jinfonet, and style folders to <http_server_root>/
htdocs/en_US.
6. Start the JReport application and then restart the HTTP server.
7. Access JReport using the following URLs:
http://admin-pc/jreport/jrserver
http://admin-pc/jreport/jinfonet/index.jsp
Clustering with BEA WebLogic Server 813
This section describes how to configure a WebLogic 813 cluster and then integrate JReport Enterprise
Server in the cluster.
Assuming that the server cluster contains an admin server named adminNew (port 7001) and two
managed servers named manage1 and manage2. Each clustered computer should have a unique IP
address or host name.
Configuring a BEA WebLogic cluster
1. Start the Configuration Wizard. On Windows you can start it from the Start menu by selecting BEA
WebLogic Platform 8.1 > Configuration Wizard.
2. Select Create a new WebLogic configuration, and then click Next.
3. In the Select a Domain Template page, select WLS Domain from the available template list, and
then click Next.
4. Choose the Custom configuration, and then click Next.
5. In the Configure Administration Server page, enter the IP address of your machine in the Listen
Address field. Change or accept the default settings for The Server Instance's Name and Listen
Port. Then click Next.
6. In the Managed Servers, Cluster and Machine options panel, select Yes. Then click Next.
7. In the Configure Managed Servers page, click Add to add two managed servers as follows:
Name
Listen Address
Listen port
manage1
127.0.0.114
7006
manage2
127.0.0.131
7007
Note: Keep in mind that each server instance in your cluster, including the admin server and
all managed servers, must have a unique Listen Address and Listen Port. If your managed
server has the same Listen Address as the admin server, change the default values shown for
the listen ports in this page, and enter the same Listen Address as you assigned to the Admin
Server. After assigning a unique Listen Address and Listen Port combination, click the Add
button to create another managed server.
8. In the Configure Clusters page, add a cluster as follows:
Name
Multicast Address
Multicast Port
Cluster Addresses
Cluster_28
237.0.0.1
7001
127.0.0.114:7006,
127.0.0.131:7007
Then click Next.
Note: If there are other users configuring WebLogic clusters, contact your administrator to
get the reserved multicast address and port and enter them here. The clustered servers use
the multicast address for broadcasting heartbeats and for other server-to-server
communications. If another application on your network is using the same multicast address,
conflicts may generate and cause cluster problems.
9. In the Assign Servers to Cluster page, highlight the managed servers in the left column, and then
use the right arrow button to assign the servers to the cluster listed in the right column. Then click
Next.
10. In the Configure Machine page, add two machines as follows:
Name Node
manager listen address Node
manager listen port
Machine_zjh
127.0.0.114
5555
Machine_zwm
127.0.0.131
5555
11. Assign servers to machines. Assign the server manage1 to the machine Machine_zjh and the
server manage2 to the machine Machine_zwm.
12. In the Database(JDBC) Options page, select No. Then click Next.
13. In the Messaging(JMS) Options page, select No. Then click Next.
14. In the Configure Administrative Username and Password page, set User Name to weblogic and
User Password to 12341234.
15. In the Configure Windows Options page, set Shortcut to No and Service to No. Then click Next.
16. Set Server Start Mode to Development Mode, and Java SDK to Sun SDK. Then click Next.
17. Create WebLogic configuration. Set Domain Name to madomain28 and Location to C:\bea813
\user_projects\domains\mydomain28. Then click Create.
18. Copy domains from C:\bea813\user_projects from the admin server to the two managed
servers.
19. Start the admin server on the admin server:
C:\bea813\user_projects\domains\mydomain28\startWebLogic.cmd.
Start the manage1 server on manage1 server:
C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.cmd, and then log onto
manage1 using the URL http://127.0.0.148:7001.
Start the manage2 server on manage2 server:
C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.cmd, and then log onto
manage2 using the URL http://127.0.0.148:7001.
Configuring HTTP Dispatcher
1. Create web.xml and weblogic.xml in c:\bea813\httproxy\WEB-INF:
jar -cvf httproxy.war WEB-INF
2. Create a new WebLogic server using the Configuration Wizard:
Name
Listen address
Listen port
httpdispatcher
All Local Addresses
6000
3. Deploy httproxy.war to the new WebLogic server.
4. Log in http://localhost:6000/console.
Creating JReport Enterprise Server jreport.war and deploying it to the admin server
1. Go to Mydomain28 > Deployments > Web Application Modules.
2. Click the Deploy a New Web Application Module link.
3. Click Upload your file(s).
4. Select the jreport.war, and then click Upload.
5. Select adminNew > upload.
6. Select jreport.war and then click Target Module.
7. Select Independent Servers > adminNew.
8. Select Clusters > Cluster_28 and then select manage1 and manage2. Then click Continue.
9. Modify admin server C:\bea813\user_projects\domains\mydomain28\startWebLogic.cmd, add
reporthome to the class path:
-Dreporthome=C:\JReport\Server
10. Modify manage1 server C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.
cmd, add reporthome to the class path:
-Dreporthome=C:\JReport\Server
11. Modify manage2 server C:\bea813\user_projects\domains\mydomain28\startManagedWebLogic.
cmd, add reporthome to the class path:
-Dreporthome=C:\JReport\Server
12. Start admin server, manage1 and manage2 server, and the HTTP dispatcher server. Log in using
the URL http://127.0.0.148:6000/servlet/jinfonet/index.jsp.
Sample solution: Dispatch RMI DHTML requests in clustered server
environment
This sample solution is to visit DHTML JSPs remotely from WebSphere 5.1 to JReport Enterprise Clustered Server. See the
below diagram for the structure:
This demo dispatcher dispatches requests from different sessions to different JReport Enterprise Server according to RoundRobin algorithm. The dispatcher has the Fail Over function, which will periodically check whether there is any unavailable
server in the cluster. No request will be dispatched to the unavailable server until the server is checked to be available again.
In general, the solution can be categorized into the below major steps:
1. Set up the server cluster.
2. Generate a WAR file containing DHTML RMI JSP and Dispatcher for WebSphere.
3. Deploy the WAR file to WebSphere.
4. Configure cluster JReport Enterprise Server.
In the following part, we will explain clearly what exact operations you are expected to make in each of the main steps.
Setting up the server Cluster
You can go to the JReport Enterprise Server Cluster chapter for the background knowledge of JReport cluster concepts and
configurations.
In this example we will set up two JReport Enterprise Servers into the cluster using the Round Robin algorithm.
192.168.126.116
192.168.126.115
Refer to Setting up a JReport Enterprise Server cluster for the specific steps of setting up JReport Enterprise Server in a
cluster.
Generating a WAR file containing DHTML RMI JSP and Dispatcher for Websphere
1. Create a new directory in your local disk, e.g. d:\servlet.
2. Create a sub directory WEB-INF in it: d:\servlet\WEB-INF.
3. Generate a web.xml like following and put it in d:\servlet\WEB-INF.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>jrs.remote.host</param-name>
<param-value>127.0.0.1</param-value>
</context-param>
<context-param>
<param-name>jrs.remote.rmiport</param-name>
<param-value>1129</param-value>
</context-param>
<!-- The third param(jrs.rmi.auth_file) is optional.
"authFileName" includes the auth file's realpath and auth file name.
For example: C:\JReport\Server\bin\rmi.auth. The content of the auth file
specified here should be kept consistent with that of the auth file used
by JReport Enterprise Server, though there is no need to point to the same
auth file.-->
<context-param>
<param-name>jrs.rmi.auth_file</param-name>
<param-value>C:\JReport\Server\bin\rmi.auth</param-value>
</context-param>
<filter>
<filter-name>Character Encoding</filter-name>
<filter-class>jet.server.servlets.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>sendfile</servlet-name>
<servlet-class>jet.server.servlets.SendFileServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>dhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLlet</servlet-class>
</servlet>
<servlet>
<servlet-name>jrdhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLRunReportlet</servlet-class>
</servlet>
<servlet>
<servlet-name>help</servlet-name>
<servlet-class>jet.web.dhtml.JHelplet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>sendfile</servlet-name>
<url-pattern>/sendfile/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>dhtml</servlet-name>
<url-pattern>/dhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jrdhtml</servlet-name>
<url-pattern>/jrdhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>help</servlet-name>
<url-pattern>/help/*</url-pattern>
</servlet-mapping>
</web-app>
4. Create a directory lib in d:\servlet\WEB-INF.
5. Copy the class files JREngine.jar, JRESServlets.jar, JRWebDesign.jar, log4j-1.2.8.jar and sac.jar from
<server_install_root>\lib to d:\servlet\WEB-INF\lib.
6. Create a jar file to include the resources folder which is located in server installation root and name it languages.jar.
For example, run the following command:
<server_install_root>>jar -cvf languages.jar resources
Then put the jar in d:\servlet\WEB-INF\lib.
7. Compile the dispatcher DemoRemoteDispatcher.java stored in <server_install_root>\help\server\en\samples with
<server_install_root>\lib\JRESServlets.jar and <server_install_root>\lib\servlet.jar. The class file
DemoRemoteDispatcher.class and some other class files will be generated.
8. In d:\servlet\WEB-INF, create folder and subfolder d:\servlet\WEB-INF\classes\demodispatch and copy
DemoRemoteDispatcher.class together with the other class files generated in step 7 to this folder.
9. Copy all the folders in <server_install_root>\public_html to d:\servlet. If you are not using remote
administration functions you need not copy the admin folder.
10. Optionally copy the folder userguide in <server_install_root>\help\server\en to d:\servlet\help\server\en.
11. Using the following command to create a WAR file, name it as servlet.war:
d:\servlet>jar -cvf servlet.war *
Deploying the WAR file to Websphere
1. Start IBM WebSphere 5.1. (WebSphere 5.0 is also ok for the solution).
2. Open Administrative Console. You can open Administrative Console by using the Start Menu, or by using the URL:
http://hostname:9090/admin/, where hostname is host name or IP address, and 9090 is the port number.
3. After successfully log in, expand the Applications node, and then click Install New Application.
4. Click Browse to select your .war file. In the Context Root field, type a context path such as /servlet/ ("/servlet" is
also ok). Click Next.
5. Do not check any option in this page, and then click Next.
6. Type RMI_DHTML in the Application Name field. DO NOT check the Pre-compile JSP option. Click Next.
7. Do not make any changes in the next two pages.
8. Click Finish in the Summary page. The installing process may take several minutes, wait until the process is completed.
9. After the installation process is completed, click Save to Master Configuration. Then in the Save to Master
Configuration dialog, click Save.
10. This step is to configure the dispatcher and cluster server. Go to WebSphere Admin Control to add some properties for
this dispatcher. Expand Servers, go through Application Servers > Server1 > Process Definition (in the
Additional Properties table) > Java Virtual Machine > Custom Properties (in the Additional Properties table).
Click the New button to add properties for our demo dispatcher com.jinfonet.dispatcher.configFile and jrs.remote.
dispatcher.
Note that the the dispatcher DemoRemoteDispatcher.java will read the clustered server information in the hostport.
conf file like below:
rmiserver=192.168.126.116:1129
rmiserver=192.168.126.115:1130
...
11. If you have set up JReport Enterprise Server in a cluster, you can append their host and port information to the above
text file.
12. Click Save link in Message(s) table and click Save button to save the changes, and then restart WebSphere5.1.
Configuring Cluster JReport Enterprise Server
1. Make sure JReport Enterprise Server has been started once in order that the server.properties file is generated.
2. Change server.properties file in <server_install_root>\bin as follows:
server.rmiserver.enable=true
server.rmiadminservice.enable=true
Then you can start JReport Enterprise Server and access DHTML with the following URL:
http://hostname:9080/servlet/dhtmljsp/dhtml.jsp?jrs.report=/SampleReports/EmployeeInformation.cls&jrs.
catalog=/SampleReports/SampleReports.cat&
jrs.path=/SampleReports/EmployeeInformation.cls
Integrating JReport Enterprise Server with a Java
Application Server
JReport Enterprise Server is implemented using Java Servlet technology and Java Server Pages (JSP).
These servlets and JSP pages enable you to work with any Java EE compliant application server and
administer JReport Enterprise Server remotely through a web browser.
In order to deploy to an application server, you first have to create a Web Application Archive (WAR)
file or an Enterprise Application Archive (EAR) file to include a JReport Enterprise Server, and then use
the application server deployment tools to deploy the WAR/EAR file.
This section has covered the following:
●
Seamless integrated security solution
●
Building a WAR/EAR file to include a self-contained JReport Enterprise Server
●
Deploying JReport Enterprise Server to a Java application server
●
Integrating remote JReport Enterprise Server
Seamless integrated security solution
As a reporting server, JReport Enterprise Server protects information via authentication and
authorization processes. Furthermore, JReport allows a web application to embed this reporting
solution in it seamlessly not only in the UI but also with the Java EE technology. In this way, the
seamless integrated security solution becomes one of the key solutions of JReport Enterprise Server.
●
Integrated JReport solution - The two general scenarios
●
An example of the integrated JReport security solution
Integrated JReport solution - The two general scenarios
There are all kinds of scenarios on using JReport solution. However, they can all be categorized into
two types according to the location of the JReport Enterprise Server instance:
●
JReport Enterprise Server instance is located in the same JVM as the web application
●
JReport Enterprise Server instance is located in a different JVM from the web application
JReport Enterprise Server instance is located in the same JVM as the web application
In this scenario, the application includes JReport Enterprise Server JAR files into the same JVM, and it
also includes JReport built-in servlets and JSPs which handle DHTML and other reporting services, for
example, scheduling report sets.
Description of the illustration
In this scenario, the client (HTTP client) most of time will send a request to the portal, JSP or Servlet of
the web application, and the web application can either call the public server API to the server instance
directly to run a report set and output a report set result to file system, or it can re-direct the request
to the JReport services provided by the JReport JSPs and Servlets, for example the DHTML JSP and
Servlet. JReport JSPs/Servlets will first make sure the request is authenticated and authorized. After
which, it will call the internal API method against the JReport Enterprise Server Instance in the same
JVM to fulfill the requirement and return suitable information to the client via JSPs or internally
generated output steam.
In the illustration above, you can see that the HTTP client can send a request directly to the application
JSP/Servlets or JReport JSPs/Servlets. Before a response is made by the JReport JSP and Servlet, an
Auth Check is performed to authenticate the session and then authorize the action. Normally, the builtin authenticator and authorization instance of JReport Enterprise Server (Instance) is called to perform
these checking actions. However, if the application wants to control the process, the web application
developer can set up the configuration to ensure that the customized authenticator and authorization
instance is used instead.
Pay attention to the RED box: External Authorized instance. This Java class implements JReport jet.
server.api.http.HttpExternalAuthorized to provide the authenticated user ID from the session. If this
Instance returns a user ID, JReport will pass it to its authenticator to check if it is valid. If the user ID
is valid for JReport, JReport will qualify the session of the request, and will not ask for a login again. If
this external authorized instance does not return a user ID, JReport will respond the request by asking
for a login.
The other RED box - Authenticator and Authorizer instance, can be provided by implementing two other
interfaces:
jet.server.api.custom.security.AuthenticationProvider and jet.server.api.custom.security.
AuthorizationProvider.
The AuthenticationProvider is used to authenticate the user ID, including whether or not the user ID is
valid. The AuthorizationProvider is used to check the privileges of the user against the action that the
user requests.
During the auth check process, if the external authorized instance returns a user ID of the session,
JReport auth check will continue to send the user ID to the AuthenticatorProvider to check if it is valid
or not. If the user is valid, the auth check will qualify the session of the request, and then continue to
check if the action is valid for the user by asking the AuthorizationProvider instance.
In general, there is an authentication callback via the implemented interface of External Authorized.
Two security check providers can be implemented to seamlessly integrate JReport security into the
application.
JReport Enterprise Server instance is located in a different JVM from the web
application
From the web application itself, the architecture is not changed. However, the way that it uses the
JReport solution is different since the JReport Enterprise Server Instance is outside of the Web
application server. Inside of the Web Application, the instance is RMI server being called by the web
application server or JReport built-in JSP/Servlets for the RMI solution.
An example of the integrated JReport security solution
Since JReport provides an embedded solution, customer usage scenarios will vary. However, there are
two general basic types. Now let's take a look at a detailed example:
Here, there are two WebSphere Servers that have integrated JReport RMI server instances and DHTML
JSP and Servlets in the WAR. Outside of the Web Application, there are two JReport Stand-alone servers
clustered in two separate machines.
In order to make sure that the customer's end user will not be asked to login twice, they implemented
External Authorized interface to return the JReport user ID of the session (if the user logs into their
portal). Here's how this interface has been implemented:
public class JMAuthorizer implements HttpExternalAuthorized
{
public String getExternalAuthorizedUser(String s, HttpServletRequest httpservletrequest)
{
HttpSession httpSession = httpservletrequest.getSession();
String userid = (String)httpSession.getAttribute("authenticated_user");
return userid;
}
//Redirect login window
public boolean handleUnAuthenticatedRequest
(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse,
String s, String s1)
{
try{
httpservletresponse.setContentType("text/html");
PrintWriter printwriter = ServerUtil.getResponseWriter(httpservletresponse);
printwriter.write("\n\t<script language=\"JavaScript\">");
printwriter.write("window.top.location.replace
('http://localhost:8888/login/index.htm');");
printwriter.write("\n\t</script>");
printwriter.close();
}catch(IOException e){
e.printStackTrace();
}return false;
}
public boolean askInvalidate(UserSession usersession)
{
return true;
}
public String getExternalAuthorizedUser(String s, Object obj)
{
System.out.println("getExternalAuthorizedUser(String s, Object obj)>>>");
if(obj instanceof HttpServletRequest)
return getExternalAuthorizedUser(s, (HttpServletRequest)obj);
else
return null;
}
public void notifyLogout(UserSession usersession)
{
}
}
From the implementation above, you can see that the method getExternalAuthorizedUser() is used to get
the authentication information from the request. If it finds the authentication information, it will return the
user ID accordingly. If the attribute is not in the session, then NULL will be returned, and JReport will not
qualify the request. When NULL is returned, another method handleUnAuthenticatedRequst() is called. In
this sample, the method handleUnAuthenticatedRequst() returns a different website, and false is returned
to prevent the login dialog to be displayed.
Once the user ID is returned by the External Authorized instance, it will be passed to the Authentication
Provider via RMI methods to the remote JReport Enterprise Server instance to check if the User ID is valid
or not. Here is the way this authenticator provider interface has been implemented:
public class DemoAuthenticationProvider implements AuthenticationProvider {
public boolean isValidUser(String realmName, String userName, String password)
{
return true;
}
public boolean isAdminUser(String realmName, String userName)
{
if (userName.equals("admin"))
{
return true;
}
return false;
}
public String changePassword
(String realmName, String implUserName, String userName, String oldPwd, String newPwd)
{
return null;
}
}
The above implementation assumes that every user ID is valid, and only the user "admin" is the valid
admin user. It works without security problems since the customer's end user will not be able to connect
to the stand-alone server directly.
Building a WAR/EAR file to include a self-contained JReport
Enterprise Server
There are two ways of creating a WAR or EAR to include a self-contained JReport Enterprise Server:
●
●
Create a WAR/EAR file using the provided tool makewar.bat/makewar.sh after you have installed a
JReport Enterprise Server. If you are not familiar with JReport Enterprise Server, it is better to use
this way.
Create a WAR manually. The method is no longer needed but is still available in this release in case
you would like to take it.
The self-contained JReport Enterprise Server is based on a library. The library contains all class
packages required by the JReport Enterprise Server runtime, such as jrenv.jar, JRESServlets.jar,
JREngine.jar, and JRWebDesign.jar. In the library, jrenv.jar contains the entire JReport runtime
environment, and is the key to the self-contained integration solution. With the self-contained solution,
you do not have to specify the JReport Enterprise Server installation root as the reporthome.
When you create a JReport Enterprise Server WAR/EAR file using the provided tool, the jrenv.jar
package will be automatically put into the WAR/EAR, and will be extracted to the specified reporthome
when initializing JReport Enterprise Server.
The following is the structure of the jrenv.jar package:
jrenv.jar
workspace/ -- This is the root folder.
bin/ -- This folder contains the license file jslc.dat and configuration files, such as
LogConfig.properties and redirect.properties.
lib/ -- This folder contains jar files needed by applets, such as view12.jar and chart.jar.
template/ -- This folder contains template files.
profiling/report/ -- This folder contains profiling report set files.
jreports/ -- This folder contains demo report sets or pre-published report sets.
db/ -- This folder contains demo database for demo report sets.
help/ -- This folder contains help documents.
The bin/, lib/, and template/ folders are necessary for the JReport runtime, while the profiling/,
jreports/, db/ and help/ folders are optional.
Note: There is a parameter in self-contained WAR/EAR - autoDetectServletPath. It is used to
dynamically detect and modify servlet path based on context path of self-contained WAR/EAR when
deploying the WAR/EAR to a J2EE application server. This property is enabled by default, and the actual
servlet path will be concatenating "context path" with "default servlet path" set in server.properties. If
you do not want this way, you can disable the feature using either of the following ways:
●
Before making your WAR/EAR, set the parameter autoDetectServletPath to false in makewar.xml
which is located in <install_root>\bin.
●
If the WAR/EAR has already been built, go to web.xml, set this parameter autoDetectServletPath to
false.
The following are topics covered in the section:
●
Building a JReport Enterprise Server WAR/EAR by tool
●
Building a JReport Enterprise Server WAR manually (deprecated)
●
Four ways of integrating JReport Enterprise Server
Building a JReport Enterprise Server WAR/EAR by tool
A tool based on the Apache Ant project is provided by JReport Enterprise Server to build JReport
Enterprise Server WAR/EAR files which contain the full JReport Enterprise Server runtime environment.
The WAR/EAR files can be deployed to any Java EE compliant application server without having to
specify a JReport Enterprise Server installation root as the reporthome.
You can use the default settings to generate a JReport Enterprise Server WAR/EAR, or you can
customize the reporthome and data source for JReport Enterprise Server before generating the WAR/
EAR using the provided tool.
●
Creating a JReport Enterprise Server WAR/EAR
●
Specifying reporthome for JReport Enterprise Server in a Java EE environment
●
Specifying a data source for JReport Enterprise Server in a Java EE environment
Creating a JReport Enterprise Server WAR/EAR
JReport Enterprise Server provides a tool for building a WAR or EAR file. The tool is makewar.bat/
makewar.sh, and makewar.xml in <install_root>\bin.
makewar.xml
This file can be used to specify the following:
●
Tasks specified to build the WAR/EAR file. The task name starts with the tag <target name="xxx"...
>. You can modify the task names. By default, the main tasks in the makewar.xml are as follows:
❍
Making the server runtime environment
❍
Making the WAR file
❍
Making the EAR file
Temp directories.
●
❍
❍
●
The temp directory used to save the temp files when building the WAR/EAR. By default, it is
<install_root>\bin\distribute\temp.
The directory which is used to store the generated WAR/EAR file. By default, it is <install_root>
\bin\distribute.
The deployment descriptors, such as web.xml and application.xml. The configuration information,
such as the database connection information for the WAR/EAR file is stored in these files.
makewar.bat/makewar.sh
The batch/script file used to build a JReport Enterprise Server WAR/EAR according to the task specified
in makewar.xml.
Usage
makewar.bat/makewar.sh [-Dpredeploy=ReportFolder] [Task Name]
Options
●
●
-Dpredeploy=ReportFolder: Allows you to deploy the report sets and catalogs under ReportFolder
to the WAR/EAR file.
Task Name: Specifies whether to build the JReport Enterprise Server WAR or EAR. It can be
buildWar or buildEar.
Examples
●
Builds the JReport Enterprise Server WAR file which is defined by makewar.xml (the default task).
The generated WAR file is saved to the default directory <install_root>\bin\distribute.
makewar.bat
●
Builds the JReport Enterprise Server WAR file, and saves the generated WAR file jreport.war to the
default directory <install_root>\bin\distribute.
makewar.bat buildWar
●
Builds the JReport Enterprise Server EAR file, and saves the generated EAR file jreport.ear to the
default directory <install_root>\bin\distribute.
makewar.bat buildEar
●
Builds the JReport Enterprise Server EAR file, and deploys the report sets and catalogs in C:
\myReport to the WAR file. The generated WAR file jreport.war will be saved in the default directory
<install_root>\bin\distribute.
makewar.bat -Dpredeploy=c:\myReport buildWar
Specifying reporthome for JReport Enterprise Server in a Java EE environment
JReport Enterprise Server requires a reporthome as its working space to hold the entire JReport
runtime environment, including the server properties, configuration files and resources. The package
jrenv.jar that contains the entire JReport runtime environment will be extracted to the specified
reporthome when initializing JReport Enterprise Server. The reporthome can be any location on the disk
where JReport Enterprise Server has read and write privileges.
You do not have to specify a reporthome for JReport Enterprise Server since it will create a default
reporthome location <user.home>/.jreport/default.
However, JReport Enterprise Server enables you to customize the reporthome location before creating
the JReport Enterprise Server WAR/EAR using the provided tool. You can either specify reporthome
directly or specify the implementation of the jet.server.api.http.CustomizedServerEnv interface.
Note: Make sure that the reporthome for the integrated JReport Enterprise Server is different from that
of the standalone JReport Server.
Interface CustomizedServerEnv
The jet.server.api.http.CustomizedServerEnv interface can be used for specifying the JReport
Enterprise Server reporthome and for setting the server properties in a Java EE environment. It
contains two methods:
●
String getReportHome()
●
Properties getServerProperties()
If you specify the implementation of this interface, JReport Enterprise Server will obtain not only
reporthome but also server properties.
Three ways of specifying reporthome
There are three ways of specifying reporthome directly or the implementation of the jet.server.api.http.
CustomizedServerEnv interface:
●
By JVM -D parameter.
Set the JVM option -Dreporthome before starting the application server, for example:
-Dreporthome=/home/jreport
●
Invoking the method jet.server.api.http.HttpUtil.initEnv(Properties props).
For example:
Properties props = new Properties();
props.setProperty("reporthome", "/home/test/JReport");
HttpUti.initEnv(props);
●
Using ejb-jar.xml/web.xml.
The following introduces several methods of specifying reporthome or implementation of
CustomizedServerEnv:
●
Using the default reporthome
●
Specifying reporthome directly in web.xml or ejb-jar.xml
●
Using the default implementations of jet.server.api.http.CustomizedServerEnv
●
Using a customized implementation of jet.server.api.http.CustomizedServerEnv
Using the default reporthome
If you do not specify a reporthome, the self-contained JReport Enterprise Server will create a default
working folder. The default working folder is <user.home>/.jreport/default, where <user.home> is the
system property user.home retrieved from Java VM. The JReport Enterprise Server has the Read and
Write privileges in this directory. Different OSs have different real paths for <user.home>. For example,
For Windows: C:\Documents and Settings\username
For UNIX/Linux: /home/username
Notes:
●
●
●
user.home is a system property of the Java VM (-Duser.home=xxx). So you can also specify different
folders for this JVM option.
If JReport Enterprise Server is running on Windows as a service, the username is the user who
installed the service or the specified logon user for the service.
If JReport Enterprise Server is running as a UNIX/Linux Daemon, you can specify the JVM system
property -Duser.home in the script file that starts JReport Enterprise Server.
Specifying reporthome directly in web.xml or ejb-jar.xml
It is recommended that you use the <env-entry></env-entry> tags to specify the reporthome directly
in the target "web.xml" in the makewar.xml file or in ejb-jar.xml. Also, in the target "web.xml", you
can specify the reporthome using the <context-param></context-param> tags.
Specifying the reporthome for WAR
You can use one of the two methods listed below to specify the reporthome for WAR:
●
In the makewar.xml file, use the <env-entry></env-entry> tags to specify the reporthome in the
target "web.xml", for example:
<env-entry>
<env-entry-name>jreport.rpthome</env-entry-name>
<env-entry-value>/home/jreport</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
This is the recommended way to set reporthome since the <env-entry></env-entry> tags are also
supported in ejb-jar.xml (if you call the server API in your EJB).
●
In the makewar.xml file, use the <context-param></context-param> tags to specify the
reporthome in the target "web.xml", for example:
<context-param>
<param-name>reporthome</param-name>
<param-value>/home/jreport</param-value>
</context-param>
Note: This method can only be supported in web.xml using a web application (WAR).
Specifying the reporthome for EAR
The same methods can be used to specify the reporthome of building the EAR file as of building the
WAR file. However, because you can wrap WAR and EJB in the EAR file, you should ensure that you put
the reporthome information either in the target web.xml in the makewar.xml file (for the web module)
or in ejb-jar.xml (for the EJB module).
In ejb-jar.xml, use the <env-entry></env-entry> tags to specify the reporthome. For example,
<env-entry>
<env-entry-name>jreport.rpthome</env-entry-name>
<env-entry-value>/home/jreport</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
Using the default implementations of jet.server.api.http.CustomizedServerEnv
The self-contained JReport Enterprise Server provides two implementations of CustomizedServerEnv.
They are jet.server.DefaultServerEnv and jet.server.MultipleInstanceServerEnv.
jet.server.DefaultServerEnv
If you use this implementation, you will not need to specify it in the target "web.xml" in the makewar.
xml or in ejb-jar.xml, since it can find the customized reporthome from the <context-param></
context-param> tags of the target "web.xml" or the <env-entry></env-entry> tags of web.xml or ejbjar.xml.
jet.server.MultipleInstanceServerEnv
This implementation is extended from DefaultServerEnv. It enables finding the reporthome not only
from <context-param></context-param> or <env-entry></env-entry> tags, but also from an
external file <user.home>/.jreportrc. However, this implementation has three main limitations. They
are:
●
●
This implementation must be clearly specified with the <env-entry></env-entry> tags in the target
"web.xml" in the makewar.xml or in ejb-jar.xml, as follows:
<env-entry>
<env-entry-name>jreport.servenv</env-entry-name>
<env-entry-value>jet.server.MultipleInstanceServerEnv</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
The JReport Enterprise Server must be initialized with JRServerContextListener from a Web module.
Since in cases of deploying multiple JReport Enterprise Server instances in one Java EE application
server without touching the WAR, such as extracting the WAR, setting reporthome and rebuilding the
WAR, JReport Enterprise Server has to use ServletContext to generate an ID for every instance.
JReport Enterprise Server retrieves javax.servlet.context.tempdir from ServletContext by invoking
the getAttribute(String) method, and then uses this value to generate the instance ID.
For detailed information, see Java Servlet Specification Version 2.3/2.4 SRV.3.7.1 Temporary
Working Directories.
●
The <user.home>/.jreportrc file must be created by JReport Enterprise Server. You can only edit the
file to change the reporthome after the JReport Enterprise Server initialization.
Since the instance ID is generated based on a hash code retrieved from javax.servlet.context.
tempdir, it cannot be pre-assigned, and is therefore impossible for you to create the <user.home>/.
jreportrc file. However, once the file has been created, you can edit it to change the reporthome for
each instance. The RC file can hold multiple records. The record format should be as follows:
jreport.rpthome.<instanceID>=the-instance-report-home
The instanceID is created by JReport Enterprise Server during its first initializing. It is a string of HEX
encoded hash value. For example:
jreport.rpthome.12345678=/home/user1/.jreport/instance.12345678
jreport.rpthome.12345abc=/home/user1/.jreport/instance.12345abc
If JReport Enterprise Server cannot get the reporthome from CustomizedServerEnv, it will create a
default reporthome in <user.home>/.jreport/default.
The following is an example of specifying reporthomes when deploying multiple server instances using
jet.server.MultipleInstanceServerEnv:
Example: Specifying reporthomes when deploying multiple server instances
JReport Enterprise Server provides an internally implemented class of the jet.server.api.http.
CustomizedServerEnv interface - jet.server.MultipleInstanceServerEnv which supports multiple JReport
Enterprise Server instances in one Java EE application server. The reporthome of each instance can be
assigned by the class automatically. To do this, follow the steps below:
1. In the file makewar.xml, use the <env-entry></env-entry> tags to specify jet.server.
MultipleInstanceServerEnv in the target "web.xml". For example:
<env-entry>
<env-entry-name>jreport.servenv</env-entry-name>
<env-entry-value>jet.server.MultipleInstanceServerEnv</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
2. Since different JReport instances cannot access the same JReport Enterprise Server system
database at the same time, you will need to create a dbconfig.xml file to store the connection
information, and put it in jrenv.jar in workspace\bin (you can find the jrenv.jar file after
extracting jreport.war) for each JReport Enterprise Server WAR/EAR.
For detailed information about modifying the dbconfig.xml, see Configuring the server database.
3. When the JReport Enterprise Server WAR/EAR has been deployed, JReport will create a file .
jreportrc in <user.home>, and each JReport instance will read its reporthome from this file. This
file must be created by JReport Enterprise Server, however, you can edit it in order to change the
reporthome after it has been created.
Using a customized implementation of jet.server.api.http.CustomizedServerEnv
You can implement the interface and add your class to the generated WAR/EAR file, then use the <enventry></env-entry> tags to specify your implemented class in the target "web.xml" in the makewar.
xml file or in ejb-jar.xml.
The following is an example of specifying a customized implementation of CustomizedServerEnv in the
target web.xml in the makewar.xml file or in ejb-jar.xml using the <env-entry></env-entry> tags.
Here the customized implementation of CustomizedServerEnv is named my.JReportServerEnv.
<!-- JReport Enterprise Server calls my.JReportServerEnv to obtain reporthome
and server properties.-->
<env-entry>
<env-entry-name>jreport.servenv</env-entry-name> <!-- must be jreport.servenv-->
<env-entry-value>my.JReportServerEnv</env-entry-value> <!-- your class name -->
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
Notes:
●
●
JReport Enterprise Server will retrieve the reporthome and properties from your implemented class
when the WAR/EAR file has been deployed.
The properties returned from getServerProperties() can be the properties listed in server.properties
file in the directory <install_root>\bin, JVM System properties, or self-defined ones.
Specifying a data source for JReport Enterprise Server in a Java EE environment
See Configuring the server database when integrating with an application server for detailed
information.
Building a JReport Enterprise Server WAR manually (deprecated)
This section introduces a method that has been used in earlier versions. If using this method, you will have to
specify the JReport Enterprise Server installation root as the reporthome unless you make the WAR be a selfcontained solution.
This section takes creating a WAR file on UNIX for example. The instruction is applicable to both UNIX and
Windows platforms. However, the paths for Windows should use the Windows format, for example, C:\JReport
\Server, while paths for UNIX should use the UNIX format, for example, /opt/JReport/Server.
It is assumed that JReport Enterprise Server has been installed to /opt/JReport/Server.
Take the following steps to build a JReport Enterprise Server WAR manually:
1. Create a new directory jreport in the JReport Enterprise Server installation root: /opt/JReport/Server/
jreport.
2. Create a sub directory WEB-INF in jreport: /opt/JReport/Server/jreport/WEB-INF.
3. Create a web.xml file in the WEB-INF directory as follows:
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>jet.server.servlets.JRServerContextListener</listener-class>
</listener>
<servlet>
<servlet-name>jrserver</servlet-name>
<servlet-class>jet.server.servlets.JRServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>sendfile</servlet-name>
<servlet-class>jet.server.servlets.SendFileServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>dhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLlet</servlet-class>
</servlet>
<servlet>
<servlet-name>help</servlet-name>
<servlet-class>jet.web.dhtml.JHelplet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>jrserver</servlet-name>
<url-pattern>/jrserver/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>sendfile</servlet-name>
<url-pattern>/sendfile/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>dhtml</servlet-name>
<url-pattern>/dhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>help</servlet-name>
<url-pattern>/help/*</url-pattern>
</servlet-mapping>
</web-app>
4. Create a directory lib in the jreport/WEB-INF directory:
mkdir lib
5. Create a directory pages in the jreport/WEB-INF/lib directory:
mkdir lib/pages
6. Copy all of the files in /opt/JReport/Server/lib/pages to the jreport/WEB-INF/lib/pages directory:
cp /opt/JReport/Server/lib/pages/* lib/pages
7. Create a jar file to include the resources folder which is located in /opt/JReport/Server and name it
languages.jar. For example, run the following command:
jar -cvf languages.jar resources
Then put the languages.jar in /opt/JReport/Server/lib.
8. Copy the following jar files from /opt/JReport/Server/lib to the jreport/WEB-INF/lib directory:
commons-codec-1.2.jar, hsqldb.jar, jai_codec.jar, jai_core.jar, JREngine.jar, JRESServlets.jar, JRWebDesign.
jar, languages.jar, log4j-1.2.8.jar, sac.jar, tar.jar, xercesImpl.jar, xml-apis.jar.
If you want to export reports to the following formats, you should copy the corresponding jar to the
jreport/WEB-INF/lib directory:
❍
To e-mail or use the e-mail Notification function, copy activation-1.1.jar and mail-1.4.jar.
❍
To FTP, copy commons-net-ftp-2.0.0.jar.
❍
To PDF and DHTML, copy itext.jar.
❍
To Excel, copy poiHSSF_151.jar.
9. Copy the index.htm file and the admin, dhtmljsp, images, javascript, jinfonet, skin, and style folders from /
opt/JReport/Server/public_html to the /opt/JReport/Server/jreport directory:
cp -r /opt/JReport/Server/public_html/* /opt/JReport/Server/jreport
Notes:
❍
❍
The jsp files within the admin folder are used by the JReport Administration pages. Those within the
dhtmljsp folder are used when viewing reports in the DHTML format.
If you copy index.htm and these folders mentioned above to a sub folder in /opt/JReport/Server/
jreport, for example, /opt/JReport/Server/jreport/sub, to view reports in DHTML format, you need:
■
Modify the server.properties file:
web.skin.dir=/jreport/sub/skin
■
Uncomment the following lines in dhtml.jsp in the dhtmljsp folder and make it adapt to the environment
as follows:
dhtmlConfig.setDHTMLContextPath(SessionID,"http://localhost:8080/jreport/sub");
dhtmlConfig.setDHTMLJspUrl(SessionID,"/jreport/sub/dhtmljsp/");
dhtmlConfig.setDHTMLServletUrl(SessionID, RptSetId, "/jreport/dhtml");
■
In the step 10, edit the index.htm file like this:
<FRAME name="ind" src="/jreport/sub/jinfonet/index.jsp" frameborder="0">
Then go to step 11.
10. Edit the index.htm file and add the context path /jreport to the src tag. Note that the path separator
character is the Unix style "/" when referencing JSP. The result should be as follows:
<FRAME name="ind" src="/jreport/jinfonet/index.jsp" frameborder="0">
11. Using the following command to create a WAR file named jreport.war:
jar -cvf jreport.war index.htm admin dhtmljsp images javascript jinfonet skin style WEB-INF
Note: The jar utility is in the Java home bin directory. If it is not on your path you must call jar with the
entire path, for example, /opt/j2sdk1.4.2_07/bin/jar.exe.
To make the WAR be a self-contained solution
To make the WAR include a self-contained JReport Enterprise Server, except for the above procedure, you need
create jrenv.jar and then put it in the jreport/WEB-INF/lib directory before creating the WAR.
Use either way to create the jrenv.jar:
●
●
By the makewar.bat/makewar.sh tool
For example: run the command makewar jrenv.jar
Creating manually
Make sure all necessary contents are included and then use a proper tool to package them into a jar file.
See also Building a WAR/EAR file to include a self-contained JReport Enterprise Server for details about the
structure of the jrenv.jar.
Four ways of integrating JReport Enterprise Server
You can either create a JReport Enterprise Server WAR/EAR, or create your WAR/EAR and embed a selfcontained JReport Enterprise Server inside it. The following are four ways of building a WAR/EAR file in
order to include a self-contained JReport Enterprise Server:
●
Integrating by building a JReport Enterprise Server WAR
●
Integrating by building a JReport Enterprise Server EAR
●
Integrating by building a user WAR and embedding a self-contained JReport Enterprise Server
●
Integrating by building a user EAR and embedding a self-contained JReport Enterprise Server
Integrating by building a JReport Enterprise Server WAR
The self-contained JReport Enterprise Server can be deployed as a single WAR file. After specifying the
reporthome and configuring the database information, you can build the WAR file using the tool makewar.
bat/makewar.sh in <install_root>\bin. To generate the WAR file, execute the command with the buildWar
parameter. For example:
makewar.bat/makewar.sh buildWar
Structure of the JReport Enterprise Server WAR
For example, here you can create a JReport Enterprise Server WAR file named jreport.war. The structure of
the JReport Enterprise Server WAR is as below:
jreport.war
WEB-INF/
web.xml
lib/ -- This folder contains all resources in the JReport Enterprise Server library.
admin/ -- This folder contains JSP files for the JReport Administration page.
jinfonet/ -- This folder contains JSP files for the JReport Console page.
dhtmljsp/ --This folder contains JSP files for viewing DHTML reports.
WEB-INF/web.xml
The following is the default content in the web.xml file of the JReport Enterprise Server WAR:
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>jet.server.servlets.JRServerContextListener</listener-class>
</listener>
<servlet>
<servlet-name>jrserver</servlet-name>
<servlet-class>jet.server.servlets.JRServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>sendfile</servlet-name>
<servlet-class>jet.server.servlets.SendFileServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>dhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLlet</servlet-class>
</servlet>
<servlet>
<servlet-name>help</servlet-name>
<servlet-class>jet.web.dhtml.JHelplet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>jrserver</servlet-name>
<url-pattern>/jrserver/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>sendfile</servlet-name>
<url-pattern>/sendfile/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>dhtml</servlet-name>
<url-pattern>/dhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>help</servlet-name>
<url-pattern>/help/*</url-pattern>
</servlet-mapping>
</web-app>
Integrating by building a JReport Enterprise Server EAR
The self-contained JReport Enterprise Server can be deployed as a single EAR file. After specifying the
reporthome and configuring the database information, you can build the EAR file using the tool
makewar.bat/makewar.sh in <install_root>\bin. To generate the EAR file, execute the command
with the buildEar parameter, for example:
makewar.bat/makewar.sh buildEar
Structure of the JReport Enterprise Server EAR
For example, here you can create a JReport Enterprise Server EAR file named jreport.ear. The structure
of the JReport Enterprise Server EAR is as below:
jreport.ear
META-INF/application.xml
jreport-lib/ -- This folder contains all resources in the JReport Enterprise Server library.
jreport.war
META-INF/MANIFEST.MF
WEB-INF/web.xml
admin/
jinfonet/
dhtmljsp/
META-INF/application.xml
Following the Java EE standard, you should configure the META-INF/application.xml file before
deploying the EAR:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>Self-contained JReport Enterprise Server</display-name>
<module id="JReportWebModule">
<web>
<web-uri>jreport.war</web-uri>
<context-root>jreport</context-root>
</web>
</module>
</application>
META-INF/MANIFEST.MF of Web module
Since the JReport Enterprise Server library is included in jreport-lib of the EAR layer, you must specify
Class-Path in the META-INF/MANIFEST.MF file. The contents below should be included in the MANIFEST.
MF file:
Class-Path: jreport-lib/jrenv.jar jreport-lib/JRESServlets.jar jreport-lib/JREngine.
jar ...
Class-Path is a list of all packages in the JReport Enterprise Server library. Each package name should
start with the prefix jreport-lib/, and you should use a blank space to separate package names.
WEB-INF/web.xml of Web module
The contents in the web.xml of the JReport Enterprise Server EAR are the same as the contents in web.
xml of the JReport Enterprise Server WAR. See the section Integrating by building a JReport Enterprise
Server WAR for details.
Integrating by building a user WAR and embedding a self-contained JReport Enterprise
Server
You can embed a self-contained JReport Enterprise Server into your WAR.
Structure of the user WAR
For example, here you can create a WAR named MyApp.war, and then embed a self-contained JReport
Enterprise Server inside it. The structure of your WAR may be as follows:
MyApp.war
WEB-INF/
web.xml
lib/ -- This folder contains all resources in the JReport Enterprise Server library and your
other jar files.
classes/ -- This folder contains your servlet classes.
../../asset/images/
jsp/
If you put the JReport WAR related JSPs to a sub folder, for example, jreport, and this time the
structure of your WAR may be as follows:
MyApp.war
WEB-INF/
web.xml
lib/ -- This folder contains all resources in the JReport Enterprise Server library and your
other jar files.
classes/ -- This folder contains your servlet classes.
../../asset/images/
jreport/
admin/
dhtmljsp/
jinfonet/
...
To run JReport reports, you must do the following configurations:
●
Add the following entry into web.xml:
<context-param>
<param-name>autoDetectServletPath</param-name>
<param-value>false</param-value>
</context-param>
WEB-INF/web.xml in the user WAR
You should add listener into the web.xml as follows:
<listener>
<listener-class>jet.server.servlets.JRServerContextListener</listener-class>
</listener>
Integrating by building a user EAR and embedding a self-contained JReport Enterprise
Server
You can embed a self-contained JReport Enterprise Server into your EAR in order to use JReport
Enterprise Server from EJB.
Structure of the user EAR
For example, here you can create an EAR named MyApp.ear and then embed a self-contained JReport
Enterprise Server inside it. In the EAR, there is an EJB module used for initializing JReport Enterprise
Server. The structure of your EAR may be as follows:
MyEAR.ear
META-INF/application.xml
jreport-lib/ -- This folder contains all resources in the JReport Enterprise Server library
MyEjb.jar
META-INF/
MANIFEST.MF
ejb-jar.xml
com/
META-INF/application.xml
Following the Java EE standard, you should configure the META-INF/application.xml file before
deploying your EAR:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>EJB with Embedded JReport Enterprise Server</display-name>
<module id="MyEJBModule">
<ejb>MyEjb.jar</ejb>
</module>
</application>
META-INF/MANIFEST.MF of EJB module
Since the JReport Enterprise Server library is included in the jreport-lib folder of the EAR layer, you
must specify Class-Path in the META-INF/MANIFEST.MF file. The contents below should be included in
the MANIFEST.MF file:
Class-Path: jreport-lib/jrenv.jar jreport-lib/JRESServlets.jar jreport-lib/JREngine.
jar ...
Class-Path is a list of all packages in the JReport Enterprise Server library. Each package name should
start with the prefix jreport-lib/, and you should use a blank space to separate package names.
META-INF/ejb-jar.xml
If you do not want to set the reporthome for the embedded self-contained JReport Enterprise Server,
but instead want to use JReport's default settings, there is no requirement for configuring the ejb-jar.
xml. However, if you want to control the reporthome of the JReport Enterprise Server, or specify a JNDI
data source for JReport Enterprise Server to use, you should first configure the ejb-jar.xml file using
the <env-entry></env-entry> tags.
Here is an example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar id="ejb-jar_ID">
<display-name>MyEJB</display-name>
<enterprise-beans>
<session id="JReportEJB">
<ejb-name>JRptServer</ejb-name>
<home>demo.JRptServerHome</home>
<remote>demo.JRptServer</remote>
<ejb-class>demo.JRptServerBean</ejb-class>
<session-type>Stateless</session-type>
<!-- Specify JReport reporthome directly
<env-entry>
<env-entry-name>jreport.rpthome</env-entry-name>
<env-entry-value>/home/jreport</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
-->
<!-- JReport callback my CustomizedServerEnv -->
<env-entry>
<env-entry-name>jreport.servenv</env-entry-name>
<env-entry-value>demo.JReportServerEnv</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
Deploying JReport Enterprise Server to a Java application
server
After you have created a WAR/EAR file that includes a self-contained JReport Enterprise Server, you
can deploy the WAR/EAR to an application server following the deploying instructions of the application
server.
This section provides examples of deploying JReport Enterprise Server to several leading Java EE
application servers. The instructions are applicable to both UNIX and Windows platforms. However, the
paths for Windows should use the Windows format, for example, C:\JReport\Server, while paths for
UNIX should use the UNIX format, for example, /opt/JReport/Server.
Before going on to the next sections, you should already have reviewed Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
The following examples are based on the UNIX platform:
●
Deploying to IBM WebSphere 5.1
●
Deploying to IBM WebSphere 6
●
Deploying to WebLogic 8.1
●
Deploying to WebLogic 10
●
Deploying to Tomcat 4.1
●
Deploying to Tomcat 5.5
●
Deploying to JBoss 3.2
●
Deploying to JBoss 4.0
●
Deploying to OC4J 10g
●
Deploying to Sun ONE Application Server 7
●
Deploying to GlassFish V2 b58g
Note: It is supported if you change the location of the two folders skin and dhtmljsp in the
\public_html directory in the application server side. What is need is create a file jrserver.properties in
the \WEB-INF directory and then add the following two properties and provide the correct paths (the
context root is excluded):
web.skin.dir
web.dhtml_jsp_path
Deploying to IBM WebSphere 5.1
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
WebSphere 5.1 is installed in the /opt/IBM/WebSphere/AppServer directory.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file, refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to IBM WebSphere 5.1:
1. Start IBM WebSphere 5. Use the shell script /opt/IBM/WebSphere/AppServer/bin/startServer.
sh <servername> to start the server. The default server name is server1.
2. Open the Administrative Console in your web browser. Open the URL: http://hostname:9090/
admin/, where the hostname is host name or IP address, and 9090 is the port number. The 9090
port is the default for UNIX installations although it may be different on your installation.
3. To login, create a User ID that contains only letters and numbers. It can be any ID that you want
use to identify your changes such as admin.
4. After successfully logging in, expand the Applications node, and then click Install New
Application.
5. Click Browse to select your WAR file. Then in the Context Root field, type a context path such as /
jreport/. Then click Next.
6. Do not check any option on this page. Click Next.
7. Do not be concerned about the security options warning. Click Continue.
8. Type JREntServer in the Application Name field. Leave the Pre-compile JSP option unchecked.
Then click Next.
9. Do not make any changes to the next two pages.
10. In the Summary page, click Finish to complete the wizard. The installing process may take
several minutes. Wait until the process has completed.
11. After the installation process has successfully completed, in the pop-up dialog, click the Save to
Master Configuration link.
12. Click Save.
13. Access JReport Enterprise Server using the following URLs:
http://<hostname>:9080/jreport/jrserver
http://<hostname>:9080/jreport/admin/index.jsp
http://<hostname>:9080/jreport/jinfonet/index.jsp
Troubleshooting
If you run into problems when using JReport Enterprise Server in IBM WebSphere, send the log files of
JReport Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate
the log files:
1. Type -Dlogall=true in the Generic JVM arguments field. Go to Application servers > server1 >
Process Definition > Java Virtual Machine to access this field.
2. Restart the application server, and then try to reproduce the problem. After reproducing the
problem, send support@jinfonet.com the log files in reporthome/logs.
The WebSphere log files may also help to identify the problem. The most useful one is in /opt/
IBM/WebSphere/AppServer/logs/server1/SystemErr.log.
Deploying to IBM WebSphere 6
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
WebSphere 6 is installed in the /opt/IBM/WebSphere6/AppServer directory.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file, refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to IBM WebSphere 6:
1. Start IBM WebSphere 6. Use the shell script /opt/IBM/WebSphere6/AppServer6/bin/
startServer.sh <servername> to start the server. The default server name is server1.
2. Open the Administrative Console in your web browser. Open the URL: http://hostname:9060/
admin/, where the hostname is host name or IP address, and 9060 is the port number. The 9060
port is the default for UNIX installations although it may be different on your installation.
3. To login, create a User ID that contains only letters and numbers. It can be any ID that you want
use to identify your changes such as admin.
4. After successfully logging in, expand the Applications node, and then click Install New
Application.
5. Click Browse to select your WAR file. Then in the Context Root field, type a context path such as /
jreport/. And then click Next.
6. Do not check any option on this page. Click Next.
7. Do not be concerned about the security options warning. Click Continue.
8. Type JREntServer in the Application Name field. Leave the Pre-compile JSP option unchecked.
Then click Next.
9. Do not make any changes to the next two pages.
10. In the Summary page, click Finish to complete the wizard. The installing process may take
several minutes. Wait until the process has completed.
11. After the installation process has successfully completed, in the pop-up dialog, click the Save to
Master Configuration link.
12. Click Save.
13. Access JReport Enterprise Server using the following URLs:
http://<hostname>:9080/jreport/jrserver
http://<hostname>:9080/jreport/admin/index.jsp
http://<hostname>:9080/jreport/jinfonet/index.jsp
Troubleshooting
If you run into problems when using JReport Enterprise Server in IBM WebSphere, send the log files of
JReport Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate
the log files:
1. Type -Dlogall=true in the Generic JVM arguments field. Go to Application servers > server1 >
Process Definition > Java Virtual Machine to access this field.
2. Restart the application server, and try to reproduce the problem. After reproducing the problem,
send support@jinfonet.com the log files in reporthome/logs.
The WebSphere log files may also help to identify the problem. The most useful one is in /opt/
IBM/WebSphere6/AppServer/logs/server1/SystemErr.log.
Deploying to WebLogic 8.1
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
WebLogic 8.1 is installed in the /opt/BEA directory. This is referred to as BEA_HOME in the
WebLogic documentation.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to BEA WebLogic 8.1:
1. If you have not already created a WebLogic Domain for JReport Enterprise Server you must create
one before starting the integration.
2. Start WebLogic by executing the script /startWebLogic.sh. You will be prompted for the login
and password you created such as Username weblogic and Password weblogic. You should see a
message that the server started in RUNNING mode and that it is listening on port 7001.
3. Open the Administrative Console in your web browser. Open the URL: http://hostname:7001/
console/, where the hostname is host name or IP address, and 7001 is the port number. The
7001 port is the default although it may be different on your installation. The port number was
specified when you created your WebLogic domain.
To login, use a user with the Administrator role. If you didn't change the default for the domain it
is Username weblogic and Password weblogic.
4. After successfully logging in, expand the Deployments node, and then select Web Application
Modules.
5. Click the Deploy a new Web Application Module link.
6. Select the upload your file(s) link.
7. Click Browse to select your WAR file. Then click the Upload button.
8. Select the checkbox on jreport.war, and then click the Target Module button.
9. The Identity Name is the JReport Servlet Context. By default it is the name of the WAR file. The
remaining instructions assume that you do not modify this. Select Deploy to complete the
deployment.
10. Once the status says Success you are ready to test your deployment. You can do this simply by
selecting the Testing tab.
11. Select the link for jreport, and then a new web browser window will be launched with JReport
Enterprise Server.
12. Access JReport Enterprise Server using the following URLs:
http://<hostname>:7001/jreport/jrserver
http://<hostname>:7001/jreport/admin/index.jsp
http://<hostname>:7001/jreport/jinfonet/index.jsp
Troubleshooting
If you run into problems when using JReport Enterprise Server in BEA WebLogic, send the log files of
JReport Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate
the log files:
1. Add -Dlogall=true on the same line as -Dreporthome in the startWebLogic.sh shell script.
2. Restart the application server, and then try to reproduce the problem. After reproducing the
problem, send support@jinfonet.com the log files in reporthome/logs.
The WebLogic log file may also help to identify the problem. It is /opt/BEA/user_projects/
domains/reporting/reporting.log.
Deploying to WebLogic 10
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
WebLogic 10 is installed in the /opt/bea directory. This is referred to as BEA_HOME in the WebLogic
documentation.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to BEA WebLogic 10:
1. If you have not already created a WebLogic Domain for JReport Enterprise Server you must create
one before starting the integration.
2. Start WebLogic by running startWeblogic.sh in /opt/bea/wlserver_10.0/samples/domains/
domain_name(for example, wl_server)/bin.
3. Open the Administrative Console in your web browser. Open the URL http://hostname:7001/
console/, where the hostname is host name or IP address, and 7001 is the port number. The
7001 port is the default although it may be different on your installation. The port number was
specified when you created your WebLogic domain.
To login, use a user with the Administrator role. If you didn't change the default for the domain it
is Username weblogic and Password weblogic.
4. After successfully logging in, select the Deployments node in the Domain Structure panel on the
left of the console.
5. The Summary of Deployments page is displayed. You may find that the Install button and some
others in the Deployments table are not available for service. Click Lock & Edit in the Change
Center panel on the left to activate them. Then click Install.
6. On the Install Application Assistant page, click upload your file(s), browse to find jreport.war in /
opt/JReport/Server/bin/distribute. Click Next.
7. You will see that the Location shows jreport.war is uploaded to /opt/bea/wlserver_10.0/
samples/domains/domain_name/servers/examplesServer/upload. Select the checkbox before
the uploaded jreport.war and click Next.
8. Use the default name which is the WAR name as the deployment name and click Next.
9. Click Finish.
10. You can find jreport in the Deployments table, and its State shows "distribute Initializing". Click
Activate Changes in the Change Center panel and the State will then change to Prepared.
11. Select jreport, click Start and then select Servicing all requests.
12. Click Yes to start the deployment.
13. Access JReport Enterprise Server using the following URLs:
http://<hostname>:7001/jreport/jrserver
http://<hostname>:7001/jreport/admin/index.jsp
http://<hostname>:7001/jreport/jinfonet/index.jsp
Note that you will be asked to input user name and password for the defaultRealm (JReport
Enterprise Server) and for Weblogic before successfully logging in.
Troubleshooting
If you run into problems when using JReport Enterprise Server in BEA WebLogic, send the log files of
JReport Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate
the log files:
1. Add -Dlogall=true on the same line as -Dreporthome in the startWebLogic.sh shell script.
2. Restart the application server, and then try to reproduce the problem. After reproducing the
problem, send support@jinfonet.com the log files in reporthome/logs.
The WebLogic log file may also help to identify the problem. It is /opt/bea/wlserver_10.0/
samples/domains/domain_name/servers/examplesServer/logs.
Deploying to Tomcat 4.1
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
Tomcat 4.1 is installed in the /opt/jakarta-tomcat-4.1 directory.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to Tomcat 4.1:
1. Start Tomcat by running the startup.sh script.
2. Start a web browser session and then open the Tomcat default home page at http://
localhost:8080/index.jsp. If you are accessing the server remotely, replace localhost with the
appropriate host name for your server.
3. Select the Tomcat Manager link or use the URL http://localhost:8080/manager/html. You will
be challenged for user name and password to login. By default Tomcat does not have a manager
and administrator login defined. If you have not already done so, you must edit the /opt/jakartatomcat-4.1/conf/tomcat-users.xml file to add a user with admin and manager roles. The line
should look something like this <user username="admin" password="admin" roles="admin,
manager"/>. You can now use your new user to login into the manager's web page.
4. Using the Tomcat Web Application Manager, scroll down to the Install dialog, and then use the
Browse button to select the Web Application Archive file jreport.war.
5. Access JReport Enterprise Server using the following URLs:
http://localhost:8080/jreport/jrserver
http://localhost:8080/jreport/admin/index.jsp
http://localhost:8080/jreport/jinfonet/index.jsp
You can also access JReport by selecting the /jreport link on the Tomcat Manager web page.
Troubleshooting
If you run into problems when using JReport Enterprise Server in Tomcat, send the log files of JReport
Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate the log
files:
1. Modify the catalina.sh file in /opt/jakarta-tomcat-4.1/bin.
In the file catalina.sh, add -Dlogall=true after the reporthome definition:
"$JAVA" $JAVA_OPTS \
-classpath "$JBOSS_CLASSPATH" -Dreporthome=/opt/JReport/Server\
-Dlogall=true \
org.jboss.Main "$@"
2. After editing catalina.sh, start Tomcat using the startup.sh batch file.
3. To get the information about the JReport Enterprise Server environment, you can access http://
localhost:8080/jreport/admin/info.jsp?cmd=info.
4. Save the output to a file.
5. After reproducing the problem, send support@jinfonet.com the log files in reporthome/logs.
The Tomcat log files may also help to identify the problem. The most useful one is /opt/jakartatomcat-4.1/logs/catalina.out.
Deploying to Tomcat 5.5
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
Tomcat 5.5 is installed in the /opt/jakarta-tomcat-5.5 directory.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to Tomcat 5.5:
1. Start Tomcat by running the startup.sh script.
2. Start a web browser session and open the Tomcat default home page at http://localhost:8080/
index.jsp. If you are accessing the server remotely replace localhost with the appropriate host
name for your server.
3. Select the Tomcat Manager link or use the URL http://localhost:8080/manager/html. You will
be challenged for user name and password to login. By default Tomcat does not have a manager
and administrator login defined. If you have not already done so, you must edit the /opt/jakartatomcat-4.1/conf/tomcat-users.xml file to add a user with admin and manager roles. The line
should look something like this <user username="admin" password="admin" roles="admin,
manager"/>. You can now use your new user to login into the manager's web page.
4. Using the Tomcat Web Application Manager, scroll down to the Install dialog, and then use the
Browse button to select the Web Application Archive file jreport.war.
5. Access JReport Enterprise Server using the following URLs:
http://localhost:8080/jreport/jrserver
http://localhost:8080/jreport/admin/index.jsp
http://localhost:8080/jreport/jinfonet/index.jsp
You can also access JReport by selecting the /jreport link on the Tomcat Manager web page.
Troubleshooting
If you run into problems when using JReport Enterprise Server in Tomcat, send the log files of JReport
Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate the log
files:
1. Modify the catalina.sh file in /opt/jakarta-tomcat-5.5/bin.
In the file catalina.sh, add -Dlogall=true after the reporthome definition:
"$JAVA" $JAVA_OPTS \-classpath "$JBOSS_CLASSPATH"
-Dreporthome=/opt/JReport/Server\-Dlogall=true\
org.jboss.Main "$@"
2. After editing catalina.sh, start Tomcat using the startup.sh batch file.
3. To get the information about the JReport Enterprise Server environment, you can access http://
localhost:8080/jreport/admin/info.jsp?cmd=info.
4. Save the output to a file.
5. After reproducing the problem, send support@jinfonet.com the log files in reporthome/logs.
The Tomcat log files may also help to identify the problem. The most useful one is /opt/jakartatomcat-5.5/logs/catalina.out.
Deploying to JBoss 3.2
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
JBoss 3.2 is installed in the /opt/jboss-3.2.7 directory.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to JBoss 3.2:
1. Ensure that JBoss is shut down by running the script /opt/jboss-3.2.7/bin/shutdown.sh -S.
2. Copy the Web Application Archive file jreport.war to /opt/jboss-3.2.7/server/default/deploy.
3. Start JBoss by running the run.sh script.
4. Access JReport Enterprise Server using the following URLs:
http://localhost:8080/jreport/jrserver
http://localhost:8080/jreport/admin/index.jsp
http://localhost:8080/jreport/jinfonet/index.jsp
Troubleshooting
If you run into problems when using JReport Enterprise Server in JBoss, send the log files of JReport
Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate the log
files:
1. Modify the batch file run.sh in /opt/jboss-3.2.7/bin.
In the file run.sh, add -Dlogall=true after the reporthome definition:
"$JAVA" $JAVA_OPTS \
-classpath "$JBOSS_CLASSPATH" \ -Dreporthome=/opt/JReport/Server \
-Dlogall=true \
org.jboss.Main "$@"
2. After editing run.sh, start JBoss using the modified batch file.
3. After reproducing the problem, send support@jinfonet.com the log files in reporthome/logs.
The JBoss log files may also help to identify the problem. The most useful one is /opt/jboss3.2.7/server/default/log/server.log.
Deploying to JBoss 4.0
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that:
●
●
JBoss 4.0 is installed in the /opt/jboss-4.0.1 directory.
The JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/Server/bin/
distribute directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to
include a self-contained JReport Enterprise Server.
Note: If JBoss 4.0.2 or higher version is used, make sure that the file log4j-1.2.8.jar is not
included in the JReport Web Application Archive file jreport.war. It is because since JBoss 4.0.2,
log4j.jar in JBoss and log4j-1.2.8.jar in JReport Enterprise Server conflict with each other.
To deploy JReport Enterprise Server to JBoss 4.0:
1. Ensure that JBoss is shut down by running the script /opt/jboss—4.0.1/bin/shutdown.sh -S.
2. Copy the Web Application Archive jreport.war to /opt/jboss-4.0.1/server/default/deploy.
3. Start JBoss by running the run.sh script.
4. Access JReport Enterprise Server using the following URLs:
http://localhost:8080/jreport/jrserver
http://localhost:8080/jreport/admin/index.jsp
http://localhost:8080/jreport/jinfonet/index.jsp
Note: When integrating JReport Enterprise Server with Jboss based on Vista, in order to run the RSD
format, you need set Java home in the batch file that is used to start Jboss. For example, add the
following line in the run.bat file in C:\jboss-4.0.2\bin:
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0
Troubleshooting
If you run into problems when using JReport Enterprise Server in JBoss, send the log files of JReport
Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate the log
files:
1. Modify the batch file run.sh in /opt/jboss-4.0.1/bin.
In the file run.sh, add -Dlogall=true after the reporthome definition:
"$JAVA" $JAVA_OPTS \
-classpath "$JBOSS_CLASSPATH" -Dreporthome=/opt/JReport/Server \
-Dlogall=true \
org.jboss.Main "$@"
2. After editing run.sh, start JBoss using the modified batch file.
3. After reproducing the problem, send support@jinfonet.com the log files in reporthome/logs.
The JBoss log files may also help to identify the problem. The most useful one is /opt/jboss4.0.1/server/default/log/server.log.
Deploying to OC4J 10g
It is assumed that the JReport Enterprise Server WAR file jreport.war is located in the C:\JReport
\Server\bin\distribute directory. To create the WAR file refer to the instructions in Building a WAR/
EAR file to include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to OC4J 10g:
1. Start OC4J.
2. Create a new OC4J instance named JReport.
3. Select the instance and start it.
4. Click the Applications tab.
5. Deploy the jreport.war.
In the Deploy Web Application dialog, specify C:\JReport\Server\bin\distribute\jreport.war
in the Web Application field, type JREntServer in the Application Name field, and type a context
path such as /jreport in the Map to URL field. Then click Deploy.
6. Access JReport Enterprise Server using the following URLs:
http://localhost:port/jreport/jrserver
http://localhost:port/jreport/admin/jindex.jsp
http://localhost:port/jreport/jinfonet/index.jsp
Troubleshooting
If you run into problems when using JReport Enterprise Server in the Oracle oc4j Application Server,
send the log files of JReport Enterprise Server to support@jinfonet.com. The following procedure
illustrates how to generate the log files:
1. Type -Dlogall=true in the Java Options field. To access the field, select JReport instance, and
then click Administration tab > Server Properties > Java Options.
2. Restart OC4J, and then try to reproduce the problem.
3. After reproducing the problem, send support@jinfonet.com the log files in reporthome\logs.
Deploying to Sun ONE Application Server 7
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that the JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/
Server/bin/distribute directory. To create the WAR file refer to the instructions in Building a WAR/
EAR file to include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to Sun ONE Application Server 7:
1. Start the Sun ONE Application Server by selecting Start > Programs > Sun Microsystems >
Sun One Application Server7 > Start Application Server.
Tip: If you are using Sun ONE Application Server 8, the last step should be choosing Start
Default Server instead of Start Application Server.
2. Launch the Admin Console by selecting Start > Programs > Sun Microsystems > Sun One
Application Server7 > Start Admin Console.
3. In the left console tree, expand the Applications node in server1, then click Web Apps.
4. In the Server1: Applications: Web page, Click Deploy.
5. Use Browse to select the WAR file jreport.war.
6. In the Server1: Upload WAR File page, click OK to save your changes.
7. In the Server1: Applications: Web: Deploy page, type a context path such as / in the Context
Root field, and then click OK.
8. Access JReport Enterprise Server using the following URLs:
http://host:8080/jrserver
http://host:8080/jinfonet/index.jsp
http://host:8080/admin/index.jsp
Troubleshooting
If you run into some problems when using the Sun ONE Application Server 7, send the log files of
JReport Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate
the log files:
1. Start the Sun ONE Application Server, and then launch the Admin Console.
2. In the console tree, click server1. The Server1 page will appear in the right panel.
3. Go to the JVM Settings tab, and then click JVM Options.
4. In the JVM Option field, type -Dlogall=true, and then click Add. Click Save to save your changes.
5. Restart Sun ONE Application Server 7 and try to reproduce the problem.
6. After reproducing the problem, send support@jinfonet.com the log files in reporthome/logs.
Deploying to GlassFish V2 b58g
The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The
instructions are applicable to both UNIX and Windows installations; however, the format of the paths
for Windows would use the Windows format, i.e. C:\JReport\Server instead of /opt/JReport/Server.
It is assumed that the JReport Enterprise Server WAR file jreport.war is located in the /opt/JReport/
Server/bin/distribute directory. To create the WAR file refer to the instructions in Building a WAR/
EAR file to include a self-contained JReport Enterprise Server.
To deploy JReport Enterprise Server to GlassFish V2 b58g:
1. Start the GlassFish in the default domain1 and then launch the Admin Console.
2. In the Deployment section, click Deploy Web Application (.war).
3. On the displayed page, click Browse under the default first location to select the WAR file jreport.
war.
4. Leave Application Name and Context Root as jreport and jreport.
5. Select server in the Virtual Servers field.
6. Click OK. The OK button will then be replaced by the Processing button.
7. After the processing completes, an application named jreport is listed in the Deployed Web
Applications table. By clicking the Launch action in the same row you can access JReport
Enterprise Server. Or you can use the following URLs:
http://host:8080/jreport
http://host:8080/jreport/admin/index.jsp
http://host:8080/jreport/jinfonet/index.jsp
Troubleshooting
If you run into some problems when using the GlassFish V2 b58g, send the log files of JReport
Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate the log
files:
1. Start the GlassFish in the default domain1 and then launch the Admin Console.
2. In the console tree, click Application Server.
3. Go to the JVM Settings tab, and then click JVM Options.
4. In the JVM Options section, click Add JVM Option, and then type -Dlogall=true. Click Save to
save your changes.
5. Restart GlassFish V2 b58g and try to reproduce the problem.
6. After reproducing the problem, send support@jinfonet.com the log files in reporthome/logs.
The GlassFish log file may also help to identify the problem. It is /opt/glassfish/domains/domain1/
logs/server.log.
Integrating remote JReport Enterprise Server
Normally, JReport servlets are only integrated with other applications on the same machine. However,
you can now implement JReport remote server API in your JSPs, and integrate the JSPs with the
application server to call JReport Enterprise Server, which is running on a different machine.
Notes:
●
In a remote integration environment, the options for publishing resources are hidden since they are
not supported by JReport JSPs. If you want to publish report sets or catalogs to JReport Enterprise
Server, use one of the following ways:
❍
❍
❍
●
●
●
Access the JReport Enterprise Server (not the remote server) Administration page with 8889 as the
default port to perform publish work.
Copy the report set or catalog files to the computer where JReport Enterprise Server (not the
remote server) is located, and then call the RMI API to publish them.
Publish the report set or catalog files from JReport Designer to the JReport Enterprise Server.
In a remote integration environment, running report sets to the Applet format is not supported.
In a remote integration environment, the two tabs Monitor and Data are hidden on JReport
Administration page since they are not supported.
You can change the location of the two folders, skin and dhtmljsp, in the \public_html directory in
the application server side. What is required is to create a file jrserver.properties in the \WEB-INF
directory and then add the following two properties and provide the correct paths (the context root is
excluded):
web.skin.dir
web.dhtml_jsp_path
See the following cases:
●
Integrating remote JReport Enterprise Server with IBM WebSphere 5.0 by a WAR file
●
Integrating remote JReport Enterprise Server with WebLogic 7.0 by a WAR file
Related Topics:
●
Overall Remote Server APIs & unified JSPs
Integrating remote JReport Enterprise Server with IBM WebSphere 5.0 by a WAR file
Here is an example illustrating the case of using JSPs based on remote server APIs to integrate with IBM WebSphere 5.0.
It is assumed that:
●
WebSphere 5.0 is installed in C:\WebSphere.
●
JReport Enterprise Server is installed in C:\JReport\Server.
●
JReport jsp.war file is located in C:\jsp.
Take the following steps to integrate remote JReport Enterprise Server with IBM WebSphere 5.0:
1. Generate a WAR file.
2. Configure JReport Enterprise Server.
3. Deploy the WAR file.
Below show the details for each step:
Generating the WAR file
1. Create a new directory in your local disk, e.g. c:\jsp.
2. Create a sub directory WEB-INF in it: c:\jsp\WEB-INF.
3. Generate a web.xml like following and put it in c:\jsp\WEB-INF.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>jrs.remote.host</param-name>
<param-value>127.0.0.1</param-value>
</context-param>
<context-param>
<param-name>jrs.remote.rmiport</param-name>
<param-value>1129</param-value>
</context-param>
<!-- The third param(jrs.rmi.auth_file) is optional.
"authFileName" includes the auth file's realpath and auth file name. For example: C:\JReport\Server\bin
\rmi.auth.
The content of the auth file specified here should be kept consistent with that of the auth file used
by JReport Enterprise Server, though there is no need to point to the same auth file.-->
<context-param>
<param-name>jrs.rmi.auth_file</param-name>
<param-value>C:\JReport\Server\bin\rmi.auth</param-value>
</context-param>
<filter>
<filter-name>Character Encoding</filter-name>
<filter-class>jet.server.servlets.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>sendfile</servlet-name>
<servlet-class>jet.server.servlets.SendFileServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>dhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLlet</servlet-class>
</servlet>
<servlet>
<servlet-name>jrdhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLRunReportlet</servlet-class>
</servlet>
<servlet>
<servlet-name>help</servlet-name>
<servlet-class>jet.web.dhtml.JHelplet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>sendfile</servlet-name>
<url-pattern>/sendfile/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>dhtml</servlet-name>
<url-pattern>/dhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jrdhtml</servlet-name>
<url-pattern>/jrdhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>help</servlet-name>
<url-pattern>/help/*</url-pattern>
</servlet-mapping>
</web-app>
4. Create a directory lib in c:\jsp\WEB-INF.
5. Copy the class files JREngine.jar, JRESServlets.jar, JRWebDesign.jar, log4j-1.2.8.jar and sac.jar from C:\JReport\Server
\lib to C:\jsp\WEB-INF\lib.
6. Create a jar file to include the resources folder which is located in server installation root and name it languages.jar. For
example, run the following command:
C:\JReport\Server>jar -cvf languages.jar resources
Then put the jar in C:\jsp\WEB-INF\lib.
7. Copy all the folders in C:\JReport\Server\public_html to c:\jsp. If you are not using remote administration functions
you can remove the admin directory.
8. Optionally copy the folder help in C:\JReport\Server to C:\jsp. Remove all the directories except for help\server\en
\userguide. If you copy the help folders then you can remove the JHelplet servlet from the web.xml file. The help
documents will be served locally rather than go through the remote JHelplet servlet.
9. Use the following command to create a WAR file, and name it as jsp.war:
C:\jsp>jar -cvf jsp.war *
Configuring JReport Enterprise Server
1. Make sure JReport Enterprise Server has been started once in order that the server.properties file is generated.
2. Change server.properties file in <server_install_root>\bin as follows:
server.rmiserver.enable=true
server.rmiadminservice.enable=true
Note: You only need to turn on server.rmiadminservice if you include the admin JSP pages from public_html.
Deploying the WAR file
1. Start IBM WebSphere 5.0.
2. Open the Administrative Console.
You can open the Administrative Console by using the Start menu, or by using the URL: http://hostname:9090/admin/,
where the hostname is host name or IP address, and 9090 is the port number.
3. After successfully log in, expand the Applications node, and then click Install New Application.
4. Click Browse to select your .war file. In the Context Root field, type a context path such as /jsp, and then click Next.
5. Do not check any option on this page, click Next.
6. On the Step 1: Provide options to perform the installation page, type JReport JSP in the Application Name field, and then
click Next.
7. Do not make any changes to the next two pages.
8. Click Finish on the Summary page. The installing process may take several minutes, wait until the process is completed.
9. After the installation process successfully completed, click Save to Master Configuration, and then click Save.
10. Start JReport Enterprise Server and access it using the following URL:
http://localhost:9080/jsp/jinfonet/index.jsp
Integrating remote JReport Enterprise Server with WebLogic 7.0 by a WAR file
Here is an example illustrating the case of using JSPs based on remote server APIs to integrate with WebLogic 7.0.
It is assumed that:
●
WebLogic 7.0 is installed in C:\bea.
●
JReport Enterprise Server is installed in C:\JReport\Server.
●
JReport jsp.war file is located in C:\jsp.
Take the following steps to integrate remote JReport Enterprise Server with WebLogic 7.0:
1. Generate a WAR file.
2. Configure JReport Enterprise Server.
3. Deploy the WAR file.
Below show the details of each step:
Generating a WAR file
1. Create a new directory in your local disk, e.g. C:\jsp.
2. Create a sub directory WEB-INF in it: C:\jsp\WEB-INF.
3. Generate a web.xml file like following and put it in C:\jsp\WEB-INF.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>jrs.remote.host</param-name>
<param-value>127.0.0.1</param-value>
</context-param>
<context-param>
<param-name>jrs.remote.rmiport</param-name>
<param-value>1129</param-value>
</context-param>
<!-- The third param(jrs.rmi.auth_file) is optional.
"authFileName" includes the auth file's realpath and auth filename. For example: C:\JReport\Server\bin\rmi.
auth.
The content of the auth file specified here should be kept consistent with that of the auth file used
by JReport Enterprise Server, though there is no need to point to the same auth file.-->
<context-param>
<param-name>jrs.rmi.auth_file</param-name>
<param-value>C:\JReport\Server\bin\rmi.auth</param-value>
</context-param>
<filter>
<filter-name>Character Encoding</filter-name>
<filter-class>jet.server.servlets.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>sendfile</servlet-name>
<servlet-class>jet.server.servlets.SendFileServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>dhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLlet</servlet-class>
</servlet>
<servlet>
<servlet-name>jrdhtml</servlet-name>
<servlet-class>jet.web.dhtml.DHTMLRunReportlet</servlet-class>
</servlet>
<servlet>
<servlet-name>help</servlet-name>
<servlet-class>jet.web.dhtml.JHelplet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>sendfile</servlet-name>
<url-pattern>/sendfile/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>dhtml</servlet-name>
<url-pattern>/dhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jrdhtml</servlet-name>
<url-pattern>/jrdhtml/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>help</servlet-name>
<url-pattern>/help/*</url-pattern>
</servlet-mapping>
</web-app>
4. Create a directory lib in C:\jsp\WEB-INF.
5. Copy the class files JREngine.jar, JRESServlets.jar, JRWebDesign.jar, log4j-1.2.8.jar and sac.jar from C:\JReport\Server\lib
to C:\jsp\WEB-INF\lib.
6. Create a jar file to include the resources folder which is located in server installation root and name it languages.jar. For
example, run the following command:
C:\JReport\Server>jar -cvf languages.jar resources
Then put the jar in C:\jsp\WEB-INF\lib.
7. Copy all the folders in C:\JReport\Server\public_html to C:\jsp. If you are not using remote administration functions you
can remove the admin directory.
8. Optionally copy the folder help in C:\JReport\Server to C:\jsp. Remove all the directories except for help\server\en
\userguide. If you copy the help folders then you can remove the JHelplet servlet from the web.xml file. The help documents will
be served locally rather than go through the remote JHelplet servlet.
9. Use the following command to create a WAR file, and name it as jsp.war:
C:\jsp>jar -cvf jsp.war *
Configuring JReport Enterprise Server
1. Make sure JReport Enterprise Server has been started once in order that the server.properties file is generated.
2. Change server.properties file in <server_install_root>\bin as follows:
server.rmiserver.enable=true
server.rmiadminservice.enable=true
Note: You only need to turn on server.rmiadminservice if you include the admin JSP pages from public_html.
Deploying the WAR file
1. Start WebLogic 7.0.
2. Open the Administrative Console.
You can open the Administrative Console by using URL http://hostname:7001/console/, where the hostname is host name or
IP address, and 7001 is the port number.
3. After your successful login, in the Domain Configurations panel, click Web Applications node, and then click Configure a new
Web Application.
4. Click Upload it through your browser, select your .war file by clicking the Browse button, and then click Upload.
5. Click Select before jsp.war, choose the Target Server, and then click Configure and Deploy.
6. Click Deploy All, to make the status of Deployed to be true.
7. Start JReport Enterprise Server and access it using the following URL:
http://localhost:7001/jsp/jinfonet/index.jsp
JReport Security System
In JReport Enterprise Server, there are two types of security mechanisms. One is to deal with report
security, and the other is to manage user permissions on JReport Enterprise Server. This chapter
discusses these two mechanisms respectively.
●
Report security system
●
Server security system
Report security system
This section demonstrates the control of access to reports and to different subsets of data by means of
defining report security. In general, report security can be defined at three levels: page, record and
column level. After applying report security, an end user will only see what he or she is allowed to see.
The following topics explain the report security at each level in detail:
●
Page-level security
●
Record-level security and column-level security
Page-level security
Security in a report is a kind of privileged control. JReport Enterprise Server supports page-level
security which creates a security mechanism for controlling access to the report.
Page-level security is implemented with these security properties on the group panel: Cascade, Grant,
Groups, and Roles. This feature enables different users to view different groups according to their
access privilege.
For detailed descriptions about setting up page-level security in reports, see Setting up a page-level
security policy for a report in the JReport Designer User's Guide.
This section focuses on how to view and schedule a report that has page-level security with JReport
Enterprise Server.
●
Viewing a report with page-level security
●
Scheduling a report with page-level security
●
Example: e-mailing billing reports
Viewing a report with page-level security
Since the control of report access is not possible without a user ID, the significance of this function is
only apparent after reports have been published to JReport Enterprise Server and other users access it.
When a client views a report with page-level security in JReport Enterprise Server, the corresponding
groups will be displayed according to the SID. You can also advanced run reports with page-level
security in different formats, including DHTML, HTML, PDF, TEXT, Excel, PS, XML and Rich Text Format
(this feature does not support the RST and Applet formats).
To view a report with page-level security in JReport Enterprise Server, the report must first be
published to the server from JReport Designer. For example, if in JReport Designer, the security for a
report that is grouped by the Customer_Region field has been set as below:
●
The user ID admin has the privilege to view the CA and MN groups of the report.
●
The user ID jennifer has the privilege to view the BC group of the report.
Then,
1. Access the JReport Console page via a web browser with the user ID admin.
2. Browse to the report set that you are going to view.
3. Click the report set name, and you will then be able to view the CA and MN groups of the report in
separate pages.
4. If you log onto JReport Enterprise Server with the user ID jennifer, you will then only be able to
view the BC group.
Note: When designing the report in JReport Designer, if the Cascade property is set to be false, the
specified group will only display its group header and footer.
Scheduling a report with page-level security
You can schedule a page-level security report as a normal report. However, there are some differences
between the formats in which the report is to be published.
Scheduling to HTML/DHTML to version
When you schedule a task to publish a report with PLS to the HTML and/or DHTML formats to the
versioning system, the scheduled result depends on the mode which is controlled by the property
server.enable.pagelevelsecurity in server.properties in <install_root>\bin:
●
When server.enable.pagelevelsecurity=true as default, the scheduled result includes all pages.
Then when end users view the result, they will be displayed the pages they are privileged to see
according to the PLS setting in the report. They can perform interactive actions on the scheduled
DHTML result as on other DHTML result, and the formulas, summaries and other similar data will be
recalculated based on the privileged data.
Note: If the report is PLS and RLS/CLS mixed, then when other users other than the user who
did the scheduling view the scheduled HTML or DHTML result, a blank page is displayed.
●
When server.enable.pagelevelsecurity=false, the scheduled result only contains the pages that
the user who did the scheduling is allowed to see.
Scheduling to e-mail
When you schedule a report with PLS to publish it to e-mail, there is a slight difference. JReport
Enterprise Server supports a multiple mail feature which enables sending the results of page-level
security reports directly to each user who is authorized to view the report.
Assuming that the catalog and report set containing the report have been published to JReport
Enterprise Server, and two users admin and jennifer both have the permission to view the report. The
following procedure shows how to schedule a task on a page-level security report to be published to email.
1. Access the JReport Console page with user ID admin or jennifer.
2. Select the row that the report set is in, then right-click in the row and select Schedule from the
shortcut menu to set up the schedule.
3. In the General tab, select the page-level security report.
4. In the Publish tab, switch to the To E-mail sub tab and then check This report has page-level
security, send an E-mail to each user who views it.
5. Type the subject and select the result format, then click Finish.
JReport Enterprise Server will get the e-mail addresses from the user accounts, and then send the
report result to admin and jennifer, with the contents in accord with their access right to the report.
Note: Before publishing to e-mail, make sure you have input the e-mail addresses of the users when
configuring JReport Enterprise Server. To do this:
1. Access the JReport Administration page, then click Security on the system toolbar.
2. Select the User tab, choose the user name that you want to edit in the User ID column, and then
click it. You can then type in the e-mail address of the user.
Scheduling to other formats
When scheduling a report with PLS to other formats, the scheduled result only contains the pages that
the user who does the schedule is allowed to see.
Example: E-mailing billing reports
Sometimes, sending pertinent report data to corresponding mail recipients is required. JReport
Enterprise Server allows you to send a scheduled report result to the e-mail addresses accordingly,
based on the page-level security settings of the report and the user information stored in JReport
Enterprise Server (e.g. e-mail address information). Therefore, each recipient will only be able to view
certain parts of the report data. However, using e-mail information of server users is not reliable, since
a user ID that is appropriate for the report doesn't always exist in JReport Enterprise Server. In cases
like this, the mails will not be sent successfully. The best way to resolve this is to use an external email information source by implementing the UserMailList and UserMailListFactory API that JReport
provides.
JReport provides two interfaces for you to retrieve user and e-mail information from a customized
source:
●
●
jet.server.api.UserMailListFactory
Used to get the UserMailList instance implemented by the user.
jet.server.api.UserMailList
Used to get e-mail information from a customized source.
You can implement multiple classes of interface UserMailList. Each of them may refer to a particular
report. By using the getInstance() method in the jet.server.api.UserMailListFactory interface, you can
get one implementation of the UserMailList. For more information on these two interfaces, see JReport
Server API Documentation.
The following is a simple example:
1. Here, there is a Customers table with customer names and their e-mail addresses, as illustrated
below. You can design a report using this table and others. Then apply page-level security for this
report, so that later in the server side, you can schedule the report and send pertinent data to
different recipients saved in this Customers table.
2. In JReport Designer, design a report and set the page-level security for it. In this case, group the
report data by Customer Name, and then grant a formula FPageLevel to it. The content of the
formula FPageLevel is as below:
@"Customer Name";
This means that only the records of the specified group will be shown at runtime when you enter
with different IDs -- Customer Name, in this example.
3. Then in the server side, implement the two interfaces to import the e-mail lists saved in the
Customers table. Specifically, implement the jet.server.api.UserMailListFactory interface. The
getInstance() method should be implemented in this interface to get an instance of jet.server.api.
UserMailList. Take the following implementation as a reference, where the implementing class
name of the UserMailList interface is formatted as "UserMailList_" + report + "_Impl", such as
"UserMailList_InvoiceReport_cls_Impl".
import jet.server.api.*;
import jet.cs.util.*;
public class DemoUserMailListFactoryImpl implements UserMailListFactory {
public UserMailList getInstance(ServerInfo serverInfo) {
if (serverInfo == null) {
return null;
}
String rpt = null;
try {
rpt = serverInfo.getTaskProperties().getProperty(APIConst.TAG_REPORT);
} catch (RptServerException e) {
e.printStackTrace();
return null;
}
rpt = rpt.substring(rpt.lastIndexOf("/") + 1);
rpt = rpt.replace('.', '_');
rpt = rpt.replace(' ', '_');
String clsName = "UserMailList_" + rpt + "_Impl";
try {
UserMailList mailList = (UserMailList)Class.forName(clsName).newInstance();
return mailList;
} catch (InstantiationException e1) {
e1.printStackTrace();
} catch (IllegalAccessException e1) {
e1.printStackTrace();
} catch (ClassNotFoundException e1) {
e1.printStackTrace();
}
return null;
}
}
4. Then implement the jet.server.api.UserMailList interface, which gets the user and e-mail
information from the customized data source. The following implementation gets the e-mail list
from the Customers table, which contains Customer Name and Customer E-mail columns.
import jet.server.api.*;
import java.util.*;
import java.sql.*;
public class UserMailList_InvoiceReport_cls_Impl implements UserMailList {
public static Hashtable userEmails = new Hashtable();
private String curRealmName = "defaultRealm";
public UserMailList_InvoiceReport_cls_Impl()
{
loadData();
}
private void loadData ()
{
try{
String jdbcDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
DriverManager.registerDriver((Driver)Class.forName(jdbcDriver).newInstance());
Connection conn = DriverManager.getConnection("jdbc:odbc:jinfonet4");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from Customers");
String userName = null;
String userEmail = null;
while(rs.next()){
userName = rs.getString("Customer Name");
userEmail = rs.getString("Customer Email");
if (userEmail != null) {
userEmails.put(userName, userEmail);
}
}
}catch(Exception e){
e.printStackTrace();
}
}
public java.util.Enumeration getAllMailAddresses(String realmName){
if (realmName.equals(curRealmName)) {
return userEmails.elements();
}else{
return null;
}
}
public java.util.Enumeration getGroupMailAddresses
(String realmName, String groupName) {
if (realmName.equals(curRealmName) && userEmails.containsKey(groupName)) {
Vector groupEmails = new Vector();
groupEmails.addElement(userEmails.get(groupName));
return groupEmails.elements() ;
}else{
return null;
}
}
public java.util.Enumeration getRoleMailAddresses
(String realmName, String roleName) {
if (realmName.equals(curRealmName) && userEmails.containsKey(roleName)) {
Vector roleEmails = new Vector();
roleEmails.addElement(userEmails.get(roleName));
return roleEmails.elements() ;
}else{
return null;
}
}
public java.lang.String getMailAddress(String realmName, String userName) {
if (realmName.equals(curRealmName) && userEmails.containsKey(userName)) {
return (String)userEmails.get(userName);
}else{
return null;
}
}
}
5. Register the above classes to JReport Enterprise Server before the server is started.
a. Add the parameter -Dcom.jinfonet.mailListFactory=UserMailListFactoryImplName to the
command line/batch file that starts JReport Enterprise Server, where
UserMailListFactoryImplName indicates the implementation of the jet.server.api.
UserMailListFactory interface.
In this case, the parameter should be -Dcom.jinfonet.
mailListFactory=DemoUserMailListFactoryImpl.
b. Add the path of the implementation classes to the class path of the command line/batch file.
6. Start JReport Enterprise Server and then publish the report and catalog.
7. Schedule the report, publish to e-mail, check the option This report has Page Level Security. Email the report to each specified user. Provide the necessary information and then submit the
schedule.
The report will be processed and sent to the corresponding recipients with pertinent report data.
Record-level security and column-level security
Record-level security (RLS) and column-level security (CLS) of JReport Designer allows you to control
user access to different subsets of data, and ensures that people only see what they are supposed to
see. This lets you provide different users with different, and appropriate contents.
Record-level security allows you to define which records are to be revealed to any given user. While,
column-level security allows you to define which report column is revealed to any given user. No
matter to whom you need to provide information, a plant manager or thousands of customers, JReport
Designer allows you to control access to information according to your requirements.
JReport products have two types of the security policies, one is a security policy based on a data source
connection (connection-scope security policy), and the other is a security policy based on a single
report (report-scope security policy). In JReport Designer, record-level security and column-level
security are both based on the data source connection, which means that you do not have to set
security information for each report.
●
●
Connection-scope security
You can build connection-scope security policies: where each security policy refers to a data source
connection in the catalog. If you want to implement the same security policy in a group of reports,
you can simply apply an existing security policy to the report, without having to repeatedly build
security information for each report. Both RLS and CLS can be connection-scope security.
Report-scope security
Additionally, record-level security can be of report scope, based on the security information file. That
is, you can use the security information file to set the security policies for a report. Report-scope
security policy doesn't support column-level security.
Record-level security can be applied simultaneously to both connection and report scopes. Note that, if
a report-scope security policy has already been applied to a report, it will override a connection-scope
security policy applied to the data source connection. That is, report-scope security policies have a
higher priority than connection-scope security policies.
Running reports with record-level/column-level security
After setting up the security policy for a report in JReport Designer, you can then publish it to JReport
Enterprise Server as normal. Then, when you log onto the server as different users, you will find that
the security settings are applied to the report. That is, different users will only see the data they are
supposed to see.
Note: The user defined users and roles may not be recognized by JReport Enterprise Server. If your
security policies contain such users/roles, create these users and roles respectively in JReport
Enterprise Server, and then in JReport Designer, synchronize the security information with JReport
Enterprise Server using the Merge option.
See also Record-level and column-level security in the JReport Designer User's Guide for details
about how to set up record-level/column-level security policies and apply them to reports in JReport
Designer.
Server security system
JReport Enterprise Server supports two types of security mechanism. One is the default applied
security of setting permissions for users, groups and roles. The other is role based security in which
permissions are defined on roles only, and users and groups are mapped to roles.
The JReport Enterprise Server security system is implemented based on a whole set of security APIs,
with which you can customize your own implementation. JReport Enterprise Server also provides two
sets of implementations for you to directly adopt. One is an implementation based on a database that
makes the built-in security system. The other is an LDAP implementation to be used when JReport
Enterprise Server can directly access an LDAP server.
Accessing data by direct API implementation may result in many time-consuming IO operations. As a
result, the performance of the server security system may be lowered. In order to promote
performance, a cache system is added between the security service and the security API. The cache
system is used to store security objects including users, groups, roles and ACLs for the security system.
The following is a diagram of the JReport Enterprise Server security system structure:
Go through the following topics for details about the server security system:
●
Built-in security system
●
Role based security
●
Security cache system
●
Customized implementation of the security API
●
Single sign-on
●
Using an LDAP server's security system
Built-in security system
JReport Enterprise Server provides a built-in security system for you to set up and maintain security on
it and protect resources from inappropriate access by users.
The below diagram illustrates the built-in security structure in JReport Enterprise Server:
And the below diagram illustrates the inherited relationship among User, Group and Role.
JReport Enterprise Server offers these security features:
●
Realm
Realm is an abstract security concept, which hosts the resources and authentication entities on
JReport Enterprise Server. There can be more than one realm on the server and each realm is
independent from others. The resources and authentication entities that reside in different realms are
different.
At runtime, only one realm can be active and only the users and resources in the active realm are
accessible. A realm is identified by a unique name, which can contain any characters other than
forward slash (/) and backward slash (\).
The authentication entities consist of user accounts, group accounts and role accounts.
●
User
To use JReport Enterprise Server, you must have a user account, which consists of a unique user
name and password. JReport Enterprise Server verifies your identity when you type in your user
name and password, and then logs you on. If your user account has been disabled or deleted,
JReport Enterprise Server prevents you from accessing the web services that it provides, in order to
ensure that only valid users have access.
JReport Enterprise Server comes with two built-in user accounts, admin and guest. The built-in user
accounts cannot be deleted. The Admin user account can neither be deleted nor disabled.
●
●
●
Group
The principle group, which represents an organization of user accounts, is available for managing
users. Users or groups can be added into a group as its child members, and therefore inherit the
resource and folder permissions from the group.
Role
Users must have certain user rights and permissions in order to perform tasks on resources. Roles,
which represent an aggregate of permissions, help you to efficiently assign the appropriate user
rights and permissions to users. Assigning roles to users gives the users all of the user rights and
permissions of the roles to perform their jobs with. A role can also be assigned to other groups or
roles, and thus groups or roles can inherit the permissions of other roles. JReport Enterprise Server
comes with two built-in role accounts, administrators and everyone. The built-in role accounts cannot
be deleted. The administrator role account can neither be deleted nor disabled.
Permission
Permissions, associated with resources and folders, are the rules that are granted to users to control
their access to the resources and folders.
Permissions in JReport Enterprise Server include:
●
●
Permission
Description
Visible
Allows or denies viewing object names in the resource tree or version table, such as
folders, resources, and archive versions.
Read
Allows or denies viewing object properties, versions, and, if it is a folder, folder
content.
Write
Allows or denies publishing folders and resources, changing the properties (not
including permission settings) of the objects in the resource tree or version table,
such as folders, resources, and archive versions, and modifying version table settings.
Delete
Allows or denies deleting objects in the resource tree or version table, such as
folders, resources, and archive versions.
Execute
Allows or denies running resources in normal and Advanced mode (report type
resources only).
Schedule
Allows or denies submitting resources to schedules (report type resources only).
Grant
Allows or denies granting permissions to other users, groups or roles.
Privilege
Privilege is a mode for managing permissions. It can be used to manage different access permissions
unrelated with nodes. JReport Enterprise Server offers two types of privileges for users: Publish and
Advanced Properties. Users that are granted the Publish privilege will be able to publish resources to
JReport Enterprise Server, while users that have the privilege of Advanced Properties are allowed to
view advanced information of version properties such as catalog connections and report set related
resources.
Alias
JReport Enterprise Server organizes file and directories into a Resource Tree. Aliases are used to
provide different "views" of a tree for different users to enter the Resource Tree. For example, you
may set an alias resource tree (based on the resource tree) for Tanya, so that she can only see the
market resource node and thus can directly walk into the report set file she is interested in. In
summary, an alias is a combination of users and resource nodes.
To manage JReport Enterprise Server's built-in security, you must be a member of the administrator
role in order to access the JReport Administration page.
Related topics:
●
Managing security
Role based security
Except for the security system based on users, groups and roles, JReport Enterprise server also
supports role based security system in which permissions are defined on roles only, and users and
groups are mapped to roles. To switch to the role based security system, you can use either of the
following two methods:
●
Check the Role Based Authorization option in the Advanced tab of the JReport Administration >
Configuration page.
By default, the option is unchecked and the security mechanism of setting permissions for users,
groups and roles is applied. If the option is checked, the Permission Setting UI Displays option will be
hidden automatically, since it is used to control UI display and is of no use in the role based security
environment.
●
In the server.properties file, set server.rolebased.authorization to true.
In this case, the following three properties will not take effect since they control UI display of setting
user/group/role permissions:
server.ui.set_permissions.group
server.ui.set_permissions.role
server.ui.set_permissions.user
If the role based security system is used, in both the JReport Administration page (port 8889 by
default) and Console page (port 8888 by default), when you set permissions of a resource node, there
are only roles displayed.
Security cache system
The security cache system temporarily stores security objects such as users, roles, groups and ACLs.
ACL, short for Access Control List, is the core object of the security authorization system, and is in
charge of storing and checking principal permissions. When JReport Enterprise Server requires
information from the security system, it can fetch it from the cache for better performance.
The cache system caches not only security objects for the built-in security system, but also those
implemented by the security API from the external security system. It caches security information in
the security data. If the security service needs security information, it will fetch it from the security
data. However, if the security data cannot find the information, it will request it from the security API,
and then cache it in the cache system. When the security information is modified in the security
system, the security API is invoked directly in order to modify the security data.
Note: There is a special interface SecurityListener in the cache system, through which the cache is
noted to update the cached information. It is recommended that you invoke it when you access the
external security system, so as to synchronize security data between the cache system and the
external security system.
The following focuses on the configuration and synchronization of the security cache system:
●
Configuration of the security cache system
●
Synchronization of the security cache system
Configuration of the security cache system
The security cache system enables you to define the maximum number of users, roles, groups and ACL objects that
can be cached. There are three ways in which you can customize the security cache system as explained below:
Configuring by editing the server.properties file
Edit the following four properties:
●
●
●
●
server.security.user.cache.size
This should be an integer value. Its value indicates the maximum number of user objects that the security cache
can store. The default value is 1000.
server.security.role.cache.size
This should be an integer value. Its value indicates the maximum number of role objects that the security cache
can store. The default value is 50.
server.security.group.cache.size
This should be an integer value. Its value indicates the maximum number of group objects that the security
cache can store. The default value is 50.
server.security.protection.cache.size
This should be an integer value. Its value indicates the maximum number of ACL objects that the security cache
can store. The default value is 100.
For instance,
●
If server.security.user.cache.size=1000, the cache can then store at most 1000 user objects.
●
If server.security.role.cache.size=100, the cache can then store 100 role objects.
●
If server.security.group.cache.size=100, the cache can then store 100 group objects.
●
If server.security.protection.cache.size=100, the cache can then store 100 ACL objects.
Configuring from the JReport Administration page
You must be a member of the administrator role in order to access the JReport Administration page.
1. Log onto the JReport Administration page, click Configuration on the system toolbar, then click the Cache
tab.
2. In the Security Cache sub tab, four options are provided for specifying the cache size:
❍
❍
❍
❍
User Cache Size
The maximum number of user objects that the security cache can store. Should be an integer value.
Role Cache Size
The maximum number of role objects that the security cache can store. Should be an integer value.
Group Cache Size
The maximum number of group objects that the security cache can store. Should be an integer value.
Protection Cache Size
The maximum number of ACL objects that the security cache can store. Should be an integer value.
3. When done, click OK to apply the settings.
Configuring using the API method
Invoke the following methods in the API class jet.server.api.admin.cfg.ConfigurationAdvanced:
/**
* Set the security user cache's size
* Setting the size of the cache to zero or negative means closing the security user cache.
* @param size
*/
public void setSecurityUserCacheSize(int size);
/**
* Get the size of the security user cache
* @return the size of the security user cache
*/
public int getSecurityUserCacheSize();
/**
* Set the size of the security role cache
* Setting the size of the cache to zero or negative means closing the security role cache
* @param size
*/
public void setSecurityRoleCacheSize(int size);
/**
* Get the size of the security role cache
* @return the size of the security role cache
*/
public int getSecurityRoleCacheSize();
/**
* Set the size of the security group cache
* Setting the size of the cache to zero or negative means closing the security group cache
* @param size
*/
public void setSecurityGroupCacheSize(int size);
/**
* Get the size of the security group cache
* @return the size of the security group cache
*/
public int getSecurityGroupCacheSize();
/**
* Set the size of the security protection cache
* Setting the size of the cache to zero or negative means closing the security protection cache
* @param size<
*/
public void setSecurityProtectionCacheSize(int size);
/**
* Get the size of the security protection cache
* @return the size of the security protection cache
*/
public int getSecurityProectionCacheSize();
Synchronization of the security cache system
A synchronization system has been provided for synchronizing JReport Enterprise Server's security
system with your external security systems. When the security cache system receives a security
information modification event, it will then fetch the security information from the API and update the
cached information.
The following is a diagram of the synchronization system mechanism:
There are two ways to invoke the synchronization system. The first is to modify the security
information on our Server web UI (red line), and the second is to modify the external security system
(blue line).
Customized implementation of the security API
JReport Enterprise Server provides a set of security APIs which you can implement in order to build
your preferred security system.
The following sections discuss the basic rules and implementation of the security API:
●
Partial Implementation of the security API
●
Implementing the security API using an .xml file
●
Rules for applying customized security API
Notes:
●
For details about the security APIs, see the jet.server.api.custom.security package in JReport
Enterprise Server Javadoc in <install_root>\help\server\en\api.
Demo references available in <install_root>\help\server\en\samples:
●
❍
❍
●
●
DemoAuthenticationProvider.java
Demo for implementation of the jet.server.api.custom.security.AuthenticationProvider interface.
DemoAuthorizationProvider.java
Demo for implementation of the jet.server.api.custom.security.AuthorizationProvider interface.
In V8, two new methods addSecurityListener() and isEnableEdit() are added into the API jet.server.
api.custom.security.AuthenticationProvider. If you have upgraded JReport Enterprise Server from V7
to V8, and have applied customized implementation of AuthenticationProvider in V7, you need
implement the new methods in the API.
JReport Enterprise Server provides the ability to use customized user authentication scheme by the
implementation of the two interfaces jet.server.api.custom.security.AuthenticationProvider and jet.
server.api.custom.security.AuthorizationProvider. In addition, the way of implementing the
deprecated security API interface jet.server.userman.UserAuthenticator is also supported and you
can refer to the following demos for reference, which are located in <install_root>\help\server\en
\samples:
❍
❍
If you want to use JReport Enterprise Server as a servlet in your system, see
Demo1UserAuthenticator.java.
If you want to use your user data, you need load your data in the structural method. See
Demo2UserAuthenticator.java, Demo2Realm.java, Demo2User.java and demo2data.txt for
reference.
Partial Implementation of the security API
The security API can meet various requirements for seamlessly integrating the JReport security system
into an existing external security system.
By implementing all interfaces, you provide full functions to the JReport Enterprise Server security
system. However, if you do not want to provide a complete security system to your JReport Enterprise
Server, but only to use part of the functions available, you can achieve this by implementing the
interfaces that meet your requirements.
Here are some examples:
Example 1
Requirements: You only want to customize authentication and authorization.
The following interfaces are required to be implemented:
●
AuthenticationProvider
●
AuthorizationProvider
Example 2
Requirements: You want to customize authentication and users, while the JReport Enterprise Server
maintains other functions of the security system.
The following interfaces are required to be implemented:
●
AuthenticationProvider
●
UserProvider
Example 3
Requirements: For CLS/RLS scenario, you must provide user/role information.
The following interfaces are required to be implemented:
●
AuthenticationProvider
●
UserProvider
●
RoleProvider
●
RoleUserRelationProvider
Implementing the security API using an .xml file
You can specify a customized implementation of the security API in a .xml file. The JReport Enterprise Server loads
classes according to this file.
The file is customizedAPI.xml in <install_root>\bin. Specify the content in the .xml file as below:
<?xml version="1.0" encoding="UTF-8"?>
<jreport-customized-api>
<security>
<authentication-provider>com.customer.security.AuthenticationProviderImpl</authentication-provider>
<authorization-provider>com.customer.security.AuthorizationProviderImpl</authorization-provider>
<user>
<provider>com.customer.security.user.UserProviderImpl</provider>
<permission-provider>com.customer.security.user.UserPermissionProviderImpl</permission-provider>
<privilege-provider>com.customer.security.user.UserPrivilegeProviderImpl</privilege-provider>
</user>
<group>
<provider>com.customer.security.group.GroupProviderImpl</provider>
<permission-provider>com.customer.security.group.GroupPermissionProviderImpl</permission-provider>
<privilege-provider>com.customer.security.group.GroupPrivilegeProviderImpl</privilege-provider>
</group>
<role>
<provider>com.customer.security.role.RoleProviderImpl</provider>
<permission-provider>com.customer.security.role.RolePermissionProviderImpl</permission-provider>
<privilege-provider>com.customer.security.role.RolePrivilegeProviderImpl</privilege-provider>
</role>
<relation>
<role-group>com.customer.security.relation.RoleGroupRelationProviderImpl</role-group>
<role-user>com.customer.security.relation.RoleUserRelationProviderImpl</role-user>
<group-user>com.customer.security.relation.GroupUserRelationProviderImpl</group-user>
</relation>
</security>
</jreport-customized-api>
Rules for applying customized security API
The following are rules for applying customized security API:
●
AuthenticationProvider is a core interface and must be implemented. It is first loaded when JReport
Enterprise Server loads a customized security API.
There are dependency relationships among some interfaces:
●
Interfaces PermissionProvider and PrivilegeProvider depend on the corresponding principal interface
provider. For example, the prerequisite for applying a customized UserPermissionProvider is that a
customized UserProvider has been applied.
Interface RelationProvider depends on both the corresponding principal interfaces. For example, the
prerequisite for applying a customized GroupUserRelationProvider is that a customized UserProvider
and GroupProvider have been applied.
●
If you partly implement the security API, the JReport Enterprise Server will automatically provide
implementation of some missed but required interfaces, in order to build an integrated security
system. Below are the rules:
❍
❍
●
If customized implementations of Providers have not been applied, the JReport Enterprise Server
will apply built-in implementations of these Providers, including: AuthorizationProvider,
UserProvider, GroupProvider, RoleProvider, GroupUserRelationProvider, RoleGroupRelationProvider,
and RoleUserRelationProvider.
If you have applied a PermissionProvider or PrivilegeProvider, but not applied an
AuthorizationProvider, the JReport Enterprise Server will apply the built-in implementation of the
AuthorizationProvider.
If you have applied an AuthorizationProvider, but not applied a PermissionProvider or
PrivilegeProvider, for example, UserPermissionProvider or UserPrivilegeProvider, the JReport
Enterprise Server will not apply the built-in implementation of the PermissionProvider or
PrivilegeProvider.
Single sign-on
When JReport Enterprise Server is integrated into your system, it will implement a security check. If
your system also checks security, you will have to pass through authentication twice. To deal with this
problem, JReport Enterprise Server provides single sign-on APIs for you to pass login information from
your external security system to the JReport Enterprise Server security system in order to avoid a
second login requirement by JReport Enterprise Server after you have logged into your external
system. You can either disable the JReport Enterprise Server security check or customize security for
JReport Enterprise Server by implementing the interface - jet.server.api.http.HttpExternalAuthorized.
Interface ExternalAuthorized
The interface jet.server.api.ExternalAuthorized maintains externally authorized user sessions. It has
the following methods:
●
●
●
getExternalAuthorizedUser
Gets and returns the externally authorized user ID. The user ID should be a valid user ID of the
report server. Null will be returned if the authorized user info cannot be obtained from the userInfo
object.
askInvalidate
Asks whether to invalidate an externally authorized user session (i.e. the session has expired). The
report server calls this method before the session is invalidated. The server does not call this method
if a user logs out.
notifyLogout
Notifies an external authorized user session logout. The report server calls this method after user
logout.
Interface HttpExternalAuthorized
The interface jet.server.api.http.HttpExternalAuthorized extends jet.server.api.ExternalAuthorized. By
this interface, the report server gets the user ID that was authorized by an external authenticator. It
has the following methods:
●
●
getExternalAuthorizedUser
Gets the externally authorized user ID. Returns null if the authorized user info cannot be obtained
from the HttpServletRequest object. The user ID should be a valid user ID of the report server.
handleUnAuthenticatedRequest
Handles unauthenticated requests. The report server calls this method before sending the HTTP
unauthorized response (HTTP 401) to the client. This method allows you to send your response to the
client to handle an unauthenticated request. If this method returns true, the report server will send
the HTTP unauthorized response (HTTP 401) to the client. Otherwise the report server does nothing.
Implementation
For implementation in an integration environment, the following steps are required:
1. Write your HttpExternalAuthorized implementation.
2. Compile Java classes. Compiling requires the library JRESServlets.jar, which can be found in WEBINF\lib directory.
3. Create a folder classes in the WEB-INF folder and then add the authentication classes in the
classes folder.
4. Define the system property jrs.httpExternalAuthorized with your implementation by -D parameter.
For example, assuming that the implementation of this interface is com.mycorp.
HttpExternalAuthorizedImpl.class:
-Djrs.httpExternalAuthorized=com.mycorp.HttpExternalAuthorizedImpl
Demos
The following demo programs are provided to illustrate the implementation of the
HttpExternalAuthorized interface. These demos are available in <install_root>\help\server\en
\samples.
●
●
●
CustomHttpExternalAuthorized.java
Demo for implementation of HttpExternalAuthorized.
CustomServlet.java
Demo to set implementation of HttpExternalAuthorized into the report server.
customViewReport.jsp.zip
The following demos are contained in the zip:
❍
❍
❍
❍
customNoAuth.jsp
Demo to set implementation of HttpExternalAuthorized into the report server. No external
authorized user name is submitted in this demo.
customParamAuth.jsp
Demo to set implementation of HttpExternalAuthorized into the report server. External authorized
user name is submitted by parameter in this demo.
customSessionAuth.jsp
Demo to set implementation of HttpExternalAuthorized into the report server. External authorized
user name is submitted by http session in this demo.
customViewReport.jsp
Demo to work together with customNoAuth.jsp, customParamAuth.jsp and customSessionAuth.jsp
to view a report.
Using an LDAP server's security system
The server security system can run two modes in which you can use an LDAP server's security system.
The first is importing mode. In this mode, if you want to use the LDAP feature, you will have to import
the security information from an LDAP server. The second is non-importing mode. With this mode,
JReport Enterprise Server can access an LDAP server and obtain LDAP security information directly
without having to import it.
Below is a diagram which illustrates these two working modes:
JReport Enterprise Server can access an LDAP server using the LDAP implementation of the security
API (blue line), and import security information from an LDAP server into the built-in security system
(red line).
To use an LDAP server's security system, you should first enable JReport Enterprise Server to adapt to
a directory server by configuring the settings in the Server tab (accessed by selecting Configuration >
LDAP on the JReport Administration page), making sure that the Enable LDAP Support option has been
checked.
Notes:
●
●
Make sure that the Directory Manager DN is a user with prior LDAP Server permission, and who can
retrieve other LDAP users.
Make sure that the users and groups you want to query and import into JReport Enterprise Server
belong to the organization you typed into the Distinguished Name field.
Pick a topic from the following to get more:
●
Examples of LDAP server configuration
●
SSL support in LDAP system
●
Limitations of LDAP support
●
Using LDAP server security information by importing
●
Using LDAP server security information via the LDAP implementation of the security API
Examples of LDAP server configuration
Six directory servers are currently supported. These are:
●
Novell Directory Server
●
Microsoft Site Server
●
iPlanet Directory Server
●
Active Directory Advanced Server
●
Lotus Domino Server
●
OpenLDAP Directory Server
If you need access to a different directory server, contact your JReport Sales Representative. New
servers are frequently being added.
The following sections provide examples of settings which enable JReport Enterprise Server to adapt to
these directory servers. They are as follows:
●
Example 1: Configuration for adapting to a Novell Directory Server
●
Example 2: Configuration for adapting to a Microsoft Site Server
●
Example 3: Configuration for adapting to an iPlanet Directory Server
●
Example 4: Configuration for adapting to the Active Directory Advanced Server
●
Example 5: Configuration for adapting to a Lotus Domino Server on NT
●
Example 6: Configuration for adapting to an OpenLDAP Directory Server
Example 1: Configuration for adapting to a Novell Directory Server
If you want to get all users and groups from the orgunit organizational unit, you should follow the steps
below to configure your Server tab on the JReport Administration page > Configuration > LDAP tab:
1. Select Novell Directory Server from the Select LDAP Server drop-down list, and then click Load
Settings. The settings of the Novell Directory Server will then be loaded.
2. Check the Enable LDAP Support checkbox, and input the following information:
❍
LDAP URL: ldap://IP address or host name of your Novell Directory Server (for example:
ldap://127.0.0.1)
❍
LDAP Server Port: 389
❍
Root Entry: o=the name of the root (for example: o=myorg)
❍
Directory Manager DN: cn=user name of the directory manager,o=context (for example:
cn=admin,o=context)
❍
Password: the password of the Directory Manager (for example: 1234)
❍
Encryption Type: None
❍
Import LDAP Group(s) to: Group
❍
User Schema
■
■
❍
Distinguished Name:ou=the name of the organization unit where you want to perform a
search for users (for example: ou=orgunit)
Filter: (&(cn=the filter criteria that you want to set )(objectclass=person)) (for example: (&
(cn=*)(objectclass=person)))
Group Schema
■
■
■
Distinguished Name: ou=the name of the organization unit that you want to perform a search
for groups (for example: ou=orgunit)
Filter: (&(cn=the filter criteria that you want to set )(objectclass=groupofuniquenames)) (for
example: (&(cn=*)(objectclass=groupofuniquenames)) )
Admin Group: The name of the group you want to add to the Admin group (for example:
develop)
3. You can test the connection settings by clicking the Test Connection button, get the query result
of the users specified in the option Filter by clicking the Query User button, and get the query
result of groups specified in the option Filter by clicking the Query Group button.
4. Click Save to save all settings.
Example 2: Configuration for adapting to a Microsoft Site Server
Follow the steps below to configure your Server tab on the JReport Administration page > Configuration
> LDAP tab. You can get all users from the members organizational unit and all groups from the groups
organizational unit.
1. Select Microsoft Site Server from the Select LDAP Server drop-down list, and then click Load
Settings. The settings of the Microsoft Site Server will be loaded.
2. Make sure that the Enable LDAP Support checkbox is selected, and input the following
information:
❍
LDAP URL: ldap://IP address or host name of your Microsoft site Server (for example:
ldap://127.0.0.1)
❍
LDAP Server Port: 1003
❍
Root Entry: o=test
❍
Directory Manager DN: cn=administrator,ou=members,o=test
❍
Password: test
❍
Encryption Type: None
❍
Import LDAP Group(s) to: Group
3. You can test connection settings by clicking the Test Connection button, get the query result of
users specified in the option Filter by clicking the Query User button, and get the query result of
groups specified in the option Filter by clicking the Query Group button.
4. Click Save to save all settings in this tab.
Example 3: Configuration for adapting to an iPlanet Directory Server
Follow the steps below to configure your Server tab on the JReport Administration page > Configuration
> LDAP tab. You can get all users in the people organizational unit and all groups in the groups
organizational unit.
1. Select iPlanet Directory Server from the Select LDAP Server drop-down list, and then click Load
Settings. The settings of iPlanet Directory Server will then be loaded.
2. Make sure that the Enable LDAP Support checkbox is selected, and input the following
information:
❍
LDAP URL: ldap://IP address of your iPlanet Directory Server
❍
LDAP Server Port: 389
❍
Root Entry: dc=mailbj,dc=jinfonet,dc=com
❍
Directory Manager DN: cn=directory manager
❍
Password: jinfonet
❍
Encryption Type: None
❍
Import LDAP Group(s) to: Group
3. You can test the connection settings by clicking the Test Connection button, get the query result
of users specified in the option Filter by clicking the Query User button, and get the query result
of groups specified in the option Filter by clicking the Group Query button.
4. Click Save to save all the settings in this tab.
Example 4: Configuration for adapting to the Active Directory Advanced Server
Follow the steps below to configure your Server tab on the JReport Administration page > Configuration
> LDAP tab. You can get all users and groups from the myorg organizational unit.
1. Select Win2000 Active Directory from the Select LDAP Server drop-down list, and then click
Load Settings. The settings are then cleared and you can input your information.
2. Make sure that the Enable LDAP Support checkbox is selected, and input the following
information:
❍
LDAP URL: ldap://IP address of your Windows 2000 Advanced Server
❍
LDAP Server Port: 389
❍
Root Entry: DC=testad,DC=local
❍
Directory Manager DN: CN=administrator,CN=Users,DC=testad,DC=local
❍
Password: 1234
❍
Encryption Type: None
❍
Import LDAP Group(s) to: Group
❍
User Schema
❍
■
User Attribute Name: cn
■
User Common Name: userPrincipalName
■
User Password: userPassword
■
Distinguished Name: ou=myorg
■
Filter: (&(cn=*)(objectclass=person))
Group Schema
■
Group Common Name: cn
■
Group Member Type: member
■
Distinguished Name: ou=myorg
■
Filter: (&(cn=*)(objectclass=group))
3. You can test the connection settings by clicking the Test Connection button, get the query result
of users specified in the option Filter by clicking the Query User button, and get the query result
of groups specified in the option Filter by clicking the Group Query button.
4. Click Save to save all settings in this tab.
Example 5: Configuration for adapting to a Lotus Domino Server on NT
By following the steps below to configure your Server tab on the JReport Administration page >
Configuration > LDAP tab, you can get all users and groups from the developer organization unit.
1. Select Lotus Domino on NT from the Select LDAP Server drop-down list, and then click Load
Settings. The settings are then cleared and you can input your information.
2. Make sure that the Enable LDAP Support checkbox is selected, and input the following
information:
❍
LDAP URL: ldap://IP address of your Lotus Domino Server
❍
LDAP Server Port: 389
❍
Root Entry:
❍
Directory Manager DN: cn=admin,o=jtotal
❍
Password: 123456
❍
Encryption Type: None
❍
Import LDAP Group(s) to: Group
❍
User Schema
❍
■
User Attribute Name: uid
■
User Common Name: cn
■
User Password: userPassword
■
Distinguished Name: ou=developer, o=jtotal
■
Filter: (&(cn=*)(objectclass=person))
Group Schema
■
Group Common Name: cn
■
Group Member Type: member
■
Distinguished Name:
■
Filter: (&(cn=*)(objectclass=groupofnames))
3. You can test the connection settings by clicking the Test Connection button, get the query result
of users specified in the option Filter by clicking the button Query User, and get the query result
of groups specified in the option Filter by clicking the Query Group button.
4. Click Save to save all settings in this tab.
Example 6: Configuration for adapting to an OpenLDAP Directory Server
By following the steps below to configure your Server tab on the JReport Administration page >
Configuration > LDAP tab, you can get all users and groups from the developer organization unit.
1. Select OpenLDAP Directory Server from the Select LDAP Server drop-down list, and then click
Load Settings. The settings are then cleared and you can input your information.
2. Make sure that the Enable LDAP Support checkbox is selected, and input the following
information:
❍
LDAP URL: ldap://IP address of your OpenLDAP Directory Server (for example:
ldap://127.0.0.1)
❍
LDAP Server Port: 389
❍
Root Entry: dc=openldap, dc=ldaptest
❍
Directory Manager DN: cn=Manager,dc=openldap,dc=ldaptest
❍
Password: 123456789
❍
Encryption Type: None
❍
Import LDAP Group(s) to: Group
❍
User Schema
■
User Attribute Name: uid
■
User Common Name: cn
■
User Password: userPassword
■
❍
Distinguished Name: ou=members
Filter: (&(uid=*)(objectclass=person))
Group Schema
■
Group Common Name: cn
■
Group Member Type: uniqueMember
■
Distinguished Name: ou=groups
■
Filter: (&(cn=*)(objectclass=groupofuniquenames))
■
Admin Group:
3. You can test the connection settings by clicking the Test Connection button, get the query result
of users specified in the option Filter by clicking the Query User button, and get the query result
of groups specified in the option Filter by clicking the Query Group button.
4. Click Save to save all settings in this tab.
SSL support in LDAP system
JReport Enterprise Server's LDAP system supports SSL when connecting to an LDAP server for
obtaining security information.
Solving the wrong connection port type problem
JReport implements a method in the security system to solve the wrong connection port type problem.
The wrong connection port type problem in SSL protocol
If you use an SSL socket to connect to a server on a port that is not using SSL, or if you use a plain
socket to connect to a server's SSL socket, your program will hang. This is a characteristic of the SSL
protocol.
Method to avoid the wrong connection port type problem
Use a main thread to create a child thread for connecting to the LDAP server. The main thread can wait
on the child thread for a period of time-- the socket timeout time (This time can be set by users). If the
child thread creates an LDAP connection successfully, it will notify the main thread, and the program
will continue to run. However, if the child thread hangs due to using the wrong port type, the main
thread will only need to wait until the socket timeout time has been reached and can continue to run.
A Parameter setting in the method
There is an important parameter in this method: the socket timeout time. Since the connection time
varies with the user's network environment, it is better to set it in LDAPProperties.xml: modify the
element env-socketTime's value before the server is started. Its default value is 10, which means that
the socket timeout time is 10 seconds. You can modify this value according to your network
environment.
About SSL certificate store in JReport Enterprise Server
Since JNDI uses the default SSL provider, the certificates will be checked by JSSE's default
TrustManager: X509TrustManager. If the TrustManager does not accept them, JReport Enterprise
Server will store the SSL certificates into another key store file. This file is placed in <install_root>
\properties \LDAPKeyStore.keystore. The password to access the file is jinfonet. You can also use D parameters to specify another file and password. For instance, if you want to add the certificates
into: C:\certs\certs.keystore, and use the password test, you should add the following parameters
to JReport Enterprise Server's startup file:
"-Djavax.net.ssl.trustStore= C:\certs\certs.keystore"
"-Djavax.net.ssl.trustStorePassword=test"
Note: The LDAP service provider uses JSSE for its SSL support. JSSE is available as part of Java 2
SDK, v1.4. As for earlier versions of the Java platform, you can turn to http://java.sun.com/products/
jsse for information. To use JSSE on a platform earlier than Java 2 SDK, v1.4, first install JSSE, and
then configure a JSSE provider either by updating the JAVA_HOME/lib/security/java.security file with
the provider or by adding the provider programmatically. Here JAVA_HOME refers to the directory
where the Java Runtime (JRE) software has been installed. Detailed steps can be found in the JSSE
Reference Guide.
Limitations of LDAP support
In the LDAP page, sessions are used to remember passwords and the status of the remember password
checkbox. Due to this, when the session exceeds the time limit, there are some limitations:
●
●
If the Load Settings button is clicked, and the session has expired, the user must log onto JReport
Enterprise Server again. After that, the retained password will be lost.
If the session expires due to idling, when logging back onto JReport Enterprise Server again, the
retained password will be lost.
Using LDAP server security information by importing
LDAP (Lightweight Directory Access Protocol) is a lightweight client-server protocol for accessing
directory services. With LDAP support, JReport Enterprise Server enables you to import users/groups
from directory servers.
To import LDAP security server information, on the JReport Administration page, click Configuration >
LDAP > Import. In the Import tab, you can use LDAP users and groups in JReport Enterprise Server
by importing them. In addition, in order to have the most current security information, you can
synchronize the security information from your local server with that of the LDAP server. To do this, on
the JReport Administration page, click Configuration > LDAP > Synchronize, where you can
predefine a role map for the imported LDAP users.
However, if you have checked Enable Auto-Import of Users from LDAP Server, users will automatically
be imported into JReport Enterprise Server when they log in for the first time. The Enable LDAP
Support and Enable Auto-Import of Users from LDAP Server options in the Configuration > LDAP >
Server tab work together. The former determines whether an imported LDAP user can be used in
JReport Enterprise Server, and the latter determines whether LDAP users can be imported
automatically, as shown in the following table:
=Checked;
=Unchecked
Enable
LDAP
Support
Local User
Enable
AutoImport of
Users
from
LDAP
Server
Can
be
used
YES
YES
YES
YES
Imported
LDAP User
YES
YES
NO
NO
NoneImported
LDAP User
YES
NO
NO
NO
Using LDAP server security information via the LDAP implementation of the security API
JReport Enterprise Server can access an LDAP server directly using the LDAP security API implementation.
To achieve this, you will need to turn on the LDAP security providers. There are three approaches to
achieve this:
●
Configuring on the JReport Administration page
You must be a member of the administrators role in order to access the JReport Administration page. To
use the LDAP security providers, on the JReport Administration page, click Configuration > LDAP >
Server, then check Enable Direct Authentication to LDAP Server. At the same time, the Enable
Auto-Import of Users from LDAP Server and Import LDAP Group(s) To options are hidden.
●
Configuring by API method
Invoke the following two methods in the interface ConfigurationLDAPServer:
/**
* Specifies whether or not the Server security system uses the LDAP providers.
* @return Returns true if using none imported LDAP support, otherwise returns false.
*/
public boolean isEnableNoneImportedLDAPSupport();
/**
* Specifies whether or not the Server security system uses none imported LDAP support.
* @param isEnableNoneImportedLDAPSupport Set this parameter to true if the Server
security system uses none imported LDAP support, otherwise set it to false.
*/
public void setEnableNoneImportedLDAPSupport (boolean isEnableNoneImportedLDAPSupport);
●
Editing the LDAP XML configuration file
Specify the following property in the LDAP XML configuration file:
<env-enableNoneImportedLDAPSupport>true</env-enableNoneImportedLDAPSupport>.
If the value is true, JReport Enterprise Server security system will then use the LDAP providers. The
default value of this property is false.
Note: In order to use LDAP providers, a valid admin user is required to manage the JReport Enterprise
Server. The following are rules for checking whether or not a user is an admin user:
●
●
Whether or not the user is a member of the LDAP admin group. The LDAP admin group is a configuration
option in the LDAP configuration XML file.
Whether or not the user is a member of the administrators role. The user can be granted the role by a
role map.
A user that meets one of these two rules is regarded as an admin user, and is thus allowed to access the
JReport Administration page.
Troubleshooting LDAP configuration
If you encountered any problems during LDAP configuration, refer to the following for help.
LDAP configuration failure resulting in re-login failure as an admin user
An admin user may fail to carry out LDAP configuration properly, and thus then cannot log onto the
JReport Administration page to manage the server. If this happens, you should follow the below steps:
1. Modify the property in the LDAP configuration XML file LDAPProperties.xml in <install_root>
\properties as below to turn off the Enable Direct Authentication to LDAP Server option:
<env-enableNoneImportedLDAPSupport>false</env-enableNoneImportedLDAPSupport>
2. Restart JReport Enterprise Server and log in as a built-in security admin user to correct the LDAP
configuration.
Warning messages in the advent of incorrect LDAP configuration
Apart from the notes offered in the LDAP tab of the JReport Administration > Configuration page, prompt
warning information is also provided in order to cope with incorrect LDAP configuration. The server system
will prompt warning messages in the following cases:
●
If you do not fill in the Admin Group field or specify an admin group.
●
If the admin group specified does not hold a user.
●
If the admin group specified does not exist in the LDAP server.
Configuring
Once JReport Enterprise Server has been installed and you have prepared the reporting environment,
you can then start it. However, you may find that JReport's default port number conflicts with an
existing one in your computer, or that you need to generate log files for analyzing a problem. In these
cases, you will need to configure your server. Before or while running the server, you can configure it
according to your systems.
The configuration work can be performed in two ways: via the JReport Enterprise Server UI or via
configuration files. Some server UI options and properties in the configuration files are mapped and
both function the same way. For these types of settings, you can take either way to do the
configuration. Appendix 2: Mapping list of server UI options and properties details which server UI
option are mapped to which properties in the configuration files.
This chapter focuses on the following topics:
●
Configuration files
●
Performing administrative configuration work on UI
●
Configuring the server database
●
Configuring another connection as a substitute for the catalog connection
●
Configuring connection pool
●
Configuring logs
Configuration files
The following table lists the files provided for configuration purpose and the corresponding server UIs
they are mapped to if applicable:
File
Description
Mapped Server UI
Related Document
<install_root>\bin\classes.properties Apply old version security API
(UserAuthenticator)
-
-
<install_root>\bin
\ConnectionPoolConfig.properties
Engine connection pool
configuration
-
Configuring a connection pool
<install_root>\bin\datasource.xml
Connection mapping
configuration
-
Configuring the datasource.
xml file
<install_root>\bin\dbconfig.xml
Server system DB configuration JReport Administration
page > Data >
Configuration
Configuring the server
database in the dbconfig.xml
file
<install_root>\bin\dhtml.properties
Configuration for the Action
Task Manager
-
Action Task Manager > dhtml.
properties
<install_root>\bin\faxconfig.
properties
Configuration for sending fax
JReport Administration
page > Configuration >
Export > Fax
-
<install_root>\bin\jdbcdrivers.
properties
Configure the JDBC drivers that can be auto loaded
-
<install_root>\bin
\JdbcDriversConfig.properties
JDBC capability description
-
Configuring JdbcDriversConfig.
properties
<install_root>\bin\LogConfig.
properties
Configuration for log
JReport Administration
page > Configuration >
Log
Configuring logs
<install_root>\bin\mailconfig.
properties
Configuration for sending emails
JReport Administration
page > Configuration >
Export > E-mail
-
<install_root>\bin\server.list
Configure server list in a
JReport Enterprise Server
cluster
JReport Administration
page > Configuration >
Cluster > Config
Managing the predefined
server list
<install_root>\bin\server.properties
Comprehensive configuration
JReport Administration/
Console page
Appendix 1: Properties server.properties file
<install_root>\properties
\LDAPProperties.xml
Configuration for LDAP support
JReport Administration
page > Configuration >
LDAP > Server
-
Related topics:
●
Appendix 2: Mapping list of server UI options and properties
Performing administrative configuration work on UI
JReport Enterprise Server UI can be accessed remotely from a client machine through a web browser
such as Internet Explorer. The JReport Administration page is available to administrators only. To
perform administrative configuration work as an administrator, first log onto the JReport Administration
page.
On the JReport Administration page, these tabs are entry to different-purposed configuration pages:
●
Configuration - A comprehensive place for configuration containing further-divided categories.
●
Security - Where you manage user accounts and permissions.
●
Profile - Where you define some initial settings for users' profiles.
●
Cluster - Where you manage a JReport Enterprise Server cluster.
●
Data - Where you manage the server data.
Configuring the server database
There are two databases in JReport Enterprise Server: systables and profiling. The systables database
holds information of folders, nodes, versions, the security system, and the completed table. The
profiling database holds server runtime performance related information. Systables is necessary in
order to run JReport Enterprise Server. For best performance, you may want to configure two separate
databases, one for systables and one for profiling, depending on your environment.
When you install JReport Enterprise Server, a dbconfig.xml file is automatically created in the directory
<install_root>\bin. The database configuration information is stored in this configuration file. You
can configure your database by using the dbconfig.xml file.
JReport Enterprise Server provides multiple database support, allowing you to configure your own
database to store the server data.
This section presents the ways of configuring a server database for JReport Enterprise Server in two
different environments. Also, you can specify a table space in the database configuration for JReport
Enterprise Server to create system tables in it.
●
Configuring the server database in a standalone environment
●
Configuring the server database when integrating with an application server
●
Creating tables in a specified table space
●
Schema support
●
Configuring JdbcDriversConfig.properties
Configuring the server database in a standalone environment
When JReport Enterprise Server is running in a standalone environment, you can configure the
database for it remotely on the JReport Administration page. Also, since the server database
configuration information is stored in the dbconfig.xml file in the directory <install_root>\bin, you
can also configure the server database in this file.
Notes:
●
●
When you configure the database URL in a clustered environment, make sure that the setting for
both the admin and backup server points to the same database location, so that when the backup
server is promoted to be the admin server, the server data will be consistent.
Usually, JReport Enterprise Server automatically creates system tables and profile tables the first
time it is started. The database information that JReport Enterprise Server uses is defined in the
dbconfig.xml file. However, if the user ID defined in this file does not have the permission to create
tables in the database, JReport Enterprise Server will fail to complete the operation. In this case, you
will need another user, such as the database administrator (who holds the relevant permissions), to
create a set of empty tables in the user's schema using the provided SQL files. These SQL files can
be found in <install_root>\script_files.
The following sections present the two ways of configuring the server database:
●
Configuring the server database on the JReport Administration page
●
Configuring the server database in the dbconfig.xml file
Configuring the server database on the JReport Administration page
1. Log onto the JReport Administration page, then on the system toolbar, click Data.
2. Select a realm.
3. Click the System DB or Profiling DB tab.
Note: The Profiling DB tab is not shown by default. In order to show the Profiling DB tab, you
should set the server.profiling.enable property to true in the server.properties file in the
<install_root>\bin directory.
4. Switch to the Configuration tab.
5. Select a DBDriver from the Driver drop-down list and provide the driver class path information in
the Driver Class Location field.
Note: For the Access and HSQLDB databases, you do not need to specify the Driver Class
Location. For all other databases, you will have to provide the driver class path information
unless it has already been added to the class path of setenv.bat (setenv.sh on Unix) file
during installation or by editing the setenv.bat file.
6. Type a valid URL that can be used to establish a connection to the database. The valid format of
the URL should be provided by the DBDriver vendor.
7. Provide the user ID and password.
8. To test the connection, click Test. To update the database configuration and to apply the settings,
click Update and then restart the server to finalize the function.
Configuring the server database in the dbconfig.xml file
In dbconfig.xml, you can configure the server database using one of two methods. One is to specify the
URL, driver, user and password individually. This method of configuration can be modified through the
JReport Administration page. For example:
<database name="profiling/systables">
<url>...</url>
<driver>...</driver>
<user>...</user>
<password>...</password>
</database>
Note: The <user> and <password> information is encrypted. The <user> and <password> tags will
be replaced by the <encrypt-sign> tag after JReport Enterprise Server's startup. If you want to change
user or password, delete the <encrypt-sign> tag and add the <user> and <password> tags in the
dbconfig.xml file.
The other is to use the <datasource> tag. For example:
<database name="profiling/systables">
<datasource>
jdbc://user:password@jdbc:odbc:jreport-systables#driver=sun.jdbc.odbc.JdbcOdbcDriver
</datasource>
</database>
Here are two examples for your reference.
The following example is for Oracle. Modify the dbconfig.xml file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<dbconfig>
<workspace name="defaultRealm">
<database name="systables">
<user>test</user>
<url>
jdbc:oracle:thin:@dbhost:1521:ora9i
</url>
<password>1234</password>
<driver classpath="D:\DBDriver\Oracle\oracle9i\ojdbc14.jar">
oracle.jdbc.driver.OracleDriver
</driver>
</database>
</workspace>
</dbconfig>
The following example is for a DataDirect driver. Modify the dbconfig.xml file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<dbconfig>
<workspace name="defaultRealm">
<database name="systables">
<user>test</user>
<url>
jdbc:datadirect:sqlserver://dbhost:1433;DatabaseName=sysdb
</url>
<password>1234</password>
<driver classpath="D:\DBDriver\connectjdbc\lib\base.jar;
D:\DBDriver\connectjdbc\lib\util.jar;
D:\DBDriver\connectjdbc\lib\sqlserver.jar">
com.ddtek.jdbc.sqlserver.SQLServerDriver
</driver>
<dbtype>Microsoft SQLServer</dbtype>
</database>
</workspace>
</dbconfig>
Reference: For more information about the DataDirect driver, refer to DataDirect documentation.
Configuring the server database when integrating with an application server
JReport Enterprise Server supports connecting an RDBMS to access its system data via JDBC. The JDBC
configuration information is stored in the file dbconfig.xml in <install_root>\bin. You can create a
database connection according to this configuration file. Also, with the Java EE data source support
feature, in a Java EE environment, JReport Enterprise Server can get the predefined javax.sql.
DataSource by JNDI APIs.
Here, the term dsInfo is used to indicate where JReport Enterprise Server can obtain the JDBC
connection information. It is a key-value pair. The name and value for dsInfo are defined as below:
The name should be: jreport.datasource.<dbname>.
●
Where,
<dbname> is JReport Enterprise Server's inner database name. It must be systable or profiling. For
example, the dsInfo name is jreport.datasource.systables.
●
The value should be in the form of a URL. There are three protocols supported by JReport Enterprise
Server:
❍
file:///absolute_path_of_config_file
For example: file:///JReport/Server/bin/dbconfig.xml
❍
jdbc://[<jdbc-user:jdbc-password>@]<jdbc-url>[#<attribute-name=attribute-value>,]
For example: jdbc://user:password@jdbc:odbc:jreport-systables#driver=sun.jdbc.odbc.
JdbcOdbcDriver
❍
jndi://[<jdbc-user:jdbc-passoword>@]datasource_name[#<attribute-name=attributevalue>,]
For example: jndi://jdbc/jreport-systables
The dsInfo can be specified in several places or levels, such as VM properties, ejb-jar.xml, web.xml and
<install_root>\bin\dbconfig.xml. The sequence to load the information is:
VM system environment > ejb-jar.xml (EAR mode) > web.xml (WAR mode) > dbconfig.xml.
Notes:
●
●
●
The jreport.ear file that JReport Enterprise Server creates does not specify any Java EE information.
By default it will load from the dbconfig.xml file.
There is a limitation in WebSphere. JReport Enterprise Server's dsInfo can be configured to the WEBINF/web.xml with JNDI name but not RESOURCE name. JBoss works fine for either one.
Do not use reporthome, @ or # in the JNDI name or Resource name.
The following sections focus on specifying the dsInfo in web.xml, ejb-jar.xml, and dbconfig.xml:
●
Specifying data source in web.xml (for the WAR mode)
●
Specifying data source in ejb-jar.xml or web.xml (for EAR mode)
●
Specifying data source in dbconfig.xml
Specifying data source in web.xml (for the WAR mode)
When integrating the JReport Enterprise Server in a WAR package, you can specify the dsInfo in the
WEB-INF/web.xml file using the <env-entry></env-entry> or <context-param></context-param>
tags. However, the use of the <env-entry></env-entry> tags is the recommended way since the tags
are also supported in ejb-jar.xml (if you call the server API in your EJB).
The following is an example of specifying the dsInfo in WEB-INF/web.xml using the <env-entry></enventry> tags:
<web-app>
...
<env-entry>
<env-entry-name>jreport.datasource.systables</env-entry-name>
<env-entry-value>jndi://resource-name</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
</web-app>
The following is an example of specifying the dsInfo in WEB-INF/web.xml using the <context-param></
context-param> tags:
<web-app>
<context-param>
<param-name>jreport.datasource.systables</param-name>
<param-value>jndi://datasource_name_which_is_predefined</param-value>
</context-param>
...
</web-app>
Specifying data source in ejb-jar.xml or web.xml (for the EAR mode)
When the JReport Enterprise Server is used with APIs by EJBs, you can specify the dsInfo either in the
file ejb-jar.xml in /META-INF or web.xml in /WEB-INF.
For information about specifying a data source in the web.xml file, see section Specifying data source in
web.xml (for the WAR mode).
Note: If the dsInfo is stored in a Web module, you should add the JReport Enterprise Server context
listener to the WEB-INF/web.xml file. Here is an example:
<web-app>
<listener>
<listener-class>
jet.server.servlets.JRServerContextListener
</listnener-class>
</listener>
...
</web-app>
You can specify the dsInfo in the META-INF/ejb-jar.xml file using the <env-entry></env-entry> tags.
For example, here is an EJB named firstEJB which creates the JReport Enterprise Server instance. You
can add the <env-entry></env-entry> tags to the EJB's configuration file - META-INF/ejb-jar.xml as
follows:
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>firstEJB</ejb-name>
...
<env-entry>
<env-entry-name>jreport.datasource.systables</env-entry-name>
<env-entry-value>jndi://resource_name</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
</session>
...
</enterprise-beans>
...
</ejb-jar>
Specifying data source in dbconfig.xml
By default, JReport Enterprise Server assumes that jreport.datasource.systables=file:///${rpthome}/
bin/dbconfig.xml. You can specify either a JDBC or JNDI data source using the <datasource></
datasource> tags in the dbconfig.xml file.
For details about configuring the JDBC data source, see Configuring the server database in a
standalone environment.
The following is an example of specifying the JNDI data source:
<?xml version="1.0" encoding="UTF-8"?>
<dbconfig>
<workspace name="defaultRealm">
<database name="systables">
<datasource>jndi://datasource-name</datasource>
</database>
</workspace>
</dbconfig>
Creating tables in a specified table space
JReport Enterprise Server supports creating system tables in a user-specified table space in a database
that supports table spaces, such as DB2 and Oracle. A key-value pair tablespace is provided to specify
a table space into which JReport Enterprise Server will create system tables. This key-value pair is then
passed to JReport Enterprise Server through the JDBC configuration. JReport Enterprise Server
retrieves the table space information from the JDBC (data source) configuration, and then creates
tables in the specified table space.
Tablespace can be configured either in the dbconfig.xml file by using the <tablespace></tablespace>
tags, or in dsInfo by adding the attribute tablespace=table_space_name.
In dbconfig.xml
Add the <tablespace></tablespace> tags in the dbconfig.xml file as follows:
...
<database name="systables">
<driver classpath="...">jdbc_driver_name</driver>
<url>jdbc_url</url>
<user>jdbc_user</user>
<password>jdbc_password</password>
<tablespace>table_space_name</tablespace>
</database>
...
In dsInfo
Since the dsInfo supports JNDI and JDBC protocols, you can add the attribute
tablespace=table_space_name in the JNDI or JDBC statement.
●
jdbc://[<jdbc-user>:<jdbc-password>@]<jdbc-url>[#<attribute-name=attribute-value>,]
For example:
jdbc://user:password@jdbc:odbc:jreport-systables#driver=sun.jdbc.odbc.JdbcOdbcDriver,
tablespace=myTablespace
●
jndi://[<jdbc-user>:<jdbc-password>@]<datasource-name>[#<attri-name=attri-value>,]
For example:
jndi://jdbc/jreport-systables#tablespace=myTablespace
Schema support
JReport Enterprise Server supports DBMS schemas in order to work well with DBMSs that are currently
supported by JReport Enterprise Server and that support schemas. Those DBMSs include Oracle, DB2,
SQL Server, and Sybase. You can specify schema information either in the dbconfig.xml file using the
<schema></schema> tags, or in dsInfo by adding the attribute schema=schema_name.
Note: For Sybase, the schema name must use capital letters, for example, ABCDE.
In dbconfig.xml
Add the <schema></schema> tags in the dbconfig.xml file as follows:
...
<database name="systables">
<driver classpath="...">jdbc_driver_name</driver>
<url>jdbc_url</url>
<user>jdbc_user</user>
<password>jdbc_password</password>
<schema>schema_name</schema>
</database>
...
In dsInfo
Since the dsInfo supports JNDI and JDBC protocols, you can add the attribute
schema=schema_name in the JNDI or JDBC statement. The JNDI approach is only available when
deploying JReport Enterprise Server into a Java Application Server, not when it is running in standalone
mode.
●
jdbc://[<jdbc-user>:<jdbc-password>@]<jdbc-url>[#<attribute-name=attribute-value>,]
For example:
jdbc://user:password@jdbc:odbc:jreport-systables#driver=sun.jdbc.odbc.JdbcOdbcDriver,
schema=db2admin
●
jndi://[<jdbc-user>:<jdbc-password>@]<datasource-name>[#<attri-name=attri-value>,]
For example:
jndi://jdbc/jreport-systables#schema=db2admin
Configuring JdbcDriversConfig.properties
This document describes how to configure the file JdbcDriversConfig.properties in the <install_root>
\bin directory for better performance.
Limiting the size of the fetch data buffer
If you are using a database which supports the JDBC method Statement.setFetchSize(), you can
request the database retrieve a specified number of rows in each read instead of all rows which
minimizes memory usage which can improve performance. It can also avoid Java heap out of memory
errors when doing large queries. JReport provides a property setFetchSize in the JdbcDriversConfig.
properties file for you to do this.
The following is an example of setting the setFetchSize property in the JdbcDriversConfig.properties file
and detailed description of each property:
DriverName_D1 = MySQL-AB JDBC Driver
Vendor_D1 = MySql.com
Version_D1 = 3.0.8-stable ( $Date: 2003/05/19 00:57:19 $, $Revision: 1.27.2.18 $ )
setFetchSize_D1 = 5000
DriverName_[Name]
Database driver name that should be used to establish a connection. You can use connection.
getMetaData().getDriverName() to obtain the value.
Vendor_[Name]
The vendor of current JDBC driver. It is a string value.
Version_[Name]
The version of current JDBC driver. You can use connection.getMetaData().getDriverVersion() to obtain
the value.
setFetchSize_[Name]
The number of rows retrieved in each buffer from the database. It is an Integer value that should be
larger than 0 and less than or equal to getMaxRows(). The default value is different according to the
driver in use. You can refer to your own database driver specification.
_[Name]
It is a user-defined name used to mark a group of driver settings different from the other groups.
Specifying where to implement the maximum query run time and number of records
In the JdbcDriversConfig.properties file, you can also specify where the properties, Maximum Rows and
Maximum Duration will be implemented, on JReport side or on the database side. For details about
usage of these two properties, see Limiting the query run time and number of records in the
Queries chapter of the JReport Designer User's Guide.
The following is an example of setting the two properties:
DriverName_D2 = Oracle JDBC driver
Vendor_D2 = Oracle
Version_D2 = 9.2.0.3.0
supportMaxRowPushDown_D2 = true
supportMaxDurPushDown_D2 = true
DriverName_[Name]
Database driver name that should be used to establish a connection. You can use connection.
getMetaData().getDriverName() to obtain the value.
Vendor_[Name]
The vendor of current JDBC driver. It is a string value.
Version_[Name]
The version of current JDBC driver. You can use connection.getMetaData().getDriverVersion() to obtain
the value.
SupportMaxRowPushDown_[Name]
Specifies where the property Maximum Rows will be implemented, on JReport side or on the database
side. By default, it is set to true, which means the property will take effect on the database side. If it is
set to false, the property will take effect on JReport side.
SupportMaxDurPushDown_[Name]
Specifies where the property Maximum Duration will be implemented, on JReport side or on the
database side. By default, it is set to true, which means the property will take effect on the database
side. If it is set to false, the property will take effect on JReport side.
_[Name]
It is a user-defined name used to mark a group of driver settings different from the other groups.
Canceling running query
If your JDBC driver support the Cancel Running Query feature and you want JReport to cancel the
running query used by a report in the database when you cancel the running task of the report, for
example, when you click the Cancel button on the report processing page of JReport Web, or when you
choose to stop a report running in background mode, configure the file JdbcDriversConfig.properties as
follows:
1. Add the JDBC driver you use into JdbcDriversConfig.properties if it is not listed there.
2. In the file JdbcDriversConfig.properties there is a line:
#supportCancelQueryStatement_D5=true
Remove the sign # and use your driver number instead of D5 to activate the feature.
3. Restart your JReport Enterprise Server, then the next time, when you choose to cancel a running
task, the query used by the report set will also be cancelled in the database, provided that the
DBMS supports this action.
Notes:
●
●
●
After you modified the JdbcDriversConfig.properties file, you need start the server to load the
changes.
If there are more than one group with the same group marking name, the last group will be adopted.
If the sign # is seen before "DriverName" of a group, or if setFetchSize is given a negative value, the
whole group will be disabled.
Configuring another connection as a substitute for the catalog
connection
Normally, after a report set has been created, it is fixed to a specific catalog connection. With the Java
EE data source support feature, you can change to another runtime JDBC or JNDI data source to run
report sets.
This allows you to control the catalog data source connections in JReport Enterprise Server to connect
dynamically to your production data sources.
This section focuses on the following:
●
Configuring the datasource.xml file
●
User name and password Encryption
●
The connection priority
●
Reloading connection information from datasource.xml
●
Integrating JReport Enterprise Server with your Java application server
●
Example 1: Using JNDI data source connections of WebLogic Server
●
Example 2: Using JNDI data source connections of JBoss server
Configuring the datasource.xml file
In order to enable you to conveniently set different connections in JReport Enterprise Server, a
configuration file, datasource.xml, is provided with which you can define the connection to use at
runtime by setting up connection mapping information such as the JDBC driver, URL, or JNDI data
source name, user and password, depending on the data source your application uses.
The datasource.xml file is located in the <install_root>\bin directory. Change this file according to
the data source you want to use. Two types of connections are supported by JReport Enterprise Server.
They are JNDI data source connection and JDBC connection.
The content of the datasource.xml file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<datasource-mapping>
<datasource>
<catalog-connection-name>Connection1</catalog-connection-name>
<connection-type>JNDI</connection-type>
<jndi-datasource>Sample</jndi-datasource>
</datasource>
<datasource>
<catalog-connection-name>Connection2</catalog-connection-name>
<connection-type>JDBC</connection-type>
<driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
<url>jdbc:odbc:jinfonet</url>
<user>Username</user>
<password>Password</password>
</datasource>
</datasource-mapping>
Element descriptions
●
●
●
●
catalog-connection-name
Specifies the name of the catalog connection that you want to substitute. Note that this is the
connection name that you can see in JReport Catalog Browser. A unique connection name in a
catalog is suggested.
connection-type
Specifies the connection type, which can be either JNDI or JDBC.
jndi-datasource
If you are using a JNDI data source, specify the JNDI data source name you defined in your Java
application server which you want to use as the substitute connection.
driver & url
If you are using a JDBC data source, specify the JDBC Driver and URL in these two attributes.
Notes:
●
There can be multiple <datasource></datasource> tags. Each pair will map one of the connections
in your catalog. You can define mapping connections for multiple connections for more than one
catalog. The catalog connection name should be unique in the datasource.xml file, otherwise the
latter <datasource> information will overwrite the previous ones.
●
You can choose whether to provide database user and password information for the JNDI connection,
using the user and password attributes. If the user and password information is provided in this file,
it will be used to set up the connection regardless of the settings defined in your application server.
Otherwise, the settings defined in your application server will be used. Specially, for WebLogic users,
you should provide user name and password for WebLogic console instead of the database.
User name and password encryption
Once the user and password are provided in the datasource.xml file, they will be encrypted into one
line, which will be like the following:
<encrypt-sign>enDkq7srM9cHhoUwzYXJ3NvcDIYk</encrypt-sign>
If you want to change the user name and password information, just remove this line and type the new
information again.
The connection priority
If you are using a catalog connection, datasource.xml, and at the same time, you have set new
connection information via the server API/URL ((jrs.jdbc_driver, jrs.jdbc_url, jrs.db_user, jrs.db_pswd),
the priority of these three is as follows:
Server API > datasource.xml > catalog connection
This means that if the approach with higher priority fails to get the connection, the one with the next
lower priority will be used.
Reloading connection information from datasource.xml
After you have made changes to the datasource.xml file, you need to reload it in JReport Enterprise
Server. This file can be reloaded using the following ways:
●
●
●
Call jet.server.api.admin.ConnectionInfoProviderService.reloadFile().
Log onto the JReport Administration page, go to Configuration > Connection tab, and then click
the Reload button.
Restart JReport Enterprise Server.
Integrating JReport Enterprise Server with your Java application server
After updating the datasource.xml file, you can integrate JReport Enterprise Server with your
application server.
If you are using a WAR file, make sure that the datasource.xml file is included in the WAR file. Before
making the JReport Enterprise Server WAR file, in makewar.xml in the <install_root>\bin directory,
add <include name="datasource.xml" /> into the <zipfileset dir="${installroot}/bin"
prefix="workspace/bin"> section. Before you deploy the WAR file to a web server, make sure that
the datasource.xml file is included in the jreport.war/WEB-INF/lib/jrenv.jar/workspace/bin
directory.
If you are integrating JReport Enterprise Server to an application using a non-JReport WAR file, usually
you need to specify the -Dreporthome parameter in the application server so that the application server
can locate and load the resources it needs. Since the datasource.xml already exists in the bin directory,
you do not need to do anything special for this file.
Example 1: Using JNDI data source connections of WebLogic Server
Using WebLogic as an example, take the following steps:
1. Start WebLogic server, navigate to <YourProjectName> > Services > JDBC > Connection Pools. In
the Configuration tab, make sure that the connection you are going to use is there and correctly
set up.
2. Browse to <YourProjectName> > Services > JDBC > Data Sources. In the Configuration tab,
create a data source using the JNDI name MyJNDISample. Select the correct connection from the
Pool Name drop-down list.
3. Open datasource.xml in the <install_root>\bin directory and add:
<datasource-mapping>
<datasource>
<catalog-connection-name>ConnectionName</catalog-connection-name>
<connection-type>JNDI</connection-type>
<jndi-datasource>MyJNDISample</jndi-datasource>
<user>youruserid</user>
<password>yourpassword</password>
</datasource>
</datasource-mapping>
4. Build the JReport Enterprise Server WAR file using the makewar utility in the <install_root>\bin
directory.
5. Deploy JReport Enterprise Server to WebLogic.
6. Run the report set that uses this connection.
Example 2: Using JNDI data source connections of JBoss server
Using JBoss as an example, in this Example, DB2 is used, and JBoss is installed to D:\jboss-4.0.1,
take the following steps:
1. Copy the DB2 driver to D:\jboss-4.0.1\server\default\lib.
2. Create a db2-ds.xml file in D:\jboss-4.0.1\server\default\deploy, and add the following
content:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>DB2DataSource</jndi-name>
<connection-url>jdbc:db2://dbs-b/sample</connection-url>
<driver-class>COM.ibm.db2.jdbc.net.DB2Driver</driver-class>
<user-name>db2admin</user-name>
<password>db2admin</password>
<min-pool-size>0</min-pool-size>
<metadata>
<type-mapping>DB2</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
3. Modify datasource.xml in <install_root>\bin. Make sure that the following are included:
<datasource-mapping>
<datasource>
<catalog-connection-name>ConnectionName</catalog-connection-name>
<connection-type>JNDI</connection-type>
<jndi-datasource>java:/DB2DataSource</jndi-datasource>
</datasource>
</datasource-mapping>
4. Build the JReport Enterprise Server WAR file using the makewar.bat utility in the <install_root>
\bin directory.
5. Deploy JReport Enterprise Server to JBoss.
6. Run the report set that uses this connection.
Configuring connection pool
If you have used SQL or other similar tools to connect to a database and act on data, you probably
know that getting the connection and logging in is the part that takes the most time. A program can
spend several seconds every time it needs to establish a connection. To improve performance, JReport
Enterprise Server supports caching a connection, so that it can be used each time the same user
accesses the same table. Cached connections are kept in the connection pool and can be used and reused as required. Therefore, JReport Enterprise Server is freed from having to create the connection to
the database, leading to a considerable saving of time.
If you want to improve the performance of JReport Enterprise Server, you can configure a connection
pool using the ConnectionPoolConfig.properties file in the directory <install_root>\bin. The following
is an example of the ConnectionPoolConfig.properties file and detailed description of each property in
the file:
# jdbcpool configure information
URL1=jdbc:odbc:Jinfonet
Expire_URL1=0
IdleExpire_URL1=1
MaxCount_URL1=0
MaxShare_URL1=0
Attempt_URL1=1
Interval_URL1=0
URL
JDBC URL that can establish a connection to your database.
Expire_URL
You can define how long in seconds it takes for an active connection to expire. The value for this
property by default is "0", which means that the active connection will not expire.
IdleExpire_URL
You can define how long a free connection can be idle before it is closed. The connection will not be
released until the defined time has reached its limit. The value for this property by default is "1", which
means that the connection will be released after 1 second. If the value is "0", the connection will be
closed right after it starts idling.
MaxCount_URL
The maximum number of connections based on the URL. The value for this property by default is "50".
Once the number of the connections reaches the maximum, a new connection will be blocked until a
free connection becomes available. Generally speaking, the fewer the connections, the better the
performance of JReport Enterprise Server. If the value is set to "0", it means that there will be no limit
on the number of the connections.
MaxShare_URL
The maximum number of requests in one connection that can be executed simultaneously. Once the
number of the requests reaches the maximum, a new connection will be created to connect to the
database. The value for this property by default is "1", which means that one request in one connection
can be executed simultaneously. The smaller the number of requests, the better the performance of
JReport Enterprise Server. If the value is set to "0", it means that there will be no limit to the
maximum number of requests sharing one connection and that all the requests in one connection can
be executed simultaneously.
Since the property MaxShare_URL* and MaxCount_URL* are incompatible, you should make a balance
between these two properties to achieve the best performance of JReport Enterprise Server.
Attempt_URL
This property has a close relation to the property MaxCount_URL*. Once the number of the connections
reaches the maximum, a new connection will be blocked until a free connection becomes available. To
make the maximum use of the available connections in the pool, the property Attempt_URL* allows
you to set how many times the engine will try to establish a new connection. The default value for this
property is "1", which means that the engine will only try once to create a new connection.
Interval_URL
The interval the engine will wait for between attempts to create a new connection if a previous try has
failed. The default value for this property is "0", which means that the engine will start the next
attempt immediately. The unit of the property value is milliseconds.
Notes:
●
●
You are forced to give a value to the property URL in order to establish a connection to the database.
For the other six properties which configure the URL, it is not necessary to set their property values
(the default values will be used).
getConnectionPool.jsp is still available for customers who have updated JReport Enterprise Server
from earlier versions. It is now deprecated in the current version. getConnectionPool.jsp is used for
viewing connection information and for deleting unused connection information. You can gain access
to it using the URL http://localhost:8889/admin/getConnectionPool.jsp.
Configuring logs
JReport provides a robust, flexible and configurable logging system, which is based on log4j version
1.2.8. JReport also supports versions of log4j version 1.2.8 to 1.3alpha7.
The logging system is used for obtaining meaningful and helpful JReport logging information in a
convenient way. It is easy to configure and manage. The following are the significant benefits of the
JReport logging system:
●
●
●
It is compatible with your application which is based on log4j.
It can be configured to output the logging information of different modules separately or to output
them all together.
It supports setting the trace and error type level separately.
Configuring logs
Log configuration tasks can be achieved in three ways. They are:
●
Using the Log tab on the JReport Administration > Configuration page.
●
Using the LogConfig.properties file located in <install_root>\bin directory.
●
Using command options.
In comparison with earlier versions, the command options used for log configuration have undergone
a considerable change. The following are descriptions of these options:
Options
Description
-vDebug
Enables JReport Engine to output messages to a file and sets all log files' trace
levels to INFO and error levels to WARN.
-vError
Enables JReport Engine to output messages to a file and sets all log files' trace
levels to OFF and error levels to ERROR.
-logall
Sets all loggers' trace level to INFO and error level to WARN.
-log[:file Name]
Outputs JReport Engine messages to the file as specified and uses the -vDebug
level.
Note: Any settings made using the command options will override the trace and error type level
settings in the LogConfig.properties file.
Logging information using the trace and error type
The JReport logging system enables you to trace both normal and abnormal situations by using the
trace and error type. Trace is used for logging something expected or regular, such as tracing a
program workflow, logging runtime information and associated elements. Error is used for logging
something unexpected or irregular. For example, when a URL is unreachable, a file does not exist, or a
table cannot be found in a data source.
Trace type is divided into four levels, and is ordered according to the amount of information logged,
from the least to the most. These levels are OFF, OUTLINE, INFO, and TRIVIAL. Similarly, error type is
also divided into four levels, and is ordered according to the amount of information logged, from the
least to the most. These levels are OFF, FATAL, ERROR, and WARN. For detailed information about the
eight levels, see Log tab.
If you want the least amount of information to be logged, you can set trace level to OFF and error level
to ERROR. If you want the most amount of information to be logged, you can set trace level to TRIVIAL
and error level to WARN. Setting these to the highest level could affect system performance as well as
disk usage.
Customizing log file location
You can customize where to output logs in your local disk instead of using the default directory
<install_root>\logs.
By default, different log categories are output to different rolling files. For example, the Engine log is
output to Engine.log in the <install_root>\logs directory. If you want to customize the location of
the Engine log file, take the following steps:
1. Open the LogConfig.properties file located in the <install_root>\bin directory.
2. Modify the parameter log4j.appender.EngineRollingFile.File. Set its value to an absolute path with
a log file name, for example: C:\logs\Engine.log (on Windows) or /logs/Engine.log (on
Linux/UNIX).
3. Save the LogConfig.properties file.
4. Restart JReport Enterprise Server.
Configuration settings - effect on performance
The following are configuration properties which have an effect on server performance:
●
●
●
If the showTitle property is set to true in the LogConfig.properties file, the log file size will increase.
However, the effect on performance is negligible.
The levels of trace and error affect the amount of logging output. The higher the level, the more the
output. The settings for error level will have a negligible affect on performance but a high level for
trace may affect performance.
The use of the following conversion characters in ConversionPattern property results in the slow
generation of caller class or location information: %C, %F, %L and %M. Their use should be avoided
unless execution speed is not an issue. For information about the ConversionPattern property, see
comments in the LogConfig.properties file, which is located in the <install_root>\bin directory.
Managing
The administration task in JReport Enterprise Server consists of six major parts. They are management
of resources, versions, security, tasks, server data and clusters. This chapter discusses these six task
types in detail. After going through these topics, you will be able to manage your JReport Enterprise
Server more effectively.
●
Managing resources
●
Managing versions
●
Managing security
●
Managing tasks
●
Managing server data
●
Managing JReport Enterprise Server clusters
Managing resources
Resources on JReport Enterprise Server are organized into a tree structure called the Resource Tree.
Only the resources that are organized in the resource tree can be accessed and queried by a client.
You can perform basic resource tasks, such as publishing, deleting, getting resources from a real path,
and more advanced tasks, such as changing resource and folder properties. Moreover, you can also
manage the versions and secure your resources. Detailed information is available in sections Managing versions and Managing security.
This section includes the following topics:
●
Publishing resources
●
Converting reports of earlier versions into current version
●
Updating a catalog's business cube permission
●
Getting and using resources from a real path
●
Customizing TTF font location for reports
●
Changing resource and folder properties
●
Deleting resources
Publishing resources
Before you can perform any tasks on JReport Enterprise Server, you first need to have your resources
published and organized. There are several ways to publish resources (catalogs, report sets, and
folders).
There are three ways of publishing resources:
●
Publishing resources using JReport Designer
●
Publishing resources from a local computer
●
Publishing resources from a remote computer
Note: After resources have been delivered to JReport Enterprise Server, you may find that the publish
time shown on Server UI is different from the client time. That is because the publish time takes the
server time instead of the client time.
Publishing resources using JReport Designer
You can directly publish your report sets or catalogs from JReport Designer to JReport Enterprise
Server. For detailed information, see the topic Publishing resources remotely in the JReport
Designer User's Guide.
Publishing resources from a local computer
You can publish three types of resources from a local computer. They are report sets, catalogs, and folders.
To publish resources from a local computer:
1. Do either of the following to access the Publish to Local Server dialog:
❍
❍
For administrators, on the JReport Administration > Reports page, browse to the folder where you want to publish the
resources, then click the Publish to Local Server link.
For end users, on the JReport Console > Reports page, browse to the folder in which to publish the resources, then click
Publish > Publish to Local Server on the task bar of the Reports page.
The Publish to Local Server dialog is then displayed.
2. Select a type from the Resource Type drop-down list. Make sure that the resources exist in the resource real path.
3. Click the Browse button to specify the folder where the resources you want to publish are saved.
4. Specify a name in the Resource Node Name box. This name is required and is used as the display name of the resource node
in the server resource tree.
5. Type a brief description to describe the resources in the Resource Description box.
6. To enable getting resources from a real path, check the Enable Resources from Real Paths option, and then type a path in the
Resource Real Path box.
If you are publishing a folder in the cluster environment, it is recommended that you check the Map Shared Disk option for
better performance.
7. To apply the archive policy to the resources that you are publishing, check the Apply Archive Policy option.
If you want the resources to have multiple versions, check the Archive as a new version option, and then specify a maximum
number for the amount of version copies. By default the number of version copies is unlimited.
Note that a folder by itself does not have versions; the archive policy specified for a folder applies to the folder contents.
8. To enable user permissions, click the Set Permissions link. Permissions that can be specified to a user or role include:
Visible, Read, Write, Execute, Schedule, Delete, and Grant.
9. Click the Browse button to specify a font directory for the resources.
10. Click the Browse button to specify a style directory for the resources.
11. If you want to use advanced publish, go to the next step. Otherwise go to step 17.
12. Click the Advanced Publish button. All sub folders and report sets contained within the resource folder will then be displayed
in Advanced Publish mode.
13. Change the resource node names if necessary in the Resource Node Name box by entering a new name in the box.
14. Give a brief description for the resources in the Resource Description box.
15. Click the Advanced button to apply an archive policy to each folder or report set.
16. Check the box ahead of the folders or report sets to have them published.
17. Click OK to start publishing the resources.
To clear all the filled contents and reset this tab to its original status, click Reset.
Note: The Publish to Local Server option is always available to administrators on the JReport Console page. For end users, the
option is displayed only when he/she has the privilege of publishing resources and has logged onto JReport Enterprise Server from
a local browser.
Publishing resources from a remote computer
You can publish three types of resources from a remote computer. They are report sets, catalogs, and folders. Before they can be
published you must create a zip file or tar file containing the resources to publish. If you want to publish resources from a remote
machine to the server, use Publish to Remote Server.
To publish resources from a remote computer:
1. Do either of the following to access the Publish to Remote Server dialog:
❍
❍
For administrators, on the JReport Administration > Reports page, browse to the folder where you want to publish the
resources, then click the Publish to Remote Server link.
For end users, on the JReport Console > Reports page, browse to the folder in which to publish the resources, then click
Publish > Publish to Remote Server on the task bar of the Reports page.
The Publish to Remote Server dialog is then displayed.
2. Click the Browse button to specify the zipped file which contains the resources to publish.
3. Check the Publish files and folders in the zipped file to /USERFOLDERPATH/admin without creating a folder with
the name of the zipped file box, if you want this option.
4. Specify a name in the Resource Node Name box. This name is required and is used as the display name of the resource node
in the server resource tree.
5. Type a brief description to describe the resources in the Resource Description box.
6. To enable getting resources from a real path, check the Enable Resources from Real Paths option, and then type a path in the
Resource Real Path box.
If you are publishing a folder in the cluster environment, it is recommended that you check the Map Shared Disk option for
better performance.
7. To apply an archive policy to the resources you are publishing, check the Apply Archive Policy option.
8. To enable user permissions, click the Set Permissions link. Permissions that can be specified for a user or role include:
Visible, Read, Write, Delete, Execute, Schedule, and Grant.
9. Click OK to start publishing the resources.
If you want to use Advanced Publish, click the Advanced Publish button. All sub folders and report sets contained within the
resource folder will then be displayed in Advanced Publish mode.
Note: When publishing resources from a remote computer, the process is similar to that for a local publish. However, there are
differences. They are:
●
●
Local Publish publishes resources from the machine where the server runs, while a Remote Publish publishes resources from a
client machine using a web browser to the machine where the server runs.
The resource type of Remote Publish can ONLY be a compressed file. You should compress the report set and catalog files in
advance. There are two approaches to building a compressed file.
❍
You can compress the resources manually using a third-party tool, such as Winzip and gzip.
❍
You can use jar.exe that the JSDK provides to build a compressed jar file directly. Use the command as follows:
%JAVAHOME%\bin\jar.exe -cvfM %DEST_JAR_FILE% %SOURCE_RESOURCES%
Parameter
Description
%JAVAHOME%
The Java SDK install root.
%DEST_JAR_FILE%
The destination file path and file name. The .jar file will be generated to the path you specify
here, using the file name you provide.
%SOURCE_RESOURCES%
The source file path and file name. Note that specifying a path for this parameter will cause the
generated jar file to contain the same path information. For example, when you extract a jar file
compressed using myReports\*.* for this parameter, the files will be extracted to a folder called
myReports. JReport Enterprise Server is not able to import a compressed file which contains the
path information, so do not specify a path for this parameter.
To generate a jar file containing no path information, switch to the source folder, and then carry out the compression. For
example,
C:\myReports>C:\j2sdk1.4.1_02\bin\jar -cvfM c:\temp\aa.jar.
The jar file will be generated to c:\temp, as aa.jar, compressing all the files in c:\myReports, and containing no path
information.
Always use this method if the folder you are compressing contains report sets with Chinese, Korean, or Japanese names.
Converting reports of earlier versions into current version
If your JReport product has been updated from a version earlier than V9, when running reports of the
earlier version, you may encounter decreased performance due to the JReport Engine having to first
convert the earlier version report into a current version report set before running the report. In order
to enhance performance, JReport Enterprise Server allows administrators to permanently convert
reports of earlier versions in the server resource tree to adapt to the current version.
Report converting applies to reports of all previous server versions.
Converting via the Administration UI
The converting UI is available to administrators only. It is used to convert all old reports in the My
Reports folder or Public Reports folder. The converted report sets are stored in the same directory.
To convert reports of earlier versions into current version:
1. On the JReport Administration > Reports page, switch to the Converting tab.
2. Specify the folder(s) which contain(s) the reports you want to convert.
3. Specify how to save the converted reports.
❍
❍
Replace the Old Repors
Specifies to replace the old reports with the converted report sets.
Save as Ad Hoc Report Versions
Specifies to save the converted report sets as new report set versions in the resource tree.
4. When done, click OK to start converting.
Converting using tool
You can also use rptconv.bat/rptconv.sh located in the <install_root>\bin directory to convert a
report and a type of reports or all reports in a directory.
Updating a catalog's business cube permission
When a catalog is published to JReport Enterprise Server, you can update the catalog's business cube
permission settings by uploading the updated authorization file from JReport Designer without republishing the catalog. To do this:
1. First you should have set cube permissions in the catalog using JReport Designer. In this case,
when you save the catalog, the permission settings are also saved and they are saved in an
authorization file in the same folder as the catalog file. The catalog and authorization files have
the same file name but different suffixes, for example, if the catalog file is called test.cat, the
authorization file is called test.auth. The authorization file is loaded by the cube authorize
manager of its catalog during runtime.
2. If the catalog is not modified, you can only update the authorization file to update the permission
settings either using JReport Designer or by hand.
3. After you have updated the authorization file in JReport Designer, upload it to JReport Enterprise
Server from the JReport Administration page if you are an administrator:
a. In the Reports page, browse to the row the catalog is in, then click the Cube Security button
in the Control column.
b. In the Cube Security dialog, first select a catalog version, and then select the updated
authorization file using the Browse button.
c. Click OK to apply the settings.
The updated authorization file will be uploaded to JReport Enterprise Server and replace the old file.
Then the server will invoke the method of the cube authorize manager to reload all the permission
settings, and the permission settings will take effect right after reloading.
Getting and using resources from a real path
Not only can you use the published resources described in section Publishing resources, but also those
resources obtained from a real path. The difference between real path resources and published
resources lies in the way of managing them. Published resources are managed in JReport Enterprise
Server totally. Real path resources are managed in both the server and OS system. In the server, when
accessing a resource node which is linked with a real path, the local resources in the real path are
loaded to the node and displayed together with other server resources (including the published
resources) in the node. You cannot delete the real path resources directly from the server UI, but can
only achieve it by removing the resources from the local disk.
To use real path resources, you should specify a real path for a virtual folder. You can then add or
remove resources into or from JReport Enterprise Server by adding or removing them into or from the
real path. Also, if you do not want to publish report sets to the server by using the publish feature, you
can set a real path instead.
The following example uses the resources in the folder /SampleReports obtained from the real path:
1. On the JReport Administration > Configuration page, check the Enable Resources from Real
Paths option in the Advanced tab, save the changes and then restart the server.
2. Open the Properties dialog of the folder /SampleReports, check Enable Resources from Real
Paths, specify a real path for the demo virtual folder as C:\JReport\Server\reportbak, then
click OK to save the changes.
3. In the Windows directory C:\JReport\Server\reportbak, create three sub directories report1,
report2, and report3, and then copy some report sets and catalogs into them.
4. On starting JReport Enterprise Server, click the virtual folder /SampleReports. You will then see
the three sub folders: report1, report2, and report3 within it, including their report sets and
catalogs.
Now end users can perform operations on the real path resources, including running, advanced
running, scheduling, viewing versions and setting properties.
Notes:
●
You cannot publish resources from real path.
●
You cannot use a real path resource as an archive location.
●
●
The relationships of folder real paths do not need to be consistent with that of the resource tree
folders. That is, they are independent of each other. For example, in the resource tree, the folder
ABC, whose real path is C:\FolderABC, has a sub folder DEF. The real path of DEF need not
necessarily be a folder in C:\FolderABC. It can be any folder.
After using the real path resources, under certain special conditions some invalid nodes will be
generated in the server databases. In order to delete the invalid nodes, administrators can perform
the corresponding option on the JReport Administration page to clear unused nodes from the internal
JReport Enterprise Server database. For details, see Clearing unused nodes from the system
database.
Setting a default real path for the Public Reports folder before the server starts
JReport Enterprise Server enables setting a default real path for the Public Reports folder without
having to log onto the server. There are two ways to achieve this goal: setting the real path during or
after installation.
●
Setting during installation
1. When installing JReport Enterprise Server using the Installation Wizard, select the installation
type Custom Installation for Standalone Server.
The Configuration screen is then available for you to configure the server properties.
2. In the screen, select Advanced from the left panel.
3. Check the Enable Resources from Real Paths option, and then type in a path in the Public
Reports Real Path text field or specify a path using the Browse button.
4. Upon completion of the installation, an install.server.properties file will be created in the
<install_root>\bin directory. When the server starts, it retrieves the file contents, and then
sets the real path for the Public Reports folder. Note that the file is deleted after the server has
loaded the file contents.
●
Setting after installation
If you want to set a default real path for the Public Reports folder after installation, you can create an
install.server.properties file in the <install_root>\bin directory manually. Specify the content in
the file as follows:
server.publicReportsRealPath=D:\JReport
Customizing TTF font location for reports
The default font path in JReport Enterprise Server is <install_root>\font. You can set the font path
to a different location by using the following three ways. These are in an order from higher to lower
priority:
●
Use the -D parameter to set the system properties key jreport.server.font.path
●
Use the API HttpUtil.initEnv() to set the properties key server.font.path
●
Add a property server.font.path in the server.properties file and set a full path to it.
Notes:
●
The value specified by -D is not stored into the server.properties file.
●
The value specified using API is stored into the server.properties file.
Changing resource and folder properties
To change the properties of a resource or folder:
For administrators, on the JReport Administration > Reports page, browse to the row that the
●
resource or folder is in, then click the Properties button
dialog, change the settings as required.
●
in the Control column. In the Properties
For end users, on the JReport Console > Reports page, select the row that the resource or folder is
in, then click Edit > Properties on the task bar of the Reports page (or right-click in the row and
select Properties from the shortcut menu). In the Properties dialog, change the settings as required.
See also Properties dialog - folder and Properties dialog - report set for details about the property
settings.
Assigning permissions
Permissions, associated with resources and folders, are the rules granted to users which control their
access to resources and folders.
After you have set permissions for a parent folder, any new resources and sub folders created in that
folder will inherit the same permissions. If you do not want them to inherit these permissions, you can
enable their user permissions and set their permissions separately. Resources and folders will inherit
permissions from their parent folder if their user permissions are not enabled.
To set, view, change, or remove resource/folder permissions:
●
For administrators, in the Properties dialog, click the Set Permissions link, then in the Set
Permissions dialog,
❍
❍
To remove resource/folder permissions for all users, groups and roles, uncheck the Enable
Setting Permissions option.
For end users, in the Permissions tab of the Properties dialog,
●
❍
❍
●
To set up or change permissions for a role, user or group, check Enable Setting Permissions,
select the user, group, or role in the Role Permissions, User Permissions, or Group Permissions
table, and then check or uncheck each permission as required. If the user, group or role is not
listed in the corresponding table, click the Add button to add it and then assign the permissions
accordingly.
To set up or change permissions for a role, user or group, first check Enable Setting
Permissions, then select the role/user/group in the Selected box and check or uncheck the
required permissions. If the role/user/group is not listed in the Selected box, select the
corresponding radio button below the Available box, add the role/user/group to the Selected box
and then assign the permissions accordingly.
To remove resource/folder permissions for all users, groups and roles, uncheck the Enable
Setting Permissions option.
Security permissions do not apply to the built-in version folders, the My Reports folder, and their
contents.
●
●
●
●
●
To complete a task, you may require more than one permission. For example, to view the properties
of a report set, you must have both the Visible and Read permissions.
Some permissions depend on other permissions in order to work, such as Write, Execute, and
Schedule. Allowing anyone of these will also allow the Read permission.
Some special permissions, such as Execute and Schedule, only apply to the report set type resource.
Only members in the administrator role can assign the Grant permission to other users or groups or
roles. The Grant permission is endowed with the other six permissions - Visible, Read, Write, Delete,
Execute, and Schedule. Users, groups or roles that have obtained the Grant permission can then
grant these six permissions, but not the Grant permission itself.
Users that are given the Grant permission can grant permissions to other users in the same group.
Deleting resources
To delete a resource or folder:
●
For administrators, on the JReport Administration > Reports page, browse to the row that the
resource or folder is in, then click the Delete button
●
in the Control column.
For end users, on the JReport Console > Reports page, select the row that the resource or folder is
in, then click Edit > Delete on the task bar of the Reports page (or right-click in the row and select
Delete from the shortcut menu).
Notes:
●
●
The Public Reports folder and My Reports folder cannot be deleted.
Deleting a resource or folder removes the resource or folder from disk. The deleted resources and
folders cannot be retrieved. Any relevant versions belonging to the resource will also be deleted.
Managing versions
Your resources might change over time. JReport Enterprise Server uses a versioning system to create
and manage resources that have changed in content and properties owing to updates made to them.
All the resources in the server resource tree: report set resources, catalog resources and report set
result resources, are controlled by versions. A great proportion of resource management tasks are
carried out by managing resource versions.
This section shows how to manage resource versions as follows:
●
Creating versions
●
Browsing versions
●
Applying an archive policy
●
Deleting versions
●
Advanced version topics
Creating versions
Generally, report set result versions are created when an end user runs a report set in Advanced Run
or Schedule mode. However, to create a new version for a report set or catalog, you have to publish a
report set or catalog respectively from outside of JReport Enterprise Server, and then make the old and
the new share one common resource node.
Creating report set/catalog versions
The method for creating versions for report set and catalog are the same:
1. Access the publish dialog using either of the following ways:
❍
❍
For administrators, on the JReport Administration > Reports page, open the folder that contains
the report set/catalog for which you want to create a new version, then click the Publish to
Local Server or Publish to Remote Server link.
For end users, on the JReport Console > Reports page, open the folder that contains the report
set/catalog for which you want to create a new version, then click Publish > Publish to Local
Server/Publish to Remote Server.
2. In the corresponding publish dialog, select Report Set/Catalog from the Resource Type dropdown list.
3. Fill in the path and name of the to-be-published report set/catalog in the From File text box.
4. In the Resource Node Name box, type the name of the resource node for where you want to
create the new version to. The name you provide must be exactly the same as the original
resource node name.
5. Apply an archive policy to the report set/catalog version.
6. Fill in other relevant information as required.
7. Click OK to publish the report set/catalog (for details about publishing resources from a local or
remote computer, see Publishing resources).
The report set/catalog will then be added to the server resource tree, and serve as a version of the
report set/catalog.
Note: In order to perform operations on catalogs published from outside of JReport Enterprise Server,
you need to enable them to be displayed on the server resource tree by setting the web.page.option.
show_catalog property to true in the server.properties file. Then the catalogs will be displayed in the
resource tree, and you can view their corresponding versions and properties.
Creating report set result versions
A report set result version can only be created by advanced running the report set or by scheduling the
report set to publish it to the versioning system on the JReport Console page.
●
When advanced running a report set, in the Archive tab of the Advanced Run dialog,
1. Specify where to save the result version by setting the Archive Location option.
■
■
To generate the report set result version in the built-in folder, select Built-in Version Folder.
To generate report set result version in a standalone resource node in the resource tree,
select The My Reports folder or The Public Reports folder, and then provide the path and
resource name information in the corresponding box.
2. Apply an archive policy to the version as required and submit the task.
Then, when the report set finishes running, a report set result version will be generated to the
location specified.
●
When scheduling a report set to publish it to the versioning system, in the Publish > To Version tab
of the Schedule dialog
1. Specify where to save the result version by setting the Archive Location option.
■
■
To generate the report set result version in the built-in folder, select Built-in Version Folder.
To generate report set result version in a standalone resource node in the resource tree,
select The My Reports folder or The Public Reports folder, and then provide the path and
resource name information in the corresponding box.
2. Apply an archive policy to the version as required and submit the task.
Then, when the schedule task is finished, a report set result version will be generated to the location
specified.
Notes:
●
●
●
●
The resource path and name refers to the resource path and name in the resource tree. For
instance, /foldername/filename.
For The Public Reports folder option, the first slash mark (/) refers to the Public Reports folder in the
resource tree, and the folder name (foldername) refers to an existing folder in the resource tree.
For The My Reports folder option, the first slash mark (/) refers to the My Reports folder in the
resource tree, and the folder name (foldername) refers to an existing folder in the resource tree.
When generating report set result versions in an existing standalone resource node in the resource
tree, for example, creating a new version for a resource node, you should make sure to provide the
path and name of the existing resource for The Public Reports folder or The My Reports folder option.
Browsing versions
To view the version information of a resource:
●
For administrators, on the JReport Administration > Reports page, browse to the resource, then click
the Version button
●
in the Control column.
For end users, on the JReport Console > Reports page, select the row the resource is in, then click
Version on the task bar of the Reports page (or right-click in the row and select Version from the
shortcut menu).
The versions that a resource hosts are organized in the Version table.
Version table
Relevant information about the versions that a resource hosts, such as the version date, version
number, is collected and represented in a table, called the version table.
The version table is composed of the following columns:
●
●
●
Catalog Versions Table
Column
Description
Last Modified
Shows the date and time of when the version was generated.
Version Number
Shows the serial ID that identifies a version in the version table.
Report Set Versions Table
Column
Description
Last Modified
Shows the date and time of when the version was generated.
NLS Editor
Administrators can edit NLS for a specified report set version by clicking the
corresponding link.
Version Number
Shows the serial ID that identifies a version in the version table.
Report Set Result Versions Table
Column
Description
Results
Shows the output file formats and provides links to the output files.
Last Modified
Shows the date and time of when the version was generated.
Parameters
Shows the parameter file names and provides links to the parameters.
Creator
Shows the ID of the user who created the version.
Version Number
Shows the serial ID that identifies a version in the version table.
You can perform operations such as sorting/viewing properties, and output files/parameters in the
Version table.
Applying an archive policy
JReport Enterprise Server uses an archive policy to control resource versions. The archive policy can be
applied to a single resource individually or to many resources in a folder as a whole. It can also be
applied when you run (Advanced Mode) or schedule a report set.
The archive policy includes settings for controlling the use of multiple versions for a specified resource,
and the maximum version amount that will be listed in the Version table:
●
●
Archive as New Version
Specifies whether to use multiple versions for the specified resource. Available only for resources in
the resource tree.
Maximum Number of Versions
Specifies the maximum number of versions that will be listed in the Version table of the resource. By
default the number of versions is unlimited.
If there is no archive policy specified for a resource, the resource will inherit the archive policy from its
parent object. If afterwards you then specify an archive policy for the resource, the new policy will
override the one inherited from the parent object.
Applying an archive policy to resources in the resource tree
To apply an archive policy to a resource in the resource tree, refer to the table below:
If you
want to
Apply
archive
policy to a
folder
Then do
Result
1. Access the Properties dialog for the folder.
❍
For administrators, on the JReport Administration >
Reports page, locate the folder for which you want
to set the archive policy, then click the Properties
button
❍
in the Control column.
For end users, on the JReport Console > Reports
page, select the row the folder is in, right-click in the
row and select Properties from the shortcut menu.
The archive policy will be
applied to all of the
folder content.
Note: This does not
include resources that
already have individually
applied archive policies.
2. In the Properties dialog, set the Apply Archive Policy
option as required, then click OK.
Apply
archive
policy to a
resource
1. Access the Properties dialog for the resource.
❍
For administrators, on the JReport Administration >
Reports page, locate the resource for which you
want to set the archive policy, then click the
Properties button
❍
in the Control column.
For end users, on the JReport Console > Reports
page, select the row the resource is in, right-click in
the row and select Properties from the shortcut
menu.
2. In the Properties dialog, set the Apply Archive Policy
option as required, then click OK.
The archive policy is
applied to the resource,
overriding its inherited
archive policy.
Note: If you leave the
Apply Archive Policy
option unchecked, the
resource will inherit the
archive policy from its
parent object, for
example, the folder it
resides in.
Apply
archive
policy when
running a
task in
Advanced
mode
1. On the JReport Console > Reports page, select the row
that the resource you want to run is in, right-click in the
row and select Advanced Run from the shortcut menu.
The archive policy will be
applied to a result type
resource.
2. In the Archive tab, check the Auto Archive Properties
option.
Note: If you leave the
Apply Archive Policy
option unchecked, the
resource will use its old
archive policy or inherit
the archive policy from
its parent object, for
example, the folder it
resides in.
3. Finish the other relevant information, making sure that
Archive Location is set to the resource tree folder.
4. Set the Apply Archive Policy option as required, and
then click Finish.
Apply
archive
policy when
scheduling
a task
1. On the JReport Console > Reports page, select the row
The archive policy is
that the resource you want to schedule is in, right-click
applied to a result type
in the row and select Schedule from the shortcut menu. resource.
2. In the Publish tab, click the To Version sub tab, then
check the Publish to Versioning System option.
3. Finish the other relevant information, making sure that
Archive Location is set to the resource tree folder.
4. Set the Apply Archive Policy option as required, then
click Finish.
Note: If you leave the
Apply Archive Policy
option unchecked, the
resource will use its old
archive policy or inherit
the archive policy from
its parent object, for
example, the folder it
resides in.
Applying an archive policy to the built-in version table
The above table applies to the resource in the resource tree only. The versions in the built-in version
folder are controlled by its own archive policy.
To apply an archive policy to the built-in version table, refer to the table below:
If you
want to
Apply
archive
policy to a
built-in
version table
Then do
1. Access the Version table for the resource (report set type).
❍
For administrators, on the JReport Administration > Reports page, locate the
report set, then click the Version button
❍
in the Control column.
For end users, on the JReport Console > Reports page, select the row the
report set is in, right-click in the row and select Version from the shortcut
menu.
2. In the Report Set Result Versions tab, check the Maximum Number of Versions
option, specify the versions to be saved as required, then click OK.
Apply
archive
policy when
running a
task in
Advanced
mode
1. On the JReport Console > Reports page, select the row the resource you want to
run is in, right-click in the row and click Advanced Run on the shortcut menu.
2. In the Archive tab, check the Auto Archive Properties option.
3. Finish the other relevant information, making sure that Archive Location is set to
the Built-in Version Folder.
4. Set the Apply Archive Policy option as required, then click Finish.
Apply
archive
policy when
scheduling
a task
1. On the JReport Console > Reports page, select the row that the resource you want
to schedule is in, right-click in the row and select Schedule from the shortcut
menu.
2. In the Publish tab, click the To Version sub tab, then check the Publish to
Versioning System option.
3. Finish the other relevant information, making sure that Archive Location is set to
Built-in Version Folder.
4. Set the Apply Archive Policy option as required, then click Finish.
Deleting versions
After creating versions, periodically you may want to delete some expired or unused versions. You can
choose to remove these versions manually or configure JReport Enterprise Server to delete them
automatically. When removing the versions using the user interface, the archive versions stored on disk
are also physically deleted.
Deleting manually
●
For administrators
1. On the JReport Administration > Reports page, locate the row the resource is in, then click the
Version button
in the Control column.
2. In the Version table, check the checkbox(es) ahead of the versions that you want to remove and
then click the Delete link.
●
For end users
1. On the JReport Console > Reports page, select the resource row, right-click in the row and
select Version from the shortcut menu.
2. In the Version table, select the version you want to remove, then click Edit > Delete on the
task bar (or right-click in the version row and click Delete on the shortcut menu).
Then, after receiving "The version has been deleted" message, view the version information again. You
will find that the version you selected has now been removed from the version table.
Deleting automatically
There are two approaches to automatically deleting versions:
●
Apply Archive Policy
The Apply Archive Policy controls the number of versions that will be recorded in the Version table of
a resource.
When creating a resource version, you can specify the maximum number that will be saved. If the
number of versions exceeds the specified number, the oldest version will automatically be removed
from the version list.
For example, if you specify Maximum Number of Versions as 5, when the sixth version is created, the
first version will automatically be removed.
●
Result Auto-delete
Result Auto-delete controls the duration of versions. It is only applicable to report set result versions.
When creating a report set result version, you can specify a certain period of time to keep the
version. The version will automatically be removed from the version list after the number of days or
the specified date.
For example, if you specify "Result Expires in 30 days", it will be automatically removed 30 days after
its creation.
Advanced version topics
The following sections cover advanced version topics for administrators and developers. It will give you
an understanding of version structure in depth.
●
Version resource structure in the server database
●
Storage of versions on disk
●
Topics for developers
Version resource structure in the server database
Information about versions, folders, nodes, the security system, the completed table, and server
runtime performance are all stored in the default database HSQLDB. Also, since JReport Enterprise
Server provides multiple database support, you can configure your own database to store server data.
For production systems it is recommended to use the same DBMS as your database application so the
server data will be backed up with the rest of the application.
This section discusses how version resources are stored in the server database - HSQLDB.
Generally, server data is stored in the folders <install_root>\properties and <install_root>
\profiling, and version resources are stored in the systable.defaultRealm.* files in the properties
folder.
To open the systable.defaultRealm.* files:
1. Use the following command to access the HSQLDB database manager:
%JAVAHOME%\bin\java -classpath <install_root>\lib\hsqldb.jar org.hsqldb.util.
DatabaseManager
2. In the Connect dialog, specify the connection information as follows:
Type: HSQL Database Engine Standalone
Driver: org.hsqldb.jdbcDriver
URL: jdbc:hsqldb:<install_root>\properties\systable.defaultRealm
(if you have another realm, you can also specify to check the server data in that realm)
User: sa
Password:
3. Click the OK button.
4. The HSQLDB database manager will then be displayed.
In the left panel, you will see several tables that are used to store version information, such as
VERSIONNODES_2, CATALOGVERSION_2, REPORTVERSION_2 and RESULTVERSION_2. In the
HSQLDB database, you can execute commands to obtain data from these tables in order to see
detailed version information.
❍
Example 1: Finding result version information from the database
Send the command SELECT * FROM RESULTVERSION_2 WHERE CREATOR='admin' to retrieve
result versions which were created by the user 'admin'.
❍
Example 2: Finding catalog version information from the database
Execute the command SELECT * FROM CATALOGVERSION_2 to fetch all catalog versions.
Note: Don't delete, update or insert data into the database. It is recommended that all modifications to
the database be done from JReport Enterprise Server instead of in the HSQLDB DatabaseManager.
Otherwise, it may result in JReport Enterprise Server crashing if invalid data is found.
Storage of versions on disk
A working directory <reporthome>\history has been defined for the HSQLDB database. JReport
Enterprise Server uses this folder to store all of the parameter information and version files. By default,
JReport Enterprise Server creates 100 folders in its history folder (<reporthome>\history), and each
of these folders can contain a further 3000 subfolders. These subfolders however cannot hold any
further subfolders.
First, JReport Enterprise Server puts the history information, such as archive versions and parameter
files in folder 1. When the amount of subfolders in folder 1 reaches the maximum subfolder amount, it
starts to put files in folder 2. When folder 2 is filled up, folder 3 will be used, then folder 4, folder 5,
and so on, until all 100 folders have been filled up.
When all the 100 folders have been filled up with subfolders, JReport Enterprise Server will then create
another 100 folders, named 101 to 200, and will continue to store the history information in these
folders, starting from folder 101. When the second 100 folders are full, another 100 folders will be
created, and so on.
Changing the storage folder
JReport Enterprise Server provides a server.properties file for you to configure the server. If you want
to specify a folder other than <reporthome>\history to store the version files, you can set the folder
for the resource.share.hist.dir property in this file.
The following describes the process of changing the storage folder:
1. After installing and starting JReport Enterprise Server, the server.properties file is generated in the
<install_root>\bin folder. You can then set the folder that your server data is to be stored in, in
the resource.share.hist.dir property as resource.share.hist.dir=D:\ServerData.
2. Delete the properties, profiling and history sub folders from the <install_root> folder.
3. Restart JReport Enterprise Server. The demo report sets/catalogs in the <reporthome>\jreports
directory will now be stored in the specified ServerData folder.
4. After the above procedures have been performed, all parameter information and version files
created will be stored in the specified ServerData folder.
Topics for developers
Other than implementation from the JReport Enterprise Server UI, advanced users are also allowed to
manage versions using the JReport Server API and RMI API.
The JReport Server API and RMI API is a set of Java programming interfaces that run report sets,
explore report resources, and provide access control for report servers. It is mainly used for writing
servlets, JSPs and Java applications with report server features. You can find documentation that
details the usage of the JReport Server API in the section JReport Server APIs and Remote APIs.
Program examples to show how to publish a report set to the versioning system, how to run a report
set, and how to publish a catalog/report set can be found in the <install_root>\help\server\en
\samples folder.
You may find that whenever you create catalog/report set template versions, or report set result
versions, an archive policy is applied. In the following section you will learn how to apply an archive
policy using the JReport Server API.
●
Archive policy parameters
●
Scheduling report set results to the versioning system
●
Obtaining version information
Archive policy parameters
The archive policy is a series of settings for controlling whether or not to use multiple versions for a specific
resource, for specifying the maximum version amount and archive location, and for controlling whether or
not to auto-delete versions after a certain period of time.
Archive policy parameters
Parameters
Values
Description
APIConst.
TAG_ENABLE_ARCHIVE_POLICY
true
Whether or
not to apply a
new archive
policy.
APIConst.TAG_AUTO_ARCHIVE
true
/false
/false
APIConst.
TAG_ARCHIVE_LOCATION
Built-in
version folder
is used as the
result
archiving
location.
1
The My
Reports folder
is used as the
result
archiving
location.
APIConst.
TAG_REPLACE_OLD_VERSION
true
APIConst.
TAG_ARCHIVE_NEW_VERSION
true
/false
/false
Values
Description
Whether or
not to autoarchive the
viewed result.
0
2
Parameters
APICONST.
TAG_ARCHIVE_MY_DESTINATION
Sub folder name in
the My Reports
folder for this user.
For example, /
rtp100, which
means to output the
file to /
USERFOLDERPATH/
<userid>/rtp100.
APICONST.
TAG_ARCHIVE_PUBLIC_DESTINATION
Sub folder name in
the Public Reports
folder for all the
users. For
example, /
ActimizeTest/rtp100
The Public
Reports folder
is used as the
result
archiving
location.
Whether or
not to replace
the previous
version.
Whether or
not to archive
the next
version as a
new version.
APICONST.
TAG_NEED_MAXVERSION
0 or N
The number
of versions to
keep for this
report set
result.
APICONST.TAG_NEED_EXPIRE
true
Whether or
not to auto
delete this
version.
/false
APIConst.TAG_EXPIRE_METHOD
0
1
Version
expires after
a number of
days.
APIConst.DAY_EXPIRE
Number
The number of days
until a version
expires.
APIConst.TAG_EXPIRE_YEAR
Number
The year of
expiration.
APIConst.TAG_EXPIRE_MONTH
Number
The month of
expiration.
APIConst.TAG_EXPIRE_DATE
Number
The date of
expiration.
Version
expires after
a certain
date.
Scheduling report set results to the versioning system
You can use the Java class HttpRptServer with the following methods to schedule report set results to
the versioning system: runTask(), and submitScheduledTask().
There is a Hashtable argument for these two methods, which includes the parameters used for running
tasks. Here are some parameters that you will need when specifying your Hashtable for scheduling to
version:
Parameters
Values
Description
APICONST.
TAG_TO_VERSION
true
Whether or
not to
schedule to
the versioning
system.
/false
Parameters
Values
Description
APICONST.
TAG_TO_VERSION_EXCEL
true
Whether or
not to
schedule to
an Excel
version.
APICONST.
TAG_TO_VERSION_HTML
true
APICONST.
TAG_TO_VERSION_PDF
true
APICONST.
TAG_TO_VERSION_PS
true
APICONST.
TAG_TO_VERSION_RSD
true
APICONST.
TAG_TO_VERSION_RST
true
APICONST.
TAG_TO_VERSION_RTF
true
APICONST.
TAG_TO_VERSION_TXT
true
APICONST.
TAG_TO_VERSION_XML
true
/false
/false
/false
/false
/false
/false
/false
/false
/false
Whether or
not to
schedule to
an HTML
version.
Whether or
not to
schedule to a
PDF version.
Whether or
not to
schedule to a
PostScript
version.
Whether or
not to
schedule to a
DHTML result
version.
Whether or
not to
schedule to
an rst
version.
Whether or
not to
schedule to
an rtf version.
Whether or
not to
schedule to a
TEXT version.
Whether or
not to
schedule to
an XML
version.
Obtaining version information
You will be able to fetch version records with the following function calls:
1. Get the resource manager from the HttpRptServer:
public ResourceManager getResourceManager()
2. Then use the following methods to obtain a version:
❍
❍
❍
❍
Report template version
getReportVersions(java.lang.String userID,java.lang.String rptName)
Report Set Result version
getResultVersion(java.lang.String userID, java.lang.String rptName, int versionNumber)
Catalog version
getCatalogVersions(java.lang.String userID, java.lang.String catName)
Result version
getResultDocVersions(java.lang.String userID, java.lang.String resultDocName)
Note: userID is only used for checking privilege in this method, and not for filtering the submitter.
Managing security
JReport Enterprise Server provides a security system which allows you to set up and maintain security
on the server and protect your resources from inappropriate access by users.
This section focuses on accomplishing security management in JReport Enterprise Server by means of
setting up roles, users, and assigning certain permissions.
You can find other information related to server security in the sections Security and Server security
system.
This section covers the following topics:
●
Managing realms
●
Managing user accounts
●
Managing groups
●
Managing roles
●
Managing privileges
●
Managing aliases
Managing realms
To manage realms, you must be a member of the administrator role in order to access the JReport
Administration page. Then, on the JReport Administration page, click Security on the system toolbar
and switch to the Realm tab, where you can manage the realms as required.
The following topics detail how to manage a realm:
Creating a new realm
1. Click the Create a New Realm link.
2. In the New Realm dialog, type a name for the realm, and select an authentication mode as the
scheme.
Basic Authentication uses the base64 encryption method as defined by RFC 1945. Digest
Authentication uses the MD5 encryption method as defined by RFC 2069. Basic Authentication is
lower security but is usually what is used on intranets. Digest Authentication provides much higher
security and is usually used with SSL in a highly secure environment.
3. When done, click OK, and the realm will then be added to the realm list table.
When a new realm is created, it is assigned with built-in users, groups, and the default resource tree.
Remember to activate the correct realm before allowing clients to visit.
Activating a realm
The realm must be activated before its content, such as resources, users, groups, and roles, and it can
then be accessed by the client users. There can be only one active realm at any time.
To activate a realm:
1. On the JReport Administration page, click Configuration on the system toolbar, and then click
Service.
2. Select the realm you want to activate from the Active Realm drop-down list.
3. Click Save to apply the settings.
4. Restart JReport Enterprise Server so that the changes can take effect.
Managing the users, groups and roles in an inactive realm
Users, groups and roles are only available when the realm they belong to is active. However, users,
groups and roles in an inactive realm can still be managed by users in the administrator role.
To manage users, groups and roles in an inactive realm:
1. Click the Select link in the Control column of the realm list table to select the realm you want to
manage.
All realms in JReport Enterprise Server are listed in the realm list table. The State column shows
the status of the realms. An active realm is marked as Active Realm. A selected realm is marked as
Selected Realm. If the realm is both active and selected, it is marked as Active Realm.
2. Click the User, Group or Role tab to manage the selected realm.
Information about users, groups and roles in the selected realm is listed in the User, Group, and Role
tabs.
Deleting a realm
If you find a realm is no longer required, you can delete it by clicking the corresponding Delete link in
the Control column of the realm list table.
Managing user accounts
To manage user accounts, you must be a member of the administrator role in order to access the JReport Administration page.
Then, on the JReport Administration page, click Security on the system toolbar and switch to the User tab, where you can
manage the user accounts as required.
The following topics describe how to manage a user account.
Creating a new user account
1. In the Realm tab, select a realm.
2. In the User tab, click the Create a New User link.
3. In the New User dialog, provide the information for the user as required.
4. Click OK, and the user will then be added to the user account table.
Modifying a user account
1. In the Realm tab, select the realm in which the user is.
2. In the User tab, click the name of the user.
3. In the Edit User dialog, edit the user information as required.
4. When done, click OK to accept the changes.
Adding a role to a user
A user can be assigned more than one role. A user that holds multiple roles has all the privileges that these roles have.
To add a role to a user:
1. In the Realm tab, select the realm in which the user is.
2. In the User tab, click the role(s) link of the user.
3. In the dialog, click the Add Roles link.
4. In the role table, check the role that you want to add to the user.
5. Click the Add button to add the specified role.
6. Click the User tab to return to the user list.
Adding a user to a group
A user can be assigned to more than one group. A user that belongs to multiple groups has all the privileges that these groups
have.
To add a user to a group:
1. In the Realm tab, select the realm in which the user is.
2. In the User tab, click the group(s) link of the user.
3. In the dialog, click the Add Groups link.
4. In the group table, check the group that you want to add the user to.
5. Click the Add button.
6. Click the User tab to return to the user list.
Auditing a specific user
You can have the server to audit a user, and the resulting information will be written into the log files.
To audit a user:
1. In the Realm tab, select the realm in which the user is.
2. In the User tab, click the Auditing link of the user.
3. In the Auditing dialog, specify the events which you want to have audited for this user.
4. When done, click OK to accept the changes.
Changing the password of a user
1. In the Realm tab, select the realm in which the user is.
2. In the User tab, click the Change Password link of the user.
3. In the Change Password dialog, specify the password of the current logged in user.
4. Specify the new password for the user and confirm it by entering it a second time.
5. When done, click OK to accept the changes.
Setting user preferences
1. In the Realm tab, select the realm in which the user is.
2. In the User tab, click the Preferences link of the user.
3. In the Preferences dialog, specifies the server preferences and DHTML preferences for the user accordingly.
4. When done, click OK to accept the changes.
Deleting a user account
If you find a user account is no longer required, you can delete it by clicking the corresponding Delete link in the Control column
of the user account table. However, the built-in user accounts, such as admin and guest, and users that hold roles other than
the everyone role, or that belong to any group, cannot be deleted. A user cannot delete himself from the user list either.
Managing groups
To manage groups, you must be a member of the administrator role in order to access the JReport
Administration page. Then, on the JReport Administration page, click Security on the system toolbar
and switch to the Group tab, where you can manage the groups as required.
The following topics explain how to manage a group.
Creating a new group
1. In the Realm tab, select a realm.
2. In the Group tab, click the Create a New Group link.
3. In the New Group dialog, specify the settings for the new group.
4. When done, click OK, and the new group will then be added into the group list table.
5. Click the Group tab again to return to the group list table.
Modifying a group
1. In the Realm tab, select the realm in which the group is.
2. In the Group tab, click the name of the group.
3. In the Edit Group dialog, edit the group information as required.
4. When done, click OK to accept the changes.
Editing members of a group
You can edit members of a group, such as adding a new member, or removing a member from the
group by clicking the member(s) link of the group in the group list table.
Notes:
●
A group can have more than one child member and parent member.
●
A parent member cannot be added to the current group as its child member.
Deleting a group
If you find a group is no longer required, you can delete it by clicking the corresponding Delete link in
the Control column of the group list table. However, groups that are not empty, having child members
or parent members, cannot be deleted.
Managing roles
To manage roles, you must be a member of the administrator role in order to access the JReport Administration page. Then, on
the JReport Administration page, click Security on the system toolbar and switch to the Role tab, where you can manage the
roles as required.
The following topics describe how to manage a role.
Creating a new role
1. In the Realm tab, select a realm.
2. In the Role tab, click the Create a New Role link.
3. In the New Role dialog, specify the settings for the role.
4. Click OK, and the new role will then be added to the role list table.
Modifying a role
1. In the Realm tab, select the realm in which the role is.
2. In the Role tab, click the name of the role.
3. In the Edit Role dialog, edit the role information as required.
4. When done, click OK to accept the changes.
Editing members of a role
You can edit the members of a role, such as adding a new user or role, or removing a member from the role.
To edit the members in a role:
1. In the Realm tab, select a realm in which the role is.
2. In the Role tab, browse to the specific role, and then click the member(s) link.
3. Edit the members of the role as follows:
❍
To remove a member from the role, check the member and then click the Remove button.
❍
To add a member to the role, click the Add Members link, check the new member, and then click the Add button.
Notes:
●
A role can have more than one child group, child role and parent role.
●
A parent role cannot be added to the current role as its child.
●
Some members cannot be removed from the role they belong to, such as admin in the administrator role and guest in the
everyone role. A user cannot remove himself from the administrators role.
Deleting a role
If you find a role is no longer required, you can delete it by clicking the corresponding Delete link in the Control column of the
role list table. However, the built-in roles, such as administrators and everyone, and roles that are not empty, cannot be deleted.
Managing privileges
JReport Enterprise Server offers two types of privileges for users, groups, and roles: Publish and Advanced Properties. Users
that are granted the Publish privilege will be able to publish resources to JReport Enterprise Server, while users that have the
privilege of Advanced Properties are allowed to view advanced information of version properties such as catalog connections
and report set related resources.
To manage privileges, you must be a member of the administrator role in order to access the JReport Administration page.
Then on the JReport Administration page, click Security on the system toolbar. In the Realm tab select the realm in which
the role/group/user is, then switch to the Privilege tab. You can then grant and remove role/group/user privileges in the tab.
Granting role/group/user privileges in the Privilege tab
●
●
For roles/groups/users that already have privileges
Roles/groups/users that already have privileges are listed in the Role Privileges/Group Privileges/User Privileges table. To
assign privileges to them, you just need to check the checkbox below the type of privilege you want to grant. Then click
Save to apply the changes.
For roles/groups/users that have had neither of the privileges
1. In the Privilege tab, click the Add button. The Privilege dialog will then appear.
2. To assign privileges to a role/group/user, select the Role Privileges/Group Privileges/User Privileges tab accordingly.
3. Choose the specific role/group/user from the list by selecting the checkbox before its name.
4. Check the checkbox below the type of privilege you want to grant.
5. Click the OK button to apply the changes. The role/group/user that has been granted new privileges will be added into
the Role Privileges/Group Privileges/User Privileges table.
Removing privileges from a role/group/user in the Privilege tab
To remove privileges from a role/group/user, you can choose either of the following two methods:
●
●
To remove a privilege from a role/group/user, uncheck the checkbox below the privilege, and then click Save to apply the
changes.
To remove all privileges from a role/group/user, first select the role/group/user, and then click the Remove button. By
doing this, the role/group/user will be deleted from the Role Privileges/Group Privileges/User Privileges table.
Granting and removing role/group/user privileges in the Role/Group/User tab
1. In the Realm tab, select the realm in which the role/group/user is.
2. In the Role/Group/User tab, click the underlined role/group/user name.
3. In the Edit Role/Edit Group/Edit User dialog, check or uncheck the Publish or Advanced Properties privileges.
4. Click the OK button to apply the changes.
Managing aliases
JReport Enterprise Server organizes its files and directories into a Resource Tree. Aliases are used to provide certain "views"
of the tree, and allow different users to have different views. For example, you can set an alias resource tree (based on the
resource tree) for Mary in Sales, which enables her to only see the Sales resource node, allowing her direct access to the
report set files she is interested in. An alias is a combination of users and the resource node.
However, in order to manage aliases, you must be a member of the administrator role in order to access the JReport
Administration page.
Setting an alias resource tree for a role, group, or user
1. Log onto the JReport Administration page and select Security on the system toolbar.
2. In the Realm tab, select the realm in which the role, group, or user is.
3. Switch to the Alias tab, to set an alias resource tree for a role/group/user, click the corresponding set alias link.
4. Select a role/group/user, and then click the Next button to open the Set Alias dialog.
5. Click the New button to create a new alias node in the root node.
6. In the Alias Name field, replace the default name newAlias with a name for the alias.
7. Click the Browse button to specify a destination resource from the server resource tree that is to be associated with
the new alias node. If you do not want the alias node to be shown in the alias resource tree, check the Hide This Alias
option.
8. Click the OK button to complete the creation of the new alias node.
9. Use the following steps to create further alias nodes:
a. Select the node in which you want to create a new alias node.
b. Click New to create.
c. In the Alias Name field, replace the default name newAlias with a name for the alias.
d. Click the Browse button to specify a destination resource from the server resource tree that is to be associated
with the new alias node.
e. If you do not want the alias node to be shown in the alias resource tree, check Hide This Alias.
f. Click the OK button to complete the creation of the new alias node.
10. After you have finished with the alias resource tree, click the Close button to exit the dialog.
You will now see that the just set role/group/user is listed in the corresponding alias list in the Alias tab.
Viewing the alias resource tree of a role, group, or user
1. In the Realm tab, select the realm in which the role, group, or user is.
2. In the alias list of the Alias tab, select the underlined name of the role/group/user you want to view.
3. The Set Alias dialog will then be opened for you to view the alias resource tree information of the role/group/user.
Editing the alias resource tree of a role, group, or user
1. In the Realm tab, select the realm in which the role, group, or user is.
2. In the alias list of the Alias tab, select the underlined name of the role/group/user you want to edit.
3. The Set Alias dialog will then be displayed for you to edit the alias resource tree of the role/group/user. You can edit by
hiding/unhiding an alias node, creating a new alias node, or removing an existing alias node.
❍
To hide/unhide an alias node:
a. Select the alias node in the alias resource tree.
b. Check/uncheck the Hide This Alias option, and then click OK.
❍
To create a new alias node:
a. Select the alias node in which you want to create a new alias node.
b. Click New.
c. In the Alias Name field, replace the default name with a name.
d. Click the Browse button to search for the destination resource from the Server resource tree that is to be
associated with the alias node.
e. Click OK to create the alias node.
❍
To remove an existing alias node:
a. Select the alias node from the alias resource tree.
b. Click Remove to remove the alias node.
Notes:
●
An alias tree is based on the resource nodes (not virtual resource nodes) of the resource tree.
●
By default, the alias resource tree root for each user refers to the resource tree root.
●
When an alias tree is activated for a user, all resource access is then controlled by the alias resource tree.
Managing tasks
Usually, a task is a set of operations you perform on JReport Enterprise Server to achieve a goal, such
as publishing a folder, deleting a resource, and viewing resource properties. However, the tasks that
the JReport Enterprise Server manages are those associated with report-running issues, the reportrunning tasks.
JReport Enterprise Server allows you to quickly view a report set result (Run), view a report set result
using selected options and parameters (Advanced Run), and schedule a report set to run unattended at
a specific time or periodically (Schedule). These are the fundamental modes that JReport Enterprise
Server uses to perform its report-running tasks.
You can view the status of these report-running tasks, such as scheduled tasks that are waiting to be
performed by JReport Enterprise Server, the tasks that are currently being performed, and the tasks
that have already been performed.
This section describes the following:
●
Accessing the task information tables
●
Managing tasks in the task tables
●
Task-level timeout for advanced run and schedule tasks
Accessing the task information tables
JReport Enterprise Server collects task information and manages it in a set of tables. This information
includes:
Tasks that are scheduled
●
❍
❍
❍
Scheduled table
Shows the status information of scheduled tasks that are waiting to be performed, such as task ID,
whether the task is enabled, previous running time, and next running time.
Running table
Shows the status information of tasks that are currently being performed, such as task ID, time
when the task was started, and engine status.
Completed table
Shows the status information of tasks that have already been performed, such as task ID, time
when the task was completed, whether or not the task was successfully performed, result files, and
error messages.
Tasks that are performed in the Run, Advanced Run or Background Run mode
●
❍
Background Tasks table
Shows the status information of the tasks submitted using the Run, Advanced Run, or Background
Run mode, such as report name, report set path and name, catalog path and name, running
format, time when the task was started/completed, time elapsed since the task was performed,
and the status of the task.
Pick a task from the following:
●
Accessing the Scheduled table
●
Accessing the Running table
●
Accessing the Completed table
●
Accessing the Background Tasks table
Accessing the Scheduled table
To access the table for scheduled tasks, on the JReport Console page, click My Tasks on the system
toolbar, then click the Scheduled tab.
The Scheduled table consists of the following columns:
Column
Description
Schedule Name
The name of the scheduled task.
Task ID
The internal ID for this task, which is a unique time stamp.
Report Set
The report set path and name.
Reports
The name of the reports.
Next Run Time
The next scheduled time for when this task is to be performed.
Last Run Time
The last scheduled time this task was performed.
Task Type
The type of task, such as Versioning System, File System, E-mail, or Printer.
Is Enabled
Shows whether this task is enabled. Can be Enabled or Disabled.
Is Successful
Shows whether or not the last running of this task was successfully performed.
The value true means that the last running was performed successfully and
false means the task failed. If the column is empty, the task has not been run
before.
Catalog
The catalog path and name that the report set belongs to.
Launch Type
The way in which this task is executed, such as Repeatedly or One Time.
Requester
The user who submitted this task.
Note: Some columns are not shown by default. To have them displayed, click the Preferences link,
check the corresponding items in the Preferences dialog, then click OK to save the settings.
Accessing the Running table
To access the table for running tasks, on the JReport Console page, click My Tasks on the system
toolbar, then click the Running tab.
The Running table consists of the following columns:
Column
Description
Schedule Name
The name of the scheduled task.
Task ID
The internal ID for this task (a unique time stamp).
Report Set
The report set path and name.
Reports
The name of the reports.
Start Time
The time when this task was started.
Task Type
The type of the task, such as Versioning System, File System, E-mail, or
Printer.
Catalog
The catalog path and name that the report set belongs to.
Launch Type
The way in which this task is executed, such as Repeatedly, One Time, or
Instant.
Requester
The user who submitted this task.
Parameter File
The parameter file names and provides links to the parameters.
Parameters
The parameters according to the size specified.
Engine Status
The current status of the JReport engine, such as record fetching, grouping,
memory paging, and engine initializing.
Note: Some columns are not shown by default. To have them displayed, click the Preferences link,
check the corresponding items in the Preferences dialog, then click OK to save the settings.
Accessing the Completed table
To access the table for completed tasks, on the JReport Console page, click My Tasks on the system
toolbar, then click the Completed tab.
The Completed table consists of the following columns:
Column
Description
Schedule Name
The name of the scheduled task.
Task ID
The internal ID for this task (a unique time stamp).
Is Successful
Shows whether this task was successfully performed. The value true means that
the task was performed successfully and false that the task failed.
Report Set
The report set path and name.
Reports
The name of the reports.
Completed Time
The time when this task was completed.
Task Type
The type of task, such as Versioning System, File System, E-mail, or Printer.
Catalog
The catalog path and name that the report set belongs to.
Launch Type
The way in which this task is executed, such as Repeatedly, One Time, or
Instant.
Requester
The user who submitted this task.
Parameter File
The parameter file names and provides links to the parameters.
Parameters
The parameters according to the size specified.
Engine Status
The status of JReport Engine when the task was completed, such as record
fetching, grouping, memory paging, and engine initializing. When a task fails to
perform, here you can see the status of the engine at the time of the error.
Error Message
The error message for when the task failed to perform.
Result Files
The report set result files and provides links to the report set result files.
Note: Some columns are not shown by default. To have them displayed, click the Preferences link,
check the corresponding items in the Preferences dialog, then click OK to save the settings.
Accessing the Background Tasks table
To access the table for background tasks, on the JReport Console page, click My Tasks on the system
toolbar, then click the Background Tasks tab.
The Background Tasks table consists of the following columns:
Column
Description
Reports
The name of the reports.
Result
The result in certain format in which the report ran.
Report Set
The path and name of the catalog that the report belongs to.
Start Time
The time when this task was started.
Finish Time
The time when this task was completed.
Status
The status of the task.
Catalog
The path and name of the catalog that the report set belongs to.
Elapse Time
The time elapsed since the start of this task.
Catalog Version Number
The version number of the catalog that the report set belongs to.
Report Set Version
Number
The version number of the report set.
Parameters
The parameters of the report set.
Cancelled
Show whether the task is cancelled or not.
Notes:
●
●
Version Number: Each catalog or report set type resource can hold a group of archive versions,
and each version is given a unique number to distinguish itself from others.
Some columns are not shown by default. To have them displayed, click the Preferences link, then
in the Preferences dialog, check the corresponding items and click OK to save the settings.
Managing tasks in the task tables
You can manage tasks in the task tables acccording to your requirements. For example, you can run a
scheduled task at once, or stop a running task from running.
Performing common tasks
Some task management operations are common to the task tables.
If you want to
Then do
Select a task
Click in the row that the task is in.
Select multiple tasks
Select the rows that the tasks are in while holding the Ctrl button.
Remove a task
Select the row that the task is in, then
●
Click Edit > Delete on the task bar of the My Tasks page.
●
Right-click in the row and select Delete from the shortcut menu.
Managing tasks in the Scheduled table
If you want to
Then do
Create a new scheduled task
Click New Schedule on the task bar of the My Tasks page, then in the
New Schedule dialog, specify how to create the task: by selecting a
report set or by importing a script file.
Run a task at once
Select the task, then click Run on the task bar of the My Tasks page.
Duplicate a task
Select the task, then click Edit > Copy on the task bar of the My
Tasks page.
Enable a task
Select the task, then click Edit > Enable on the task bar of the My
Tasks page.
Disable a task
Select the task, then click Edit > Disable on the task bar of the My
Tasks page. The disabled task will not be performed until you enable it
again.
Export a scheduled task to a
script on disk
See Importing and exporting scheduled tasks for details.
Import a scheduled task from See Importing and exporting scheduled tasks for details.
a script saved on disk
Notes:
●
●
You can perform the Run action on a disabled scheduled task.
When copying a disabled scheduled task or exporting it to script, the disabled state will not be
included since it is not a property of the task.
Managing tasks in the Running table
If you want to
Then do
Stop a task from running
Select the task, then click Stop on the task bar of the My Tasks page.
Note: When you stop a bursting task from running, some sub tasks in
the bursting task may have already been finished, so some results
may have been sent to some recipients.
View parameter information
Refer to the Parameters column of the Running table.
Managing tasks in the Completed table
If you want to
Then do
View detailed task running
information
Click the schedule name link.
View parameter information
Refer to the Parameters column of the Completed table.
Managing tasks in the Background Tasks table
If you want to
Then do
Stop a task from running
Select the task, then click Edit > Stop on the task bar of the My Tasks
page.
Restart a task
Select the task, then click Edit > Restart on the task bar of the My
Tasks page.
View parameter information
Refer to the Parameters column of the Background Tasks table.
Task-level timeout for advanced run and schedule tasks
A task-level timeout mechanism is introduced in order to avoid the never-finished running tasks
consuming server resources and thus decreasing the server performance. With the mechanism, you
can specify a time duration for a task, and ask JReport Enterprise Server to cancel the task or to notify
you or someone else of the task status via e-mail if the task has not yet finished running when the task
duration is up. To do this:
1. Do either of the following to enable the task-level timeout mechanism.
❍
❍
In the server.properties file, set the task.duration.en able property to true.
On the JReport Administration page, click Configuration on the system toolbar, then select the
Advanced tab and check the Enable Task Duration option.
2. Set task duration check frequency. By default, JReport Enterprise Server checks task duration
every 30 seconds. The period value can be reset either by the task.duration.che ck_cycle property
in the server.properties file or by the Status Refresh Interval option in the Advanced tab of the
JReport Administration > Configuration page. Note that the value must be an integer greater than
0. Since task duration check frequency affects server performance, it is recommended that you set
the value according to your system environment.
3. Restart JReport Enterprise Server if you have modified the Advanced tab.
4. Use the Duration tab in the Advanced Run and Schedule dialogs to specify task duration.
1. In the Timeout text box, specify the time limit for when the task can run before notifying of
the timeout or canceling the task.
2. If you want to notify someone of the task status if the task has not yet finished running when
the task duration is up, check Notify by e-mail after the specified time and specify the
mail address in the Mail To text box.
3. If you want JReport Enterprise Server to cancel the task when the task duration is up but the
task is not finished ye, check Cancel the task after the specified time.
4. Click Finish to submit the task.
Then, when the specified task duration is up but the task is not finished running,
For an Advanced Run task,
●
❍
❍
If you have specified to have server cancel the task when the task duration is up, the task will be
cancelled automatically, however a record for the task will be still remained in the Background
Tasks table of the My Tasks page, shown with a sign of cancellation.
If you haven't checked the Cancel the task after the specified time option in the Duration tab, the
task will be switched to run in background mode, in which case, you can choose to cancel the task
manually. To do this. select the task row in the Background Tasks table, right-click in the row and
select Delete from the shortcut menu.
For a Schedule task,
●
❍
If you have specified to have server cancel the task when the task duration is up, the task will be
cancelled automatically, and a task completed record will be added in the Completed table of the
My Tasks page, with the Is Successful status shown as No.
❍
If you haven't checked the Cancel the task after the specified time option in the Duration tab, the
task will still be listed in the Running table of the My Tasks page. Then, if you want to cancel the
task manually, select the task row in the Running table, then click Stop on the task bar of the My
Tasks page.
Notes:
●
●
●
JReport Enterprise Server may not cancel a task right after the specified task duration is up due to
check frequency.
It is recommended that the task duration is set to about five times of the required time for finishing
running the task.
For API usage about this feature, see the JReport Enterprise Server Javadoc in <install_root>\help
\server\en\api.
Managing server data
During its running process, JReport Enterprise Server keeps track of server information and stores it to
its own database for the purpose of running various managing and monitoring tasks, such as managing
the resources on the server, monitoring the task running status, and collecting server running statistics.
The server data includes system tables and profiling tables. Each type of data is saved to its own
database. The system database holds information of folders, nodes, versions, the security system, and
the completed table. The profiling database holds server runtime performance related information.
JReport provides completed SQL files to create system and profiling tables for all databases supported.
They reside in <install_root>\script_files.
This section covers the following topics:
●
Initializing the database system as a non-admin database user
●
Checking server data integrity
●
Backing up/restoring server data
●
Archiving and restoring server data
●
Viewing the summary information of archive files
●
Clearing unused nodes from the system database
Initializing the database system as a non-admin database user
The database initialization system allows you to use a non-admin database user for JReport Enterprise
Server. However, the database initialization has to be divided into three phases:
1. The database administrator creates new database tables using script files.
2. The non-admin database user starts JReport Enterprise Server. In this phase, the old version's
database tables will be updated if they exist. If the server has updated the old version's table
data, you will be able to see a record of it in the debug file.
3. The database administrator deletes the old version' tables in the database using script files.
Script files
JReport Enterprise Server supports these different databases: HSQLDB, Microsoft Access, MySQL,
Microsoft SQL Server, IBM DB2, Oracle, Sybase, and Informix.
The script files are stored in <install_root>\script_files. There are three types of script files:
Script files used for creating new database tables
The following files are used to create new database tables, and are stored in <install_root>
\script_files\create_new_tables:
●
hsqldb_c.txt - Creates new tables for HSQLDB database.
●
access_c.txt - Creates new tables for Microsoft Access database.
●
mysql_c.txt - Creates new tables for MySQL database.
●
sqlserver2000_c.txt - Creates new tables for Microsoft SQL Server database.
●
db2_c.txt - Creates new tables for DB2 database.
●
oracle_c.txt - Creates new tables for Oracle database.
●
sybase_c.txt - Creates new tables for Sybase database.
●
informix_c.txt - Creates new tables for Informix database.
Script files used for deleting the old version' tables
The following files are used to delete the old version' tables, and are stored in <install_root>
\script_files\delete_old_tables:
●
hsqldb_do.txt - Deletes old version tables for HSQLDB database.
●
access_do.txt - Deletes old version tables for Microsoft Access database.
●
mysql_do.txt - Deletes old version tables for MySQL database.
●
sqlserver2000_do.txt - Deletes old version tables for Microsoft SQL Server database.
●
db2_do.txt - Deletes old version tables for DB2 database.
●
oracle_do.txt - Deletes old version tables for Oracle database.
●
sybase_do.txt - Deletes old version tables for Sybase database.
●
informix_do.txt - Deletes old version tables for Informix database.
Script files used for deleting the current version' tables
The following files are used to delete the current version' tables, and are stored in <install_root>
\script_files\delete_current_tables:
●
hsqldb_dc.txt - Deletes current version tables for HSQLDB database.
●
access_dc.txt - Deletes current version tables for Microsoft Access database.
●
mysql_dc.txt - Deletes current version tables for MySQL database.
●
sqlserver2000_dc.txt - Deletes current version tables for Microsoft SQL Server database.
●
db2_dc.txt - Deletes current version tables for DB2 database.
●
oracle_dc.txt - Deletes current version tables for Oracle database.
●
sybase_dc.txt - Deletes current version tables for Sybase database.
●
informix_dc.txt - Deletes current version tables for Informix database.
Checking server data integrity
In abnormal circumstances, server data may not be saved correctly or completely in the databases.
JReport Enterprise Server allows you to check the integrity of server data.
The integrity check mainly examines two aspects of the systables:
●
●
Integrality and consistency among tables - checking records among the tables to see whether they
are complete and consistent.
Integrality and consistency between systables and the external files - checking to see whether the
records in the tables match the related external files.
If any inconsistent or incomplete server data is found, it will be removed from the systables since it is
unused. The same process also applies to files.
To check server data integrity, do one of the following:
●
Launch JReport Enterprise Server on the command line, using parameter -cleanup.
C:\JReport\Server\bin>JREntServer -cleanup
●
Open the batch file used to start JReport Enterprise Server, add -Dcheck.systables=true to the
line that starts JReport Enterprise Server:
"%JAVAHOME%\bin\java.exe" -Dcheck.systables=true "-Dinstall.root= <install_root>" ...
Note: The integrity check checks only the systables database, not the profiling database.
Backing up/restoring server data
Backing up server data
The server data backup process inspects all of the tables in the database, collecting and then exporting
all table data to a ZipEntry. For certain tables, such as the catalog version table, report set version
table, and report set result version table, the data also includes relational real files from the history
directory. All server data is compressed to a single Zip file, and all table data and every relational real
file is stored as a ZipEntry in this single file.
You have two alternatives for exporting the server data: through the server user interface or through
command line.
Exporting the server data through the server user interface
1. On the system toolbar of the JReport Administration page, click Data.
2. Select a realm from the Select Realm drop-down list.
3. Select the System DB/Profiling DB tab.
Note: The Profiling DB tab is not shown by default. To show this tab, set the server.profiling.
enable property to true in the server.properties file in the <install_root>\bin directory.
4. Click the Backup sub tab, type the file path and name in the Backup System DB/Profiling DB field
(or use the Browse button to specify the file path), and then click Backup. Note that the file
extension should be included.
Exporting the server data through the command line on Windows or on UNIX/Linux
A tool is provided to backup the server data. It is DBMaintain.bat/DBMaintian.sh in <install_root>
\bin. It has two parameters:
●
-Bsystables/-Bprofiling: Backup the data with the related data outside the database.
●
-B0systables/-B0profiling: Only backup the data in the database.
To export the server data from the command line on Windows or on UNIX/Linux:
1. In a DOS window, switch to the <install_root>\bin folder.
2. Use the DBMaintain command (DBMaintain.sh on UNIX/Linux) and -Bsystables/-Bprofiling or B0systables/-B0profiling parameter. For example:
C:\JReport\Server\bin>DBMaintain -Bsystables:C:\TEMP\cmd_b_systables.dat Bprofiling:C:\TEMP\cmd_b_profiling.dat
Restoring server data
The server data restore process picks up all table data from the backup file and inserts it into the
corresponding table in the database. You can only restore server data using the DBMaintain tool with
the -Rsystables/-Rprofiling or -R0systables/-R0profiling parameter.
To import server data using the command line:
1. In the DOS window, switch to the <install_root>\bin folder.
2. Use the DBMaintain command and -Rsystables/-Rprofiling or -R0systables/-R0profiling parameter,
for example:
C:\JReport\Server\bin>DBMaintain -Rsystables:C:\TEMP\cmd_b_systables.dat Rprofiling:C:\TEMP\cmd_b_profiling.dat
Backup/restoration limitations
The backup/restore feature does not support cross-platform operation. The backup and restore
operations must be done on the same operating system. For example, if you backup the server data to
a zip file on a Windows platform, you will then not be able to restore it on a UNIX system.
Archiving and restoring server data
Archiving server data
Along with the running of the server, the sizes of the result version table (DB: systables) and
TaskContext table (DB: profiling) grow larger. JReport Enterprise Server allows you to archive data to a
single backup file. You can then retrieve the data from the backup file at a later date.
To archive the server data:
1. On the system toolbar of the JReport Administration page, click Data.
2. Select a realm from the Select Realm drop-down list.
3. Click the System DB/Profiling DB tab.
Note: The Profiling DB tab is not shown by default. To show this tab, set the server.profiling.
enable property to true in the server.properties file in the <install_root>\bin directory.
4. Switch to the Archive sub tab.
5. Specify a date in the Move to Archive data before field, and then type or use the Browse button
to specify the file path and name.
If you don't want to backup the archived server data, leave this field blank. The server data will
then be removed from the database.
6. Click Archive. Server data prior to the date specified will be archived and saved to the backup file
using the name specified.
Restoring the archived server data
You can restore server data that has been archived from a backup file. You can only restore it using the
server user interface.
To restore the archived server data:
1. On the system toolbar of the JReport Administration page, click Data.
2. Select a realm from the Select Realm drop-down list.
3. Click the System DB/Profiling DB tab.
4. Switch to the Archive sub tab.
5. Type or use the Browse button to provide the archive file name and location in the Restore from
archive field, and then click Restore.
Viewing the summary information of archive files
After archiving or backing up files, you can view the results. The summary information includes
Archive, Date, Type, Version, Realm, Database and Scope.
To view the summary information of a specified file:
1. On the system toolbar of the JReport Administration page, click Data.
2. Select a realm from the Select Realm drop-down list.
3. Click the System DB (Profiling DB) tab.
Note: The Profiling DB tab is not shown by default. To show this tab, set the server.profiling.
enable property to true in the server.properties file in the <install_root>\bin directory.
4. Switch to the Summary sub tab.
5. Type or use the Browse button to specify an archive file name and location in the Archive field,
and then click Summary.
Clearing unused nodes from the system database
Making operations on real path resources may generate unused nodes from the system database. The
generated unused nodes can be cleared through the JReport Administration page.
How unused nodes are generated
When resources, such as folders, catalogs, and report sets, have been published using a real path in
order to allow dynamic updating there is a possibility to produce invalid nodes. After running a report
set and saving the result to the versioning system or scheduling report sets which are saved in the
versioning system, either of the following conditions will generate invalid nodes:
●
Cancel or change the real path setting.
●
Publish a resource to replace an existing real path resource.
How to clear invalid nodes
To clear unused nodes:
1. On the JReport Administration page, click Data on the system toolbar.
2. Click the System DB Check tab.
3. Click the Check button. All invalid resource nodes will then be listed.
4. Check the checkbox on the header of the first column to specify whether you want to select all or
unselect all. Otherwise, you can check the corresponding checkbox to select the invalid nodes that
you want to delete.
5. Click Delete button to delete all selected nodes.
Managing JReport Enterprise Server clusters
The JReport Enterprise Server Cluster page allows you to configure, monitor, administer, and evaluate
the performance weight of the servers in a cluster. In this page, you can:
●
Add cluster members to the predefined server list.
●
Set and track the cluster server.
●
Track the status of one specified cluster server.
●
Set the shared parameters of the cluster server.
●
Stop the clustered servers.
To access the Cluster page, log onto the JReport Administration page and then click Cluster on the
system toolbar. It is only available when you have the license for clusters.
For details about the features of JReport cluster, see sections Cluster overview and JReport Enterprise
Server cluster main features.
In this section, JReport Enterprise Server cluster administration is described in the following topics:
●
Managing the predefined server list
●
Testing performance weight
●
Balancing the server load
●
Administering clustered servers
●
Monitoring clustered servers
Managing the predefined server list
Predefined server list
A predefined server list, which is stored in the server.list file, is a list that records relevant information
about the clustered servers. The information includes server name, server IP address, server RMI port,
and server backup priority.
The predefined server list is used for two main purposes:
●
To determine the priority for a backup server to switch the role to run as the admin server when the
server is shut down or has crashed.
In a clustered environment, there can be more than one backup server. When the admin server fails
to function, one of the backup servers will promote itself to run as the admin server. Which backup
server should do this is determined by the backup priority settings defined in the server.list file (the
jrs.cluster.server.backup.priority property).
●
To monitor the status of the servers in the cluster.
JReport Server Monitor can monitor the clustered server status and allows you to perform some
administrative tasks. However, only when a server is added to the predefined server list, can it be
tracked and monitored by JReport Server Monitor.
Managing predefined server list
If in the server.properties file, the property cluster.only_accept_predefined_server is set to true, then
before a server can join the cluster, it must first be included in the predefined server list. If you log
onto the admin server as an administrator, you can manage the cluster server list in the Predefined
Server List.
●
To display the predefined server list:
1. On the JReport Administration page, click Cluster on the system toolbar.
2. Click the Config tab, then the predefined server list will be displayed.
●
To add a server to the list:
1. In the Config tab, click the Add Server link.
2. In the Add Predefined Server dialog, supply relevant information about the server: Server
Name, Host Address, RMI Port, and Backup Priority.
3. When done, click OK and the server will then be added to the Predefined Server List table.
●
To remove a server from the list, click the corresponding Delete link.
Notes:
●
The backup priority for each backup server cannot be the same, but can be left empty. The default
priority for the admin server is 0, which is the highest level of priority in the cluster.
●
●
●
If the server you are adding is a backup server, you must specify a backup priority for it. Otherwise,
it will be considered as a slave server and will never be promoted to be an admin server.
If the server you are adding is a slave server, leave the backup priority field empty. The cluster will
not recognize a specified backup priority for a slave server.
The name of the server you are adding is only used by JReport Enterprise Server. It does not need
to be the same as the host name of the computer where the server runs. The specified Host Address
is used to locate the computer in the network.
Configuring performance weight
If you have chosen the Least Weighted Current Report Sets (Weighted Min-load) (loadbalance.type=2
in the server.properties file) algorithm for load balancing, you will have to configure a performance
weight for each clustered server on the admin server. The higher performance weight you set to a
clustered server, the higher chance it may get selected by the admin server during load balancing.
To configure performance weight
1. On the JReport Administration page on the admin server, click Cluster on the system toolbar and
then click the Weight tab.
2. Specify a weight value for each clustered servers manually. Performance weight is a positive float
number.
You can use the Test button to get the current performance weight of each clustered servers.
3. Click OK to save the weight values.
Examples for how Least Weighted Current Report Sets algorithm works
Example 1 - when there are free servers:
Active Servers
ServerA ServerB
ServerC
Comments
Is local server
TRUE
FALSE
FALSE
Maximum concurrent report
sets
8
Unlimited
5
Number of currently running
report sets
6
6
5
Performance weight
10
10
10
Weighted current report sets
0.6
0.6
0.5
Is free
TRUE
TRUE
FALSE
Candidate servers
YES
YES
Select from free servers
Candidate servers
YES
YES
Select servers which have the least
Weighted current report sets
Selected server
YES
Calculation
Current < MaxConcurrent, or
MaxConcurrent is unlimited
Local server has higher priority
Example 2 - when there are no free servers:
Active Servers
ServerA ServerB
ServerC
Is local server
TRUE
FALSE
FALSE
Maximum concurrent report
sets
10
10
10
Number of currently running
report sets
10
10
10
Performance weight
4
5
8
Comments
Calculation
Weighted current report sets
2.5
2
1.25
Is free
FALSE
FALSE
FALSE
Current < MaxConcurrent, or
MaxConcurrent is unlimited
Candidate servers
YES
YES
YES
Selects from all servers when all
servers are full
Candidate servers
YES
Select servers which have the least
Weighted current report sets
Selected server
YES
Select ServerC
Balancing the server load
In a cluster environment, JReport Enterprise Server provides a mechanism named load balancing which
enables the server to work more effectively.
Load balancing process
1. When a server in a cluster receives a view task or a scheduled task, it will send a load balancing
request to the admin server. The only difference between these two types of task is that for the
view task the initial server will be treated as the local server, while for the scheduled task the
admin server will be treated as the local server.
2. The admin server selects a server in the cluster according to the load balancing algorithm specified
which can either be a built-in one or a customized one, and then sends the IP address of the
selected clustered server to the initial server.
3. The initial server sends the task to the selected server.
Customized load balancing algorithm based on API
You can write your own load balancing algorithm based on the API included in JReport Enterprise
Server. Note that if you set load balancing algorithm with API, it will take effect in place of other builtin load balance algorithms you have set.
A demo DemoLoadBalancer.java has been provided to illustrate how to customize load balancing using
APIs. You can find it in <install_root>\help\server\en\samples.
Assuming that your server has been configured to be an admin server, and you have several clustered
servers.
Take the following steps:
1. Compile DemoLoadBalancer.java to generate the class file as follows:
javac -classpath <install_root>\lib\JRESServlets.jar DemoLoadBalancer.java
Note: When compiling DemoLoadBalancer.java, you need to add JRESServlets.jar to the
class path.
2. Add DemoLoadBalancer.class to the class path of setenv.bat in the ADDCLASSPATH variable.
3. In server.properties, set loadbalance.custom_class=DemoLoadBalancer (if there is no such
property entry, add one). You can also type -Dloadbalance.custom_class=DemoLoadBalancer in
the command line.
4. Launch JREntServer.bat, the customized loadbalancer DemoLoadBalancer will then be applied.
5. Submit some tasks for running. You will now find that these tasks are allocated to the clustered
servers based on the DemoLoadBalancer code.
Reference: For more details, see the jet.server.api.cluster.LoadBalancer interface in JReport
Enterprise Server Javadoc located in <install_root>\help\server\en\api\jet\server\api\cluster.
Related topics:
●
Load balancing
Administering clustered servers
To administer clustered server, on the JReport Administration page, click Cluster on the system
toolbar, then,
●
To shut down all servers or just one server:
1. Click the Admin tab, from the Shut Down Server drop-down list, select the server you want to
shut down (or select All).
2. Click the Shut Down button.
●
To set whether to notify somebody via e-mail when a server is down:
1. In the Admin tab, check the Enable notification after a server has been shut down option
if you want the cluster to send a notification mail to the specified e-mail address.
2. Enter the e-mail address in the E-mail Address box.
3. Click OK to save the settings.
Note: This option only applies to JReport Enterprise Server cluster environment, since at least
one running server is required for sending the e-mail when the other servers are down.
Monitoring clustered servers
The JReport Server Monitor is a standalone web-based application used for monitoring the overall
performance of JReport Enterprise Server. JReport Server Monitor should be used together with JReport
Enterprise Server.
JReport Server Monitor contains the following main features:
●
Inspects the status of JReport Enterprise Server.
●
Shows server performance statistics in Graph/Text mode.
●
Maintains JReport Enterprise Server.
●
Creates profiling reports: performance reports and statistics reports.
Before you can use JReport Server Monitor, the following steps must be taken:
1. Download and install JReport Server Monitor.
2. Modify the server.properties file in <monitor_install_root>\bin in order to configure the admin
server IP address and port information.
3. Copy rmi.auth from <adminserver_install_root>\bin of the admin server to
<monitor_install_root>\bin, or remove rmi.auth from <adminserver_install_root>\bin.
4. Start JReport Enterprise Server.
5. Launch MonitorServer.bat in <monitor_install_root>\bin to start JReport Server Monitor.
6. Access JReport Server Monitor using http://adminhost:serverport, or by clicking the Monitor
link on the JReport Administration page.
Note: The Monitor link will not be displayed on the JReport Administration page when the web.monitor.
link.enable property in the server.properties file in <server_install_root>\bin is set to false.
Related topics:
●
Monitoring JReport Enterprise Server
Tuning performance
Many variables affect the performance of JReport Enterprise Server. For example, the hardware and
software environment that it runs in. You may or may not have any influence in this regard, but you
are able to carry out performance tuning to make JReport Enterprise Server efficient, reliable, and fast.
Caching
The process of viewing report sets is the combination of loading the report sets from the disk and
generating report set files. It is obvious that skipping either of these two steps will shorten the elapsed
time. JReport Enterprise Server enables the caching of report sets and catalogs into memory, so that
they do not have to be loaded from disks, thereby, improving the performance.
Adjusting maximum number of handlers
JReport Enterprise Server can simultaneously respond to requests from the client-side. The number of
the executed requests is in inverse proportion to the speed of the response. The more requests that are
executed, the slower is the speed. To speed up running, you can set user handlers to be a
comparatively small number.
Adjusting engine priority
The performance of JReport Enterprise Server is influenced by the usage of the CPU that JReport
engine can occupy. A larger share of CPU usage will speed up the performance. JReport Enterprise
Server provides you with an option called Engine Priority, which allows you to adjust the engine's
utilization of the CPU in accordance with your own requirements. To tune JReport Enterprise Server for
best performance, you can modify this option to enable the engine to share a larger part of CPU usage
when it is running.
Using queue
When JReport Enterprise Server receives a report running request (background run or schedule run), it
creates a task for running the report and bundles the task to a thread. The task will create a new
engine instance and start to run the report.
If there is no queue control, the above process goes on until the maximum number of concurrent
reports permitted by the license is reached, and requests that exceed the permitted number will be
refused.
Queue control is used to reduce the maximum number of concurrent reports to a smaller number than
that permitted by the license so as to meet your system performance requirement.
If queue control is adopted, a task will create a new engine instance for running a report and occupy a
place for the report in the queue. Once the queue is full, requests that exceed the queue size will have
to wait for a free place in the queue. Only after a report finishes running, the associated place in the
queue will be released and the server can run another report.
You can increase or decrease the queue size by setting the property performance.max.reports in server.
properties file in the <install_root>\bin directory. Setting this property to a suitable value will lead
to marked improvement in performance.
Adjusting task priority
When using queue control you can set the priority of tasks waiting in the queue to run. To use task
priority, set performance.max.reports to the number of reports you want to run concurrently then set
queue.policy to 1, 2 or 3 depending on your requirements. You can also set queue.accelerated.size to a
number greater than 0 and less than performance.max.reports to set the number of reports running in
the accelerated queue. The queue.accelerated property sets the priority levels required to run in the
accelerated queue. The purpose of these properties is to allow high priority on-demand tasks to jump in
front of slower running scheduled tasks which may be running in the normal queue.
For example you might set the following properties in server.properties file located in <install_root>
\bin:
performance.max.reports=20
queue.accelerated=10,9
queue.accelerated.size=5
queue.policy=1
When you schedule reports to run they will by default run at priority 5 and when you run reports ondemand you can specify their priority so if you have many longer running reports running you can put
them at priority of 8 or less so up to 15 of them will run concurrently. This allows 5 slots for higher
priority on-demand reports to run immediately when requested so any reports with a priority of 9 or 10
will run in the accelerated queue and will not be held in the waiting queue until the long running reports
are completed.
Related topics:
●
Configuring a connection pool
Monitoring
JReport Server Monitor, which is a standalone web-based application used to monitor the overall
performance of JReport Enterprise Server, allows you to inspect the status of JReport Enterprise
Server, including the status of the servers in the cluster, the status of different report sets, the status
of on-line users and so on. JReport Server Monitor is able to generate and display the performance
chart of JReport Enterprise Server according to its statistics. Thus you can view the performance of
JReport Enterprise Server in the form of Line Chart Graph and Text. You can also use JReport Server
Monitor to maintain JReport Enterprise Server, such as shutting down servers, stopping waiting/running
tasks, logging out a valid user session and so on. By creating profiling reports using JReport Server
Monitor, you can inspect server performance in a certain period of time.
To access JReport Server Monitor:
1. Launch MonitorServer.bat in <monitor_install_root>\bin.
2. Click Monitor on the system toolbar of the JReport Administration page.
The following topics detail how to use the Server Monitor:
●
Monitoring the server status
●
Monitoring the server performance
Monitoring the server status
JReport Server Monitor allows you to inspect the status of JReport Enterprise Server. You can list the
servers and their status from a cluster. You can also list the report sets by drilling down into the
servers, for example, running report sets, waiting report sets, finished report sets, and failed report
sets. Tracking further down, you can even view the status of these report sets. Note however that
JReport Server Monitor is not able to monitor the information of a report set that is running in DHTML
format.
The following topics explain what JReport Server Monitor can do:
●
Showing the status of servers in a cluster
●
Monitoring the status of report sets
●
Monitoring the status of online users
●
Monitoring the status of the database connection pool
Showing the status of servers in a cluster
By accessing the home page of the JReport Server Monitor, you can see the status of each server in a
cluster, including the server name, host IP address, port, server type, and its status.
The Status table of the servers includes:
Column Heading
Value
Description
Name
The name of the server.
Host
The host IP address of the server.
Port
The RMI port number of the server.
Type
The type of the server. Can be Admin, Backup, or Slave.
Admin
The Admin server. You can perform maintenance, administration,
and configuration of the Admin server.
Backup
The Backup server. When the Admin server is down, one of the
Backup servers will be promoted to run as the Admin server. A
Backup server plays the same role as a slave server when the
Admin server is running fine.
Slave
The Slave server. A slave server performs business tasks, such as
running report sets, and submitting scheduled tasks.
Status
The status of the server. Can be Started, Not Started, Idle,
Working, Busy, Shut down, and Crashed.
Started
The server has been started and is ready for service.
Not Started
The server has not been started.
Idle
The server is idling.
Working
The server is working.
Busy
The server is busy and may not respond to the request.
Shut down
The server has been shut down.
Crashed
The server has crashed.
Monitoring the status of report sets
Expand any server node in the Clustered Server panel, and then click Report Sets, you can see the
status of the report sets.
You can select to view the status of different report sets from the drop-down list. There are five types
of report set status: all report sets, running report sets, waiting report sets, finished report sets, and
failed report sets.
●
Status of all report sets
●
Status of the running report sets
●
Status of the waiting report sets
●
Status of the finished report sets
●
Status of the failed report sets
Status of all report sets
The status table of all report sets includes:
Column Heading
Description
Report Set
The full path name of the report set.
User ID
The ID of the user who submitted the report set.
Submit Time
The time when the task was last submitted.
Pages
The total number of pages the last submitted report set has.
Number of Runs
The total number of report set runs since it is first published to JReport
Enterprise Server.
Status
The status of the submitted report set.
In addition, when you click the full path name of a report set, the Task Statistics dialog will pop up,
showing you the detailed task statistics, which include the following:
Task ID
The exact date and time when the report set was submitted.
Report Set
The path and name of the submitted report set.
Catalog
The catalog where the submitted report set lists.
Total Number of Times Run
The total number of times the submitted report set has run ever since a specific time.
Average Number of Times per Day
The average number of times the submitted report set has run per day.
Last Submit Time
The time when the report set was last submitted.
Status of the running report sets
The status table of the running report sets includes:
Column Heading
Description
Action
Stops the report set from running and makes it a failed report set.
Task ID
The internal ID for this report set.
Report Set
The full path name of the report set.
User ID
The ID of the user who submitted the report set.
Task Status
For running report sets, can be one of the following:
●
Running - The task is currently being processed.
●
Initializing Engine - The task is currently in the initializing engine stage.
●
Loading Report - The task is currently in the loading report stage.
●
Exporting - The task is currently in the exporting stage.
●
Exiting Engine - The task is currently in the exiting engine stage.
Task Type
The task type.
Start Time
The time when the task was started.
Elapsed Time
The elapsed time since the task was started.
Submit Time
The time when the task was submitted.
Run Host
The name of the host on which the task is performed.
Run Port
The port number of the host on which the task is performed.
Catalog
The catalog that the report set belongs to.
Status of the waiting report sets
The status table of the waiting report sets includes:
Column Heading
Description
Action
Stops the report set from running and makes it a failed report set.
Task ID
The internal ID for this report set.
Report Set
The full path name of the report set.
User ID
The ID of the user who submitted the report set.
Task Status
For waiting report sets, can be one of the following:
●
●
●
Submitted - The task has been submitted successfully.
Unlaunch - The task is currently in the unlaunch queue waiting to be
processed.
Task Queue - The task is currently in the task thread queue waiting to be
processed.
Task Type
The task type.
Submit Time
The time when the task was submitted.
Catalog
The catalog that the report set belongs to.
Status of the finished report sets
The status table of the finished report sets includes:
Column Heading
Description
Task ID
The internal ID for this report set.
Report Set
The full path name of the report set.
User ID
The ID of the user who submitted the report set.
Task Status
Completed.
The task has been processed successfully, and has accomplished all the
requirements.
Task Type
The task type.
Run Host
The name of the host on which the task is performed.
Run Port
The port number of the host on which the task is performed.
Catalog
The catalog that the report set belongs to.
Result File(s)
The path of the result file(s).
Report Set Pages
The total page number of the report set.
Reason
The reason why the task failed. Can be an exception or a meaningful description.
Submit Time
The time when the task was submitted.
Start Run Time
The time when the report set was started.
Completed Time
The time when the report set was completed.
Status of the failed report sets
The status table of the failed report sets includes:
Column Heading
Description
Task ID
The internal ID for this report set.
Report Set
The full path name of the report set.
User ID
The ID of the user who submitted the report set.
Task Status
Failed.
The task has encountered errors, and has failed to accomplish all the
requirements.
Task Type
The task type.
Run Host
The name of the host on which the task is performed.
Run Port
The port number of the host on which the task is performed.
Catalog
The catalog that the report set belongs to.
Result Files
The path of the result file(s).
Report Set Pages
The total page number of the report set.
Reason
The reason why the task fails. Can be an exception or a meaningful description.
Failed Info
The information about the report set's failure.
Submit Time
The time when the task was submitted.
Start Run Time
The time when the report set was started.
Completed Time
The time when the report set was completed.
Monitoring the status of online users
To see the status of the online users, expand any server node in the Clustered Server panel, and then
click Users. You can also select and remove specific users.
The status table of the online users includes:
Column Heading
Description
Session ID
The internal ID of the user session.
User ID
The ID of the user logged onto the server.
Create Time
The time when the user session was created.
Last Access Time
The time when the user last accessed the server.
HTTP Session ID
The session ID in the HTTP service.
Authentication
The authentication type. It can be Internal or External.
Monitoring the status of the database connection pool
To see the status of the database connection pool, expand any server node in the Clustered Server
panel, and then click Databases. You can also select and remove specific connections.
The status table of the connection pool includes:
#
Column Heading
Value
Description
1
User
String
The user who is currently using the connection.
2
URL
A URL connecting to a
database.
It specifies the connections that are based on a
URL which will be caught in the pool.
3
Expiring Time (s)
0 (default) or expiring
time. The unit is second.
If the value is zero then
the connection will never
expire.
Shows the time during which a connection can be
alive. If a connection has expired, the connection
pool will close it.
4
Idle Expiring Time
(s)
1 (default) or expiring
time. The unit is second.
Its value must be larger
than or equals to 1.
Shows the time during which a connection is kept
after it starts idling. If a connection is not used, it
will stay open until the idle expiry time has been
reached.
5
Maximal
Connection Count
0 (default) or a positive
integer.
Shows the pool size, which limits the number of
connections under a single URL
6
Maximal Share
Count
0 (default) or a positive
integer.
Shows the number of users who can share a
connection simultaneously.
7
Attempt
A positive integer, the
default value is 1.
Shows whether to re-create a connection when
the connection pool has failed to create one and
the number of attempts for creating the
connection. If the user sets this value to a nonpositive integer, the default value (1) will be
used.
8
Interval (ms)
0 (default) or a positive
integer. The unit is
millisecond (ms).
If property ‘Attempt' is larger than 1, then before
the connection pool retries to create a connection
it will wait for an interval time. This property
defines the interval time.
9
Last User
Connecting Time
(s)
0 (default) or a positive
integer. The unit is
second.
It shows the time elapsed since the last user has
taken this connection.
10
Current Idle Time
(s)
0 (default) or a positive
integer. The unit is
second.
Shows the time elapsed since the connection
started to idle.
11
Current Share
Count
0 (default) or a positive
integer.
Shows the number of users who are currently
sharing this connection.
Note: The properties numbered 2 to 8 can be set in the ConnectionPoolConfig.properties file in
<server_install_root>\bin and the last three properties will be shown according to the real time
status.
Monitoring the server performance
JReport Server Monitor can show performance counters in graph (Line chart and Bar chart) and text
mode.
To monitor the performance of JReport Enterprise Server:
1. In the Clustered Server panel of the JReport Server Monitor home page, click to select any server
node.
2. Click the Performance tab, and then click
on the toolbar.
3. Select a task type from the drop-down list, click to select the counters you want to add, and then
click Add.
4. The performance chart will then be displayed.
The available counters for different tasks are:
Task Type
Performance Counter
Description
Report Task
Waiting Report Number
The number of the currently waiting report
sets.
Running Report Number
The number of the currently running report
sets.
Finished Report Number
The number of the finished report sets.
Finished Report Pages
The number of pages of the finished report
sets.
Report Average Processing Time
The average processing time of each report
set.
Report Average Waiting Time
The average waiting time of each report set.
Valid User Session Number
The number of valid user sessions.
User Average Submit Rpt Num
The average number of report sets that a
user submits.
Database Connection Number
The number of database connections.
User Session
Database Connection
National Language Support
JReport products implement a National Language Support (NLS) feature, with which you can run
JReport Enterprise Server/JReport Web or report sets in different language environments.
This chapter is split into two topics:
●
NLS at application level
●
NLS at report set level
Related topics:
●
Appendix 3: Language and Region name list for National Language Support
NLS at application level
In JReport Enterprise Server, a folder "resources" is added in the installation root directory for holding
language packages. Each language package contains all the UI text and messages available in JReport
Enterprise Server and JReport Web and specifies the UI text in a specific language. When a language
package is applied, the JReport Enterprise Server and JReport Web UI will be displayed in the language
specified in the language package. When there are more than one language packages, you can select
the one you are familiar with for your own convenience as the JReport Enterprise Server environment
language. For example, if you are a German you may be glad to apply the German language package.
Moreover, when creating a WAR/EAR file to include a JReport Enterprise Server, the languages.jar
which packs all language resources in the <server_install_root>\resources directory will be
generated and included for the multiple language support. The languages.jar makes sure the server UI
text is displayed correctly after deploying the WAR/EAR to other application servers.
Manually adding a language package
Currently JReport provides only the English language packages: en and en-us. However, JReport
accepts user-customized language packages and can recognize and load them if they are correctly
specified, though it may be a big task.
In each language package, there are three property files which together contain all UI text and
messages in JReport Enterprise Server and JReport Web:
●
●
●
common.properties
This property file stores UI text and messages referred by both JReport Enterprise Server and
JReport Web in the specific language.
dhtml.properties
This property file stores UI text and messages referred by JReport Web in the specific language.
server.properties
This property file stores UI text and messages referred by JReport Enterprise Server in the specific
language.
The structure of a language package which is stored in the <server_install_root>\resources\server
\languages directory follows:
\LanguageName
\properties
common.properties
dhtml.properties
server.properties
To add a language package, follow the steps below:
1. Browse to the <server_install_root>\resources\server\languages directory.
2. Create a folder named fr. The folder name should keep to the naming criterion.
3. Copy the properties folder in the existing <server_install_root>\resources\server\languages
\en directory to the \fr folder.
4. Modify the three property files: common.properties, dhtml.properties, and server.properties in the
\fr folder. Translate all the text and messages after "=" in these files to French.
5. Save these property files with UTF-8 encoding.
6. Convert the contents in the three property files into Unicode using native2ascii.exe in the
<jdk_install_root>\bin directory by running the following line in the Command Console:
C:\j2sdk1.4.2_04\bin>native2ascii -encoding utf-8 common.properties >newcommon.
properties
C:\j2sdk1.4.2_04\bin>native2ascii -encoding utf-8 dhtml.properties >newdhtml.
properties
C:\j2sdk1.4.2_04\bin>native2ascii -encoding utf-8 server.properties >newserver.
properties
Note: When you convert your property files to the same directory as the original ones you
need give them new names instead of replacing the original in order to avoid problems.
7. Delete the original property files.
8. Change the names of the generated property files back to the same names as the original
property files: newcommon.properties to common.properties, newdhtml.properties to dhtml.
properties, and newserver.properties to server.properties.
9. Restart JReport Enterprise Server.
Naming criterion for language package folders
* FolderName(language)
* FolderName(language-country)
* FolderName(language-country-variant)
The folder name should be lower-case codes.
The language argument is a valid ISO Language Code. These codes are the lower-case two-letter codes
as defined by ISO-639. You can find a full list of these codes at a number of sites, for example: http://
www.ics.uci.edu/pub/ietf/http/related/iso639.txt.
The country argument is a valid ISO Country Code. These codes are the lower-case two-letter codes as
defined by ISO-3166. You can find a full list of these codes at a number of sites, for example: http://
www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.
The variant argument is a vendor or browser-specific code. For example, use win for Windows, mac for
Macintosh, and posix for POSIX. Where there are two variants, separate them with an underscore, and
put the more important one first.
Specifying the application language
Once the application language is set, it takes effect in both JReport Enterprise Server and JReport Web.
There are two ways of setting the application language:
Specifying by UI option
●
There is an option Specify Default Language for you to switch the application language. The available
language list depends on the language packages in <server_install_root>\resources\server
\languages.
To specify the application language:
❍
❍
For administrators, on the JReport Administration page, click Profile on the system toolbar, then
click Customize Server Preferences on the task bar of the Profile page, select the Advanced
tab and set the default application language for all users.
For end users, on the JReport Console page, click Profile on the system toolbar, then click
Customize Server Preferences on the task bar of the Profile page, select the Advanced tab and
set an application language for themselves.
Specifying by URL parameter
●
End users can control the application language by the parameter jrs.language when accessing the
JReport Console page or JReport Web UI via URLs. The format of the URL is as follows:
http://IP_Address:port/context/pagename?parameter=value&jrs.language=Language_Name
The value of jrs.language should be the same as the language package folder name in the
<server_install_root>\resources\server\languages directory and be lower-case letters.
The following are two examples:
❍
URL for accessing the JReport Console page:
http://127.0.0.1:8888/jinfonet/index.jsp?jrs.language=zh-cn
❍
URL for opening a report set in the DHTML format in JReport Web UI:
http://127.0.0.1:8888/dhtmljsp/dhtml.jsp?jrs.cmd=jrs.try_vw&jrs.report=/
SampleReports/EmployeeInformation.cls
&jrs.catalog=/SampleReports/SampleReports.cat&jrs.cat_version=1&jrs.path=/
SampleReports/EmployeeInformation.cls
&jrs.result_type=8&jrs.language=zh-cn
Note: The specified application language by URL parameter has higher priority than that specified by
UI option, and however takes effect only in the current user session.
NLS at report set level
If the NLS feature is enabled for a report when it is designed in JReport Designer, it will also be
available after the corresponding report set has been published to JReport Enterprise Server (for
detailed information about how to use the NLS feature in JReport Designer, see National Language
Support in the JReport Designer User's Guide). Then, when the report set is run in the client/server
scenario, different clients can select different languages for the rendering of the report set. Moreover,
you can edit NLS for the text of report labels on the JReport Administration page.
The following topics show how to use the NLS feature in JReport Enterprise Server:
●
Previewing NLS report sets
●
Running NLS report sets in Advanced mode
●
Scheduling NLS report sets
●
Editing NLS for report sets
●
Replacing fonts using NLS font map
●
Localizing page navigation links in HTML report outputs
Previewing NLS report sets
To preview a NLS report set in a specified language, follow the steps below:
1. Publish the NLS report set to JReport Enterprise Server.
2. Start JReport Enterprise Server and access the JReport Console page.
3. Click Profile on the system toolbar, then click Customize Server Preferences on the task bar of
the Profile page.
4. Select the Advanced tab, check Specify Default Language and choose a language from the
Language drop-down list.
5. Click OK to save the changes.
6. Browse to the report set you want to preview.
7. Click the name of the report set and the result will be displayed in the language you have specified.
Running NLS report sets in Advanced mode
To run a NLS report set in the Advanced mode, follow the steps below:
1. Publish the NLS report set to JReport Enterprise Server.
2. Start JReport Enterprise Server and access the JReport Console page.
3. Browse to the report set you want to run, select the report set row, right-click in the row and click
Advanced Run on the shortcut menu.
4. In the Format tab, select the Enable NLS checkbox, then choose the language and region from
the Using Language and Region drop-down list.
5. Select the corresponding encoding from the Encoding drop-down list.
6. Finish the other related options and click Finish to run the report set. The report set result will
then be run in the selected language.
Scheduling NLS report sets
To schedule a NLS report set, follow the steps below:
1. Publish the NLS report set to JReport Enterprise Server.
2. Start JReport Enterprise Server and access the JReport Console page.
3. Select the report set row, right-click in the row and select Schedule from the shortcut menu.
4. In the General tab, select the Enable NLS checkbox, then choose the language and region from
the Using Language and Region drop-down list.
5. Select the corresponding encoding from the Encoding drop-down list.
6. Finish the other related options and click Finish to perform the task. The report set result will
then be run in the selected language.
Editing NLS for report sets
JReport allows you to edit NLS for report sets in the Administration page of JReport Enterprise Server as you would with the
NLS Editor in JReport Designer. With the NLS Editor, you can translate a report set into a different language from the
original one. Note that this feature is provided for administrators only.
To edit NLS for a report set in JReport Enterprise Server:
1. Start JReport Enterprise Server and log onto the JReport Administration page.
2. In the resource tree, browse to the report set you want to edit.
3. Select the row that the report set is in, then click the NLS Editor button
dialog appears.
in the Control column. The NLS Editor
4. Specify a report set and catalog version as required.
5. Click the Add Language button, then in the Add Language dialog, choose the required languages from the Available
Languages box and add them to the Selected Languages box and click OK.
6. In the NLS Editor dialog, select a target language from the Language drop-down list.
7. Check Enable Display to translate all display texts in the report set version into the target language or modify them.
8. Check Enable Format to translate all formats in the report set version into the target language or modify them.
9. Check Enable Font to translate all fonts in the report set version into the target language or modify them.
10. Select another language and edit its NLS properties as shown above.
11. Click OK to accept the settings.
See also the NLS Editor dialog for detailed explanation about options in the dialog.
Notes:
●
●
You can also edit NLS for a specific report set version. To do this, on the JReport Administration page, access the Version
table of the report set, then click the NLS Editor link for the report set version.
When you switch among different languages by choosing languages from the Language drop-down list, you may find that
the text in the Translate column become unreadable. To resolve this problem, you can add -Djreport.url.
encoding=UTF-8 to the batch file that starts the server and then restart it.
Replacing fonts using NLS font map
In a NLS font map, the original font face and size that is to be replaced and the target font face and
size that will replace the original one are mapped together. When you run a report set that contains the
original font, it will be replaced by the target font defined in the NLS font map.
One map contains one pair of original and target font face and size. You can define font maps for every
locale or language, and all the NLS font maps you define are stored in a XML file named fontMaps.xml
which is located in <install_root>\properties.
Editing NLS font map
You can add, edit, and delete NLS font maps on the JReport Administration page according to your
requirement.
To create a new font map:
1. On the JReport Administration > Reports page, select the NLS Font Map tab, then click the
Create New Font Map link.
2. In the Create New Font Map dialog, select the language in which you want to create the font map
from the Language drop-down list.
3. Click the Add button to define a font mapping rule.
4. In the Original Fonts box, select the font face and font size for the original fonts, then in the
Target Fonts box, select the font face and size for the target fonts accordingly.
5. Check Use Relative Font Size if required, then the true final target font size will be the value of
the original font size plus the specified target font size.
6. Click OK to add the mapping rule to the font map.
7. Repeat steps 3 to 6 to add more mapping rules to the font map.
8. When done, click OK and the font map will then be created.
To edit a font map:
1. In the NLS Font Map tab of the JReport Administration > Reports page, click the language name
for the font map.
2. In the Edit Font Map dialog, add more mapping rules or remove some according to your
requirements.
3. When done, click OK to accept the changes.
To delete a font map:
1. In the NLS Font Map tab of the JReport Administration > Reports page, check the checkbox ahead
of the font map you want to remove.
2. Click the Delete link.
Notes:
●
●
When creating a font map with the Create New Font Map dialog, you can set the original font size to
"*", in this case, all fonts same as the original will be replaced by the target fonts.
You can also edit NLS font maps by modifying the fontMaps.xml file in <install_root>\properties
manually, however, if you take this way, you need restart the server after modifying the xml file in
order to make the changes take effect.
Font priority between the server NLS font map and report set NLS properties
When both the NLS properties for a report set and the NLS font map for the server have defined font
information, which will have higher priority and will be applied if you run the report set? It follows the
below rules:
●
●
●
For fonts that are defined in the NLS properties, NLS properties will be applied.
For fonts that are defined in the NLS font map and not in the NLS properties, NLS font map will be
applied.
For fonts defined in neither, the default value of the report set will be applied.
Localizing page navigation links in HTML report outputs
When you schedule to publish a report set to HTML format, or run it in Advanced mode in HTML format, you can
localize the names of page navigation links in the HTML report outputs, such as First, Previous, Next, and Last,
according to your requirements.
The localizing process is divided into three steps:
1. Create a property file for the desired language.
2. Enable the language for the report set.
3. Apply the localized link names to HTML report outputs.
The following explain the steps in detail:
Creating the property file
To localize the page navigation link names in HTML report outputs, a property file must be create first for the desired
language. To do this:
1. Create the sub directories in <server_install_root>\resources as follows: <server_install_root>
\resources\report\languages\[language-locale]\properties. For example, C:\JReport\Server\resources
\report\languages\zh-cn\properties.
For detailed information about the abbreviation for each language and locale, see Appendix 3: Language and
Region name list for National Language Support.
2. Create a report.properties file in the properties directory.
3. Open the property file and copy the following contents to it:
# The following is the report properties file format that can localize the link names in HTML.
4000101=First
4000102=Prev
4000103=Next
4000104=Last
4000105=Back
4000106=Refresh
4000107=@CurrentPageNumber; of @TotalPageNumber;
4. Translate the text after = to the language specified by the folder name.
Note: For the line "4000107=@CurrentPageNumber; of @TotalPageNumber;", you just need to translate
"of" to the desired language. In the HTML outputs, @CurrentPageNumber will be replaced by the current
page number, and @TotalPageNumber by the report total page number.
5. Save the property file with UTF-8 encoding.
6. Copy the property file to the <jdk_install_root>\bin directory.
7. Convert the contents in the property file into Unicode using native2ascii.exe in <jdk_install_root>\bin by
running the following command:
C:\j2sdk1.4.2_10\bin>native2ascii -encoding utf-8 report.properties > newreport.properties
Note: When you convert your property file to the same directory as the original one, you need to give it a
new name instead of replacing the original in order to avoid problems.
8. Delete report.properties in <server_install_root>\resources\report\languages\[language-locale]
\properties and copy newreport.properties in <jdk_install_root>\bin to it, then rename the property file
back to report.properties.
Enabling the language for the report set
When the property file is ready, the next step is to enable the language defined in the file for the required report set.
1. Start JReport Enterprise Server and log onto the JReport Administration page.
2. Browse to the row that the report set is in, then click the NLS Editor button
in the Control column.
3. In the NLS Editor dialog, specify a report set and catalog version as required and then click the Add Language
button.
4. In the Add Language dialog, choose the specified language from the Available Languages box and add it to the
Selected Languages box. Then click OK.
5. Click OK in the NLS Editor dialog to confirm the settings.
Now the language will have been enabled for the report set.
Applying the localized link names to HTML report outputs
To apply the localized link names to HTML outputs of the specified report set, follow the steps below:
1. Log onto the JReport Console page and browse to the report set.
2. Select the report set row, right-click in the row and then select Advanced Run or Schedule from the shortcut
menu.
3. In the Format/General tab of the Advanced Run/Schedule dialog, check Enable NLS and select the specified
language from the Using Language drop-down list.
4. Specify the other settings and finish the task. Then in the generated HTML outputs, you can see that the page
navigation links are displayed in the language you defined for the property file.
Accessibility
JReport supports accessibility attributes and a built-in accessible JReport Enterprise Server console. The
implementation standard is based on HTML specification 4.01 http://www.w3.org/TR/WCAG10-HTMLTECHS/ and information on Section 508 Standards: www.section508.gov and www.access-board.gov.
Making HTML format report results accessible
When designing a report in JReport Designer, you can add the accessibility related HTML attributes to
the report elements in order to make the HTML format result more readable and accessible. Those
attributes are provided in the Accessibility category of the Report Inspector.
To add accessibility to a report in the HTML format result:
1. Predefine necessary accessibility attributes when designing the report in JReport Designer.
When a report element is selected, the corresponding accessibility attributes are available in the
Report Inspector.
2. Enable Section 508 compliant output when exporting the report to HTML format.
In the HTML export option UI, check the option Section 508 Compliant Output.
If you only want to convert table/crosstab components into HTML data table in the HTML format
report result, check the option Use HTML Data Table.
The above two options are available on all HTML export option UIs in JReport Designer, JReport
Enterprise Server and JReport Web.
The accessible version of JReport Enterprise Server
JReport Enterprise Server enables the disabled users to visit the accessible version with simplified
functionality to read reports by reader agent or other assistive tools. In the accessible version, reports
are displayed in HTML format with accessibility attributes, and table/crosstab components are output as
HTML data table.
JReport Enterprise Server provides an option - Use Accessible Version, for setting the accessible version
of JReport Enterprise Server as the default portal UI for an end user after the user logs in. The default
port for accessible version is 8888 which is also the default port for JReport Console page in normal
version. That is to say, the Use Accessible Version option controls switching between normal version
and accessible version of JReport Enterprise Server UI when logging onto port 8888. By default this
option is unselected and end users are directed to the JReport Console page in normal version.
Activating the accessible version
The administrator can activate the accessible version for all users or for an individual user:
●
To enable for all users:
1. Log onto the JReport Administration page and click Profile on the system toolbar.
2. Click Customize Server Preferences on the task bar of the Profile page, then select the
Advanced tab.
3. Check the Use Accessible Version option, then click OK to apply the change.
●
To enable for an individual user:
1. Log onto the JReport Administration page and click Security on the system bar.
2. Select the User tab, locate the wanted user ID, then click the Preference link for the user.
3. In the Preference dialog, go to the Customize Server Preferences > Advanced tab.
4. Check the Use Accessible Version option, then click OK to save the change.
And a non-administrator user can also enable the accessible version by self on the JReport Console
page in the following way:
1. Log onto the JReport Console page and click Profile on the system toolbar.
2. Click Customize Server Preferences on the task tab of the Profile page, then select the
Advanced tab.
3. Check the Use Accessible Version option, then click OK to save the change.
After a user has been enabled the access to Accessible Version, the user will be directed to the
accessible version when he/she logs in next time. With the help of reader agent the user can navigate
through the server resource to view the target report.
Main options in the accessible version UI
Directory Path
Displays the current directory where you have come to follow the server resource tree.
Up to Higher Level Directory
Goes to the parent level folder.
Up to Top Level Directory
Goes to the default portal page.
Leave Accessible Version
Redirects to the normal version of JReport Console page with full functionalities. Once you leave the
accessible version, there is no way to return unless you re-log in. However, it is not recommended for
the disabled to leave the accessible version unless having others' help.
Select User Directory
You can choose to open either the My Reports folder or the Public Reports folder.
Catalog
Lists the catalogs used in the current directory.
Report List
Lists the folders and report sets and reports contained in the current directory. You can click the
hyperlinks in the Name column to open them.
JReport Portlet
JReport Portlet is a portlet implementation based on JSR-168 Portlet Specification. It is deployed and
run in a portal server container on the Java EE application server, to which JReport Enterprise Server is
deployed.
You can insert JReport Portlet objects into your portal page, and run reports in the JReport Portlet
window on the portal page. JReport Portlet provides DHTML report displays in the JReport Portlet
window, where necessary and easy-to-use ad hoc functions are available for you to manipulate and
customize reports.
However, a report that can run in a JReport Portlet should meet the following requirements:
●
●
●
The report is the only report in the report set.
The Portlet Report property of the report is set to true when it was designed in JReport Designer. By
default, this property is false.
There is only one dataset in the report.
The following topics are introduced about JReport Portlet:
●
Preparing the webservice for JReport Portlet
●
Deploying JReport Portlet to portal servers
●
Adding JReport Portlet to the portal server
●
Working with reports in JReport Portlet
Preparing the web service for JReport Portlet
Before you can deploy JReport Portlet to any portal server, your JReport Enterprise Server should have
been deployed to an application server. You can refer to Deploying JReport Enterprise Server to a Java
application server for details about the deploying procedure. However, the JReport Enterprise Server
WAR file jreport.war used in the deployment should be packaged using the following command in this
case (here it is assumed JReport Enterprise Server is installed to C:\JReport\Server):
C:\JReport\Server\bin\makewar buildWar4WS
Also, the reports you want to run in JReport Portlet should also be published to the JReport Webservice
Server, in advance, so that they can be loaded to the corresponding folder in JReport Portlet
automatically.
Assume that:
●
●
You have downloaded the JReport demo portlet reports, which are available in PortletReports.zip in
<server_install_root>\help\server\en\samples, to C:\PortalDemo.
The font and style files the demo portlet reports use have also been downloaded to C:\PortalDemo
\font and C:\PortalDemo\style. These files can be found in PR_Resources.zip which locates in
<server_install_root>\help\server\en\samples.
Note: If you want to use the demo reports JReport provides in JReport Portlet, before deploying jreport.
war to the web server, you need to add mysql-connector-java-5.x-bin.jar into \WEB-INF\lib, this is
because the JReport demo portlet reports are based on MySQL database. You can get the database
driver from PR_Resources.zip which is available in <server_install_root>\help\server\en\samples.
To publish the demo reports to the JReport Webservice Server:
1. Start the application server in which JReport Enterprise Server is deployed.
2. Open a web browser and set the URL to http://<hostname>:<webserver_port>/jreport to
access the JReport Webservice Server.
3. Open the My Reports/Public Reports folder, then click Publish > Publish to Local Server on
the task bar.
4. In the Publish to Local Server page, click the Browse button next to the From Folder field to
select the folder C:\PortalDemo where the portlet reports are saved.
5. Click the Browse button next to Font Directory, and then browse to select C:\PortalDemo\font.
6. Click the Browse button next to Style Directory, and then browse to select C:\PortalDemo\style.
7. Specify a name in the Resource Node Name box. This name is required and is used as the display
name of the resource in the server resource tree.
8. Click OK to publish the resources. Upon finishing, you will find a new folder of the specified
resource node name is added in the My Reports/Public Reports folder with the portlet reports.
After the portlet reports are published to the My Reports/Public Reports folder in the JReport
Webservice Server, they will also be automatically loaded to the My Portlet Reports/Public Portlet
Reports folder in JReport Portlet.
Reference: You can refer to Publishing resources from a local computer and Publishing resources from
a remote computer for more detailed instruction about the publishing steps.
Deploying JReport Portlet to portal servers
Assume JReport Enterprise Server is installed to C:\JReport\Server, before you can deploy JReport
Portlet to any portal server, you need to package the JReport Portlet WAR file by running the following
command.
C:\JReport\Server\bin\makewar buildPortletWar
When this is done, you can find the file jrportlet.war in C:\JReport\Server\bin\distribute. Then
you need to edit web.xml in \WEB-INF as follows:
●
Modify the host and port of of the webservice server according to your environment.
●
Set the value of jreport.authorized according to the portal server you install.
The following introduces how to deploy JReport Portlet to some specific portal servers. The web portal
servers supported are WebSphere 6.0.0.1, JBoss 2.6.5.SP1, Liferay 4.3.5, and above.
Deploying to WebSphere Portal
Assume that the WebSphere Portal Server has been installed in C:\websphere, to deploy JReport
Portlet to the portal server:
1. Start WebSphere Portal Server, open a web browser and set the URL to http://hostname:10038/
wps/myportal to access the WebSphere Portal.
2. Enter wpadmin for the User ID and admin for the Password, click Login and the WebSphere
Portal home page is displayed.
3. Click Launch to open the main menu, then click Administration > Web Modules on the menu.
4. On the Manage Web Modules page, click the install button.
5. Click Browse to find jrportlet.war in C:\JReport\Server\bin\distribute.
6. Click Finish to deploy JReport Portlet to the portal server.
Deploying to JBoss Portal
Assume that you have downloaded JBoss Portal 2.6.5-SP1 into C:\jboss, to deploy JReport Portlet to
the portal server:
1. Copy jrportlet.war in C:\JReport\Server\bin\distribute to C:\jboss\server\default\deploy.
2. Start JBoss Portal Server to finish deploying.
Deploying to Liferay
Assume that you have installed Liferay in C:\liferay, to deploy JReport Portlet to the portal server,
you can use one of the following two methods:
●
Method 1:
1. Copy jreport.war in C:\JReport\Server\bin\distribute to C:\liferay\webapps.
2. Copy jrportlet.war in the same directory to C:\Documents and Settings\user name\liferay
\deploy.
3. Start Liferay to finish deploying.
●
Method2:
1. Start Liferay, then open a web browser and set the URL to http://localhost:8080/user/
joebloggs to access the Liferay home page.
2. Click Plugins, and the plugin Installer dialog appears.
3. Click the Upload File tab.
4. Click Browse to find jreport.war in C:\JReport\Server\bin\distribute.
5. Click Install to finish.
6. Follow the above steps to deploy jrportlet.war.
Note: Because the Liferay Portal Server is integrated with Tomcat, you can deploy jreport.war to
Liferay directly instead of to the web server as explained in Preparing the webservice for JReport Portlet.
Adding JReport Portlet to the portal server
When JReport Portlet is successfully deployed to the portal server, the next step is to add it to the
portal server, so that you can work on the reports you have published to the JReport Webservice
Server, which are also available in JReport Portlet. This section explains adding JReport Portlet to
WebSphere Portal, JBoss Portal and Liferay specifically.
Adding to WebSphere Portal
To add JReport Portlet to WebSphere Portal, follow these steps:
1. Start WebSphere Portal Server, open a web browser and set the URL to http://hostname:10038/
wps/myportal.
2. On the WebSphere Portal home page, click Launch to open the main menu.
3. On the main menu, click Administration > Manage Pages. The Manage Pages page is then
displayed.
4. Click the Content Root link in the My pages table, and then click the New Page button to access
the Page Properties page.
5. Specify the title of the page as JReport in the Title text field, then click OK to add the page.
6. Click Launch again to open the main menu, then click JReport on the menu to access the
JReport page.
7. Click
at the upper right corner of the page to open the portlet palette.
8. Enter JReport in the Search field, then click
search result list.
. JReport Portlet View is then displayed in the
9. Drag the portlet to the JReport page.
Adding to JBoss Portal
To add JReport Portlet to JBoss Portal, follow these steps:
1. Start JBoss Portal Server, open a web browser and set the URL to http://localhost:8080/
portal.
2. Click Login in the upper right corner of the JBoss Portal page.
3. In the JBoss Login Portal dialog, enter admin for Username and admin for Password, then click
Login.
4. On the JBoss Portal home page, click Admin at the upper right corner, then click the Admin tab.
5. Click the Portlet Definitions sub tab, and then click the Create instance link in the JReport
Portlet View row.
6. In the JReport Portlet View instance creation dialog, enter JReport in the Create an instance
named text field, and then click the Create instance button.
7. In the Portlet Instances sub tab, enter JReport in the Add Instance Display Names text field,
select English in the Locale drop-down list and click Add Name.
8. Click Dashboard > Configure dashboard at the upper right corner of the JBoss Portal page.
9. In the Create a New Page dialog, specify JReport in the Page name text field, then click Save to
create the page.
10. Enter JReport in the Window Name text field, click Add button in the Page Layout panel, then the
JReport page will be added to the Portlet Instance associated to this window box.
11. Click Dashboard at the upper right corner to return to the JBoss Portal home page.
12. Now you can see the JReport tab is added on the JBoss Portal page.
Adding to Liferay
To add JReport Portlet to Liferay, follow these steps:
1. Start Liferay, open a web browser and set the URL to http://localhost:8080 to access the
Liferay home page.
2. Point to Welcome at the upper right corner of the home page, then click Sign In.
3. In the Sign in with a regular account box, enter test@liferay.com for Login and test as the
password, then click SIGN IN.
4. On the Liferay home page, click Add Page, enter JReport in the page name text field, then click
Save. A tab named JReport is then added.
5. Click the JReport tab, then expand the Welcome Joe Bloggs list and click Add Content on the
list.
6. In the Add Content dialog, click on JReport and then click the Add button to add one JReport
Portlet View window. You can add several windows according to your requirements by clicking the
Add button.
7. Close the Add Content dialog. Now JReport Portlet is ready on Liferay.
Working with reports in JReport Portlet
When reports are published to JReport Portlet, you can then run them and perform actions like sorting,
filtering, drilling, etc to the reports according to your requirements just as you do on JReport Enterprise
Server.
Running reports
To run a report in JReport Portlet:
1. Open JReport Portlet on the portal server.
2. In the Select Report window, select the report you want to run from the report list.
3. Click OK. If the report has parameters, you will be asked to specify the parameter values. Enter the
parameter values as required and then click Submit.
Note that, in the report list, only the reports that are published to the My Reports folder on the JReport
Webservice Server are listed. So if your reports are published to the Public Reports folder, to make them
available in the list, click Customize Report List button
in the Select Report window, then add the
reports from the Public Portlet Reports box to the My Portlet Reports box.
In the Select Report window, you can also rename the reports, or remove any report that is not required
according to your requirements.
●
To rename a report, select the report from the report list, click the Rename Report button
, then give
a new name for the report in the Rename Report dialog as required. Or, you can just double-click the
report row to rename it.
●
To remove a report, select the report you from the report list, then click the Remove Report button
.
Working with reports
When a report finishes running and is displayed in the JReport Portlet window, the following toolbar
commands are available in the window for you to work with:
Open
Opens another report in the window.
Rerun
Reruns the report to refresh the report data.
Export Excel
Exports the report result to Excel format.
Export PDF
Exports the report result to PDF format.
Sort
Sorts the report data in ascending or descending order on the field(s) you select.
Filter
Filters the report data according to the filter criteria you specify.
<Select a chart type>
For a chart report, you can change its chart type by selecting another type from the drop-down list.
Page navigation
If a report contains several pages, you can click the page number and the arrow buttons to navigate through
the report pages.
Besides the above operations, you can also drill the data in a crosstab into other dimensions, go to the
details of a group in a report, and link to another report or a detail report, so as to make the analysis of a
report more diverse and useful.
For details about the operations, refer to the specific topics in JReport Web - Interactive Reports.
Tip: The JReport Portlet window for each report can be customized according to your requirements. To do
, then specify the window title and the
this, In the report display window, click the Preferences button
toolbar commands that you want to display in the JReport Portlet window for the report.
Working with APIs
APIs provide extensibility by enabling you to leverage JReport components and services, and build
them into other applications, thus integrating JReport with their existing platform infrastructure.
For details about the usage of APIs available in JReport Enterprise Server, see JReport Enterprise
Server Javadoc located in <install_root>\help\server\en\api.
This chapter introduces how to install and utilize two types of significant APIs:
●
JReport Server API
●
DHTML API
JReport Server API
JReport Server API is a set of Java programming interfaces that run report sets, explore report
resources, and provide access control for report servers. It is mainly used for writing servlets, JSPs and
Java applications with report server features.
The following topics are covered in this chapter:
●
Installing the Server API
●
Creating and getting instances of the ReportEngine
●
Creating and getting instances of RptServer or HttpRptServer
●
Invoking the Server API
●
Overall Remote Server API & unified JSP
●
Secure RMI objects and universal RMI object management
●
Loading user data source classes at runtime
●
Applying a user defined CSS to the HTML result file
●
Specifying paths for the result files when using on-demand API
●
Setting dynamic parameter values when running/scheduling report set via API
●
API demos
●
RMI demos
●
Additional references
Installing the Server API
When you install JReport Enterprise Server, JReport Server API is also installed at the same time. After
installation, you will have the following components in <install_root>\lib:
●
JRESServlets.jar
●
JREngine.jar
●
servlet.jar
●
hsqldb.jar
●
log4j-1.2.8.jar
●
sac.jar
●
commons-codec-1.2.jar
The Server API classes are stored in the archive file JRESServlets.jar.
You need to set the classpath environment variable. Append the following jar files to your classpath
that compile and run applications which call the Server API:
<install_root>\lib\JRESServlets.jar; <install_root>\lib\JREngine.jar; <install_root>\lib
\servlet.jar; <install_root>\lib\log4j-1.2.8.jar; <install_root>\lib\sac.jar;
<install_root>\commons-codec-1.2.jar
Note: If you want to export reports to the following formats, you should add the corresponding class
package or jar with a valid path to the class path:
●
To e-mail or use the E-mail Notification function: activation-1.1.jar and mail-1.4.jar.
●
To FTP: commons-net-ftp-2.0.0.jar.
●
To PDF & DHTML: itext.jar.
●
To Excel: poiHSSF_151.jar.
●
To XML: xml-apis.jar and xercesImpl.jar.
●
To DHTML: JRWebDesign.jar.
Creating and getting instances of ReportEngine
To get an instance of the ReportEngine, you can use the method getInstance() or getInstance(boolean
setDebugLevel) in the jet.server.api.engine.ReportEngineFactory.
For example,
bean = ReportEngineFactory.getInstance();
or,
bean = ReportEngineFactory.getInstance(true);
Reference: See JReport Enterprise Server Javadoc in <install_root>\help\server\en\api for usage
of the ReportEngine methods.
Creating and getting instances of RptServer or HttpRptServer
You can use the following three methods to get the instances of RptServer or HttpRptServer. Note that
only one server can exist in the system, and in most circumstances, you should get the server instance
instead of creating a new one.
Method 1
Use the method jet.server.api.http.HttpUtil.initEnv(Properties props).
The method jet.server.api.http.HttpUtil.initEnv(...) creates and initializes the HttpRptServer object. If
the HttpRptServer has already been started, it will use the existing HttpRptServer instance. Use this
method to avoid creating more than one HttpRptServer instance.
//prepare report server initial properties.
//The property reporthome must be set. For example: c:\JReport\Server.
//Other properties are optional. They are:
//jrs.isMyServer: Indicates if the HTTP server is JReport standalone server.
//The default value is "false".
//temp_dir or jrs.dir.temp: The path of temp directory.
//The default value is <reporthome>\temp.
//history_dir or jrs.dir.history: The directory where all the versions
//of report set results will be maintained.
//The default value is <reporthome>\history.
//auth_scheme: It specifies the scheme of authentication.
//Its value must be Basic or Digest.The default value is Basic.
//default_doc: The home page of JReport Enterprise Server
//It is an HTML file. If it is not set or the file set to it cannot be loaded,
//the default home page of JReport Enterprise Server will be used.
//The path is relative to <install_root>, for example, docs/index.html.
//isConvertedServletPath: This property specifies whether your web server
//decodes the path if it contains special characters.
//This information is used for JRServlet to determine whether it needs
//to convert that path. If you don't specify this property, your web server
//is not supposed to decode the path.
//vError: Enables JReport Engine to output messages to a file and sets all
//log files' trace levels to OFF and error levels to ERROR.
//vDebug: Enables JReport Engine to output messages to a file and sets all
//log files' trace levels to INFO and error levels to WARN.
//Properties props = System.getProperties();
//get an initialized instance of HttpRptServer
HttpUtil.initEnv(props);
//also can get the instance of HttpRptServer by using
HttpUtil.getHttpRptServer()
// after called HttpUtil.initEnv(props)
jet.server.api.http.HttpRptServer httpRptServer = HttpUtil.getHttpRptServer();
//demo cast HttpRptServer to RptServer
jet.server.api.RptServer rptServer = httpRptServer;
Method 2
Call the method HttpUtil.checkLogin(HttpServletRequest req, HttpServletResponse res).
The method jet.server.api.http.HttpUtil.checkLogin(...) implicitly calls HttpUtil.initEnv(...) if necessary.
So you can get the HttpRptServer after calling HttpUtil.checkLogin(...).
// check login at first
if (HttpUtil.checkLogin(request, response))
{// get the instance of HttpRptServer
jet.server.api.http.HttpRptServer httpRptServer = HttpUtil.getHttpRptServer();
// do something
}
Method 3
Directly create an instance of HttpRptServer.
Demo 1:
//create an instance of HttpRptServer jet.server.api.http.HttpRptServer
//httpRptServer = new jet.server.jrserver.http.JRHttpRptServer();
//initialize the HttpRptServer.
//The property reporthome must be set.
//For example: c:\JReport\Server.
//Other properties are optional. The properties are:
//jrs.isMyServer: Indicates if the HTTP server is JReport standalone server.
//The default value is "false".
//temp_dir or jrs.dir.temp: The path of temp directory.
//The default value is <reporthome>\temp.
//history_dir or jrs.dir.history: The directory where all the versions
//of report set results will be maintained.
//The default value is <reporthome>\history.
//auth_scheme: It specifies the scheme of authentication.
//Its value must be Basic or Digest.The default value is Basic.
//default_doc: The home page of JReport Enterprise Server. It is an HTML file.
//If it is not set or the file set to it cannot be loaded,
//the default home page of JReport Enterprise Server will be used.
//The path is relative to <intall_root>, for example, docs/index.html.
//isConvertedServletPath: This property specifies whether your web server
//decodes the path if it contains special characters.
//This information is used for JRServlet to determine whether
//it needs to convert that path. If you don't specify
//this property, your web server is not supposed to decode the path.
//vError: Enables JReport Engine to output messages to a file and sets all
//log files' trace levels to OFF and error levels to ERROR.
//vDebug: Enables JReport Engine to output messages to a file and sets all
//log files' trace levels to INFO and error levels to WARN.
//at least the property reporthome should be set.
httpRptServer.init(System.getProperties());
httpRptServer.start();
Demo 2:
//create an instance of RptServer
jet.server.api.RptServer rptServer = new jet.server.jrserver.JRRptServer();
// initialize the RptServer.
// at least the property reporthome should be set.
rptServer.init(System.getProperties());
rptServer.start();
Invoking the Server API
JReport Server API can be invoked either by JSP or Servlet. This section presents to you the two
methods in detail.
Invoking using JSP
There are example JSPs which use the Server API in <intall_root>\public_html\jinfonet.
WebViewServlet and SendFileServlet are built-in servlets. WebViewServlet responds to the run-report
requests, while SendFileServlet sends the requested file to the client end. For Example, our JSP
example rsthtml.jsp calls SendFileServlet to send files such as jar file and report set results, and
getRptDescPage.jsp calls WebViewServlet to run report sets.
Here is a simple JSP example:
<%@ page import="java.io.*, java.util.*,jet.cs.util.*" %>
<%@ page import="jet.server.api.http.*" %>
<%@ page import="jet.server.api.*" %>
<%
try{
if( !HttpUtil.checkLogin(request, response) )
return;
}catch(TooManyUsersException e){
%>
Too many users!
<%
return;
}catch(TooManyTimesException e){
%>
Too many times to try to login!
<%
return;
}
if( !HttpUtil.checkPermission(request) ){
%>
Access denied!
<%
return;
}
try{
HttpRptServer httpRptServer = HttpUtil.getHttpRptServer();
String user = HttpUtil.getUser(request);
String cat = "/SampleReports/SampleReports.cat";
String rptName = "CustomerAnalysis.cls";
Properties ht = new Properties();
int rstType = APIConst.HTML;
// set result type
ht.put(APIConst.TAG_RESULT_TYPE, String.valueOf(rstType));
System.out.println("============================ht="+ht);
// the rst is name of the first HTML result page
String rst = httpRptServer.runReport(user, cat, rptName, ht);
if (rst == null) {
// warning error
} else {
// register the owner of the result.
httpRptServer.getTempResultOwnerManager().registerOwner(user,
HttpUtil.getTempResultKey(new File(rst).getName()));
// make the URL to view the first HTML result page.
// The "/sendfile/" is the path of built-in servlet of SendFileServlet
// of JReport Enterprise Server. This rstURL will redirect to the SendFileServlet.
// The SendFileServlet will send the HTML result page to the client.
String rstURL = request.getScheme() + "://" + request.getServerName() +
":" + request.getServerPort() +
"/servlet/sendfile/result/" + HttpUtil.encodeEsc(new File(rst).getName());
// redirect to the rstURL
response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
response.setHeader("Location", rstURL);
response.setHeader("Content-Location", rstURL);
}
}catch(RptServerException e){
// output error
e.printStackTrace();
}catch(Throwable t){
// output error
t.printStackTrace();
}
%>
Invoking using Servlet
After you have installed JReport Enterprise Server, you will find the illustrative test program
ViewHtmlPipelineServlet.java in <install_root>\help\server\en\samples.
Here is how ViewHtmlPipelineServlet.java works. First, the servlet.properties file and the mapping.
properties file in <install_root>\bin should be modified before it can be run. servlet.viewrpt.
code=ViewHtmlPipelineServlet should be added into the servlet.properties file as below:
# jrserver servlet
servlet.jrserver.code=jet.server.servlets.JRServlet
servlet.jrserver.initArgs=\
temp_dir=temp,\
history_dir=history,\
default_doc=docs\\index.html,\
debug=on
servlet.viewrpt.code=ViewHtmlPipelineServlet
servlet.webview.code=jet.server.servlets.WebViewServlet
servlet.sendfile.code=jet.server.servlets.SendFileServlet
servlet.webreporting.code=jet.web.design.Designlet
servlet.jrdhtml.code=jet.web.dhtml.DHTMLRunReportlet
servlet.dhtml.code=jet.web.dhtml.DHTMLlet
servlet.help.code=jet.web.dhtml.JHelplet
servlet.jspservlet.code=org.apache.jasper.servlet.JspServlet
servlet.jspservlet.initArgs=keepgenerated=false, development=false, reloading=true,
scratchdir=C:\JReport\Server\scratchdir
Note: If you want to access the temporary result files generated by running reports with the Server
API, you should register as the owner of the temporary results by invoking the method jet.server.api.
TempResultOwnerManager.registerOwner(String owner, String tempResult) and then you can view the
temporary result files via URL or by clicking the link on the Background Tasks page, or else an Access
denied error warns.
Overall Remote Server API & unified JSP
JReport Enterprise Server allows you to run our JSPs on other machines. For example, you can invoke
JReport Enterprise Server interface remotely, so that you can conveniently use the Remote Server API to
accomplish your tasks. By using JSPs in your web applications, the Remote Server API enables you to
perform report set running tasks remotely, to view the report set result directly from the client side, and to
administer JReport Enterprise Server, without having to install JReport Enterprise Server on the client
machine.
You can find the Remote Server API in the jet.server.api.rmi package in the JReport Enterprise Server
Javadoc located in <install_root>\help\server\en\api.
Before using the Remote Server API, you must make sure that:
1. The RMI service is opened in JReport Enterprise Server side.
Set the server.rmiserver.enable property to true in the server.properties file located in <install_ root>
\bin.
When JReport Enterprise Server resides behind a firewall, you need to specify a fixed port in order to
pass through the firewall and obtain the remote objects from the client side by setting the server.
rmiserver.fixed_port property in the server.properties file.
2. JReport Enterprise Server remote host and port information is passed to the client application.
Set the following parameters as the JVM environment variables in the client side:
❍
Djrs.remote.host=<HOST_NAME/IP_address>
❍
Djrs.remote.rmiport=<HOST_PORT>
❍
Djrs.rmi.auth_file=<authFileName> (optional)
You have two alternatives for setting these parameters:
❍
❍
You can add -Djrs.remote.host, -Djrs.remote.rmiport and -Djrs.rmi.auth_file (optional) to the
batch file that is used to start your application.
If you are in an integration environment, you can also add the following to the web.xml file:
<context-param>
<param-name>jrs.remote.host</param-name>
<param-value>127.0.0.1</param-value>
</context-param>
<context-param>
<param-name>jrs.remote.rmiport</param-name>
<param-value>1129</param-value>
</context-param>
<!-- The third param(jrs.rmi.auth_file) is optional. "authFileName" includes the auth
file's realpath and auth file name. For example: C:\JReport\Server\bin\rmi.auth-->
<context-param>
<param-name>jrs.rmi.auth_file</param-name>
<param-value>C:\JReport\Server\bin\rmi.auth</param-value>
</context-param>
<listener>
<listener-class>jet.server.servlets.JRServerContextListener</listener-class>
</listener>
Administering JReport Enterprise Server remotely
JReport Enterprise Server can be administered from a remote client by Remote Admin Service API. The
administration of a JReport Enterprise Server includes cluster administration, resource administration,
security administration, configuration, connection pool management, resource alias management, connection
information provider service, and catalog information management.
You can find the Remote Admin Service API in the jet.server.api.rmi.admin package available in the JReport
Enterprise Server Javadoc which is located in <install_root>\help\server\en\api.
Before a JReport Enterprise Server can be performed the remote administration operation on, you need to set
the following properties in the server.properties file located in <install_ root>\bin in the JReport
Enterprise Server side:
●
●
●
server.rmiserver.enable=true
Used to open the RMI service.
server.rmiadminservice.enable=true
Used to open the administration service in the RMI server. By default this property is set to false and the
JReport Enterprise Server does not support remote administration.
server.rmiserver.fixed_port=<AnOpenedPort>
Required when JReport Enterprise Server runs behind a firewall.
Using single sign-on in RMI client
For implementation in a standalone server, follow the steps below:
1. Write your HttpExternalAuthorized implementation. For details, see Server security - Single sign-on.
2. Compile Java classes. Compiling requires the library JRESServlets.jar, which can be found in
<install_root>\lib directory.
3. Modify the class path used by your RMI client to include your external authentication classes, so that
your application of RMI can access them.
If it is in an integration environment, you can add the authentication classes in a folder named classes in
the WEB-INF folder.
4. Modify the start file of your RMI client to define the system property jrs.httpExternalAuthorized with your
implementation.
For example, assuming that the implementation of this interface is com.mycorp.
HttpExternalAuthorizedImpl.class, use the command line to start the RMI client:
java -Djrs.httpExternalAuthorized=com.mycorp.HttpExternalAuthorizedImpl ....
Then, restart the RMI client.
Secure RMI objects and universal RMI object management
RMI is frequently used in JReport Enterprise Server, such as for clustering, event system, Remote API,
and monitoring system. To avoid security risks and the mess of using the RMI registry (all the remote
objects bound with the RMI registry directly can cause the remote objects to be unmanageable),
universal remote object management has been introduced into JReport Enterprise Server.
In the universal remote object management system, when getting a remote object to perform certain
operations, either on a server (local or remote) or in a 3rd-party application (via Remote API), a
request must be sent to the remote object management to get that special remote object. Also,
authentication is required before any request for a remote object can be processed.
The authentication file
The authentication process requires a remote authentication file that contains the authentication
information to accomplish the security check. The remote authentication file (<install_root>\bin
\rmi.auth) is generated by JReport Enterprise Server automatically during the server installation
process. You can protect your authentication file by moving it to a safe place after installation.
Using the authentication file
The authentication file is commonly used in the following circumstances:
●
●
●
●
In JReport Enterprise Server, the remote object management system will use an authentication file,
which resides in the <server_install_root>\bin directory.
In JReport Enterprise Server Cluster, make sure that the authentication files on all clustered servers
are the same. If you want to add a new JReport Enterprise Server that has a different authentication
file to the server cluster, you should first backup the authentication file of that server, and then copy
the authentication file from the admin server in the JReport Enterprise Server cluster to
<server_install_root>\bin.
This file can then be used in JReport Server Monitor. Copy the authentication file generated by the
JReport Enterprise Server installation process to the directory <monitor_install_root>\bin.
JReport Server Monitor will then fetch it from <monitor_install_root>\bin and build an authInfo
object.
If the Remote API is used, you must specify the authentication file when launching an application
that contains the Remote API invocations. For example, java -cp ... -Djrs.rmi.auth_file=%
authFileName% mainClass. Also, you can specify a string by specifying the content of the
authentication file. For example, java -cp ... -Djrs.rmi.auth_string=my_auth_info mainClass.
Alternatively, you can specify the authentication string yourself arbitrarily. As long as the
authentication strings that the local and remote server both hold are the same, you can pass the
authentication check: java -cp ... -Djrs.rmi.auth_string=my_auth_info mainClass.
Note: In JReport Enterprise Server and JReport Server Monitor, you can also use -Djrs.rmi.
auth_file or -Djrs.rmi.auth_string in the startup file. JReport Enterprise Server/JReport
Server Monitor looks up these three locations in turn (-Djrs.rmi.auth_string => -Djrs.rmi.
auth_file => <monitor_install_root>\bin) when checking authentication information. The
information first found will be used for the authentication check in the remote object
management system.
Ways to generate authentication information
The authentication information can be of any bytes, as long as the authInfo objects match between the
local and the remote server. The following are the methods for specifying authentication information:
●
●
●
●
You can get the authentication file (rmi.auth) generated when installing the server.
You can use the RMIAuthFileCreator.bat file stored in <server_install_root>\bin to generate the
authentication file.
You can compose any string into the auth file using any text editor.
You can compose any string as the value of the system property -Djrs.rmi.auth_file or -Djrs.rmi.auth
to specify authentication information.
Loading user data source classes at runtime
JReport allows you to create your report sets using user data source (UDS), user defined objects (UDO), and
user defined formulas (UDF). When you publish the report sets using UDS, UDO or UDF to your production
environment, JReport requires the UDS, UDO or UDF jars to be in the classpath or part of the EAR bundle. This
might be difficult for you. You need to shut down your application and wrap the new UDS, UDO or UDF classes
into the WAR or EAR or put them in the classpath of the application server.
The feature Loading User Classes at Runtime can solve this issue. That is, for standalone JReport Enterprise
Server, or in your embedded application server calling the Server API, you can control loading the classes at
runtime without shutting down your application.
Methods
There are two important methods in the Server API that you need to call to dynamically load your UDS classes:
●
●
String jet.server.api.ServerEnv.getDynamicClassDir()
Retrieves the path of the dynamic classes of the report server.
static void jet.server.api.engine.ReportEngineFactory.loadClasses(String path)
Loads the dynamic classes from the location specified by the path parameter.
Usage
Follow the steps below:
1. Specify a folder location on the machine where JReport Enterprise Server runs to hold all the UDS/UDO/
UDF jar files, so that you can specify to load the classes from that folder. When JReport Enterprise Server
initializes, you can specify the location in one of the following ways:
❍
Using the Server API static void jet.server.api.http.HttpUtil.initEnv(java.util.Properties props)
Use the key server.dynamic.class.dir to set the location, for example:
System.getProperties().put("server.dynamic.class.dir", "c:\\JReport\\Server\\dynamic");
HttpUtil.initEnv(System.getProperties());
❍
Using the option -Dserver.dynamic.class.dir in the server/application startup file
It will be loaded to system properties. Here is an example:
-Dserver.dynamic.class.dir=YOUR_FOLDER
❍
Using the property entry server.dynamic.class.dir in the server.properties file located in
<install_root>\bin
The default value of this property is <install_root>\dynamicclasses. Here is an example:
server.dynamic.class.dir=YOUR_FOLDER.
Note: In general, among the above three approaches, the first has the highest priority, and the third
has the lowest.
2. Check the dynamic UDS/UDO/UDF folder any time by calling the method static String jet.server.api.
ServerEnv.getDynamicClassDir().
Usage of the method:
HttpUtil.getHttpRptServer().getServerEnv().getDynamicClassDir()
Example:
System.out.println("Dynamic path"+httpRptServer.getServerEnv().getDynamicClassDir());
You can get the path's value in your own properties file. You can even copy your UDS/UDO/UDF jar files to
the above folders programmatically.
3. Specify to load classes at runtime by calling the method static void jet.server.api.engine.
ReportEngineFactory.loadClasses(java.lang.String path). The parameter path is the dynamic class folder.
For example:
ReportEngineFactory.loadClasses(httpRptServer.getServerEnv().getDynamicClassDir());
Notes (technical issues):
●
●
●
Only *.jar or *.zip packages in the specified folder including resource files (recommended *.jar) will be
loaded, which excludes the sub directories and unpackaged classes.
If there are duplicated classes (having the same package and class name) in different *.jar files, the default
loading sequence is in time order. The latest modified file will be loaded first, and the older ones will be
neglected.
If you split one dynamic UDS classes into different *.jar or *.zip packages and also want to take advantage of
dynamic loader, then you should follow the below rules:
❍
❍
❍
❍
●
●
The classes in the *.jar or *.zip packages in the dynamic class folder can call or refer the classes under the
JVM's class path, it cannot work in reverse.
If your UDS classes also go to load the recourse files,
●
●
The jar with the main class implementing JRUserDataSource class of the dynamic UDS must be in the
dynamic class folder.
You should bundle the resource files into a jar no matter whether it is in the same class jar file or not.
In addition, the classes (in the *.jar or *.zip ) in the dynamic class folder can get the recourse files both in
the dynamic class folder and under the JVM class path. However, the classes under the JVM class path
cannot get the resource files in the dynamic class folder.
When you call the API for loading the classes, JReport Enterprise Server will not kill the running catalogs and
report sets but run them using the old UDS classes, and freeze new report sets until the loading action has
finished.
JReport Enterprise Server will try loading dynamic classes in the above way. If failed, it will try loading them
in the traditional way (using the class path in the JReport Enterprise Server startup file, or EAR/EAR in
embedded integration environment). Once it fails to find the classes, ClassNotFoundException will be thrown.
For the UDO classes, only the creator class and render class can be loaded.
Applying a user defined CSS to HTML result file
When exporting a report to HTML format, a .css file will be generated automatically by JReport to
control the appearance and layout of the result file. When exporting a report to HTML format with
Server API, JReport enables you to apply your own .css file to the HTML result file.
To apply user defined CSS to HTML result file:
1. In JReport Designer, specify the CSS selector in your own CSS for report objects.
Select the object which you want to apply in your own CSS, and in Report Inspector, specify a
value for the CSS property External CSS Class Selector. The value of the property should be the
selector in your .css file.
2. Publish the report set in which the report is located to JReport Enterprise Server (for details, see
Publishing resources).
3. Edit your JSP file that invokes the interface used to export the report to HTML format. JReport
provides a demo JSP file ApplyUserCSS.jsp in the file ApplyUserCSS.zip which is stored in
<install_root>\help\server\en\samples for your reference.
4. Export the report to HTML format using JReport Enterprise Server.
Specifying paths for the result files when using on-demand API
When you run a report set in the Advanced mode using the on-demand report execution API, you can specify the path for
the report set result files. See the following demo code:
Demo code of running the report set to the PDF format directly
//Set report properties
Properties props = new Properties();
//Set result type as .pdf format.
props.put(APIConst.TAG_RESULT_TYPE, String.valueOf(APIConst.PDF));
//Set result file location. The value of TAG_LOCATION_TO_SERVER_RESOURCE_PATH is 0,
//and the value of TAG_LOCATION_TO_SERVER_DISK_REAL_PATH is 1.
//The default value of TAG_RESULT_LOCATION_TYPE is 1.
//props.put(APIConst.TAG_RESULT_LOCATION_TYPE, String.valueOf(APIConst.
TAG_LOCATION_TO_SERVER_RESOURCE_PATH));
//props.put(APIConst.TAG_RESULT_LOCATION, "/SampleReports");
props.put(APIConst.TAG_RESULT_LOCATION_TYPE, String.valueOf(APIConst.
TAG_LOCATION_TO_SERVER_DISK_REAL_PATH));
props.put(APIConst.TAG_RESULT_LOCATION, "C:\\");
System.out.println("========to pdf=" + props);
tempResult = rptServer.runReport(user, catalog, rptName, props);
Demo code of exporting the RST file to HTML format
//Set task properties
Properties props = new Properties();
props.put(APIConst.TAG_RESULT_TYPE, String.valueOf(APIConst.RST));
//Set result file location.
props.put(APIConst.TAG_RESULT_LOCATION_TYPE, "0");
props.put(APIConst.TAG_RESULT_LOCATION, "/SampleReports");
System.out.println("========to pdf=" + props);
String tempResult = server.runReport("admin", catalog, rptName, props);
System.out.println("========tempResult="+tempResult);
//Export to HTML
props.put(APIConst.TAG_HTML, "Crosstab");
props.put(APIConst.TAG_HTML_DIR, "/SampleReports");
props.put(APIConst.TAG_HTML_DIR_TYPE, String.valueOf(APIConst.TAG_LOCATION_TO_SERVER_RESOURCE_PATH));
System.out.println("\n========exportResult="+props);
ExportedFileList fileList = server.exportResult("admin", tempResult, props);
System.out.println("\n========fileList.getHTMLFilenameList()="+fileList.getHTMLFilenameList());
Setting dynamic parameter values when running/scheduling report set via
API
When running or scheduling a report set with parameters via API, you can specify dynamic parameter
values by implementing the ParameterGenerator interface. See JReport Enterprise Server Javadoc in
<install_root>\help\server\en\api for detailed usage of the API.
To set dynamic parameter values to a report set:
1. Create a class MyParameterGeneratorImpl to implement the ParameterGenerator interface. See
the API demo DemoParameterGenerator.java in <install_root>\help\server\en\samples for
an example of implementing the ParameterGenerator interface.
2. Add the class path into the class path of your implementation of running or scheduling the report
set such as DemoParameterRunReport.
3. In DemoParameterRunReport, replace the way of setting static parameter values and instead set
dynamic values of the required parameters in the report set. Take the parameter PToday for
example:
First disable or delete the line:
props.put(APIConst.TAG_PARAM_PREFIX + "PToday", "2007-5-21");
and then add a line as follows:
props.put(APIConst.TAG_PARAM_PREFIX + "PToday", APIConst.TAG_PARAM_GEN_PREFIX +
"MyParameterGeneratorImpl";
API demos
Here is a list of some demo programs included within JReport Enterprise Server. All these programs are
available in <install_root>\help\server\en\samples.
●
●
●
●
●
●
●
●
●
●
●
●
●
●
1stepdl_demo.zip
An example of using JSP to build URL to run a report set in DHTML format. After extracting the zip to
a folder where JSP can be run, for example, <install_root>\public_html, a folder named demo is
added, and you can run the demo using the URL http://localhost:8888/demo/main.jsp.
APIDemoDeployRpt.java
An example of publishing catalogs, report sets, or folders to the server.
APIDemoPublishRpt.java
An example of publishing a scheduled task.
APIDemoRemoteFileService.java
An example of using remote report server.
APIDemoReportEngine.java
An example of using the ReportEngine to run a report set, export/print a report set, and set the
where portion.
APIDemoRunAndExportReport.java
An example of exporting a report set to some formats, and then saving them to local disk.
APIDemoRunReport.java
An example of running a report set.
APIDemoRunReportWithTimeout.java
An example of running report sets with timeout.
APIDemoSendEMail.java
An example of publishing a report set to e-mail.
CustomizedSendFileAuthorizor.java
Demonstrates implementation of SendFileAuthorizor, which is used to control users' accessibility to
certain files in server machine when they access the server via http.
getRptDescPage2.jsp.zip
A page enabling you to export the report set result to various formats (except for applet).
printDemo.jsp.zip
These JSP files show how to print reports by using ViewerApplet. For details, see Using JSPs to print
report sets.
PublishToRealDiskPath.java
This sample demonstrates exporting report result to physical disk path when publishing a scheduled
task.
runReport2.jsp.zip
Called by the getRptDescPage2.jsp to run a report set. To run JSP pages, you can put them in the
directory <intall_root>\public_html\jinfonet, and then access them from a web browser using
the URL http://host:8888/jinfonet/XXX.jsp.
RMI demos
Here are some demo RMI programs that JReport provides. They are available in <install_root>\help
\server\en\samples.
●
●
●
RemoteAPIDemoPublishRpt.java
A demo about publishing report sets. You can submit a schedule to export a report set to version,
disk, or e-mail.
RemoteAPIDemoRunAndExportReport.java
A demo about running report sets and exporting report set results to other formats.
RemoteAPIDemoRunReportWithTimeout.java
A demo about the Large Report Manager. This demo runs a report set and marks it as a large report
set by setting the timeout value, and then returns the large report set information.
Before running these demos, remember to do the following:
1. Modify the server.properties file in the <install_root>\bin directory to set the property server.
rmiserver.enable to true.
2. Add -Djrs.rmi.auth_file="%authFileName%" to the command line that starts the required
program.
3. Add the class path of servlet.jar to the command line that you use to start the required program,
for example: C:\JReport\Server\lib\servlet.jar.
Additional references
●
See JReport Enterprise Server Javadoc jet.server.api package, jet.server.api.http package and jet.cs.
util package in <install_root>\help\server\en\api.
●
Accessing JReport Enterprise Server.
●
See JReport Server Designer API in <install_root>\help\designer\api.
JReport Server Designer API is a program interface for creating new report sets or modifying existing
report sets. JReport Enterprise Server contains a full JReport Server Designer API package. It allows
concurrent users to create or modify multiple report sets at a time.
DHTML API
The DHTML API is a set of Java programming interfaces which allow you to customize the DHTML
feature of JReport Enterprise Server, so that you can conveniently use the JReport Web features
(completely or partially) in your product.
You can refer to the built-in JSP dhtml.jsp that comes with JReport Enterprise Server as a demo. It is
located in <intall_root>\public_html\dhtmljsp.
For DHTML API specifications, see the jet.web.dhtml package in JReport Enterprise Server Javadoc that
is located in <install_root>\help\server\en\api.
This section talks about the following three topics:
●
Installing the DHTML API
●
Getting started with the DHTML API
●
Advanced DHTML API application
Installing the DHTML API
When you install JReport Enterprise Server, JReport Server API including the DHTML API is also
installed at the same time. After installation, you have the following components in <install_root>
\lib:
●
JRESServlets.jar
●
JREngine.jar
●
servlet.jar
●
hsqldb.jar
●
log4j-1.2.8.jar
●
sac.jar
●
commons-codec-1.2.jar
JReport Server API classes are stored in the archive file JRESServlets.jar.
You will need to set the classpath environment variable. Append the following jar files to your classpath
that compile and run applications which call the Server API:
For Server:
<install_root>\lib\JRESServlets.jar; <install_root>\lib\JREngine.jar; <install_root>\lib
\servlet.jar; <install_root>\lib\log4j-1.2.8.jar; <install_root>\lib\sac.jar;
<install_root>\lib\commons-codec-1.2.jar
For DHTML, also include:
<install_root>\lib\JRWebDesign.jar;
Getting started with the DHTML API
How to get an instance of DHTML API
Note that before you can use the following methods to get a DHTML API instance, firstly you need to
import some relevant packages. For instance, jet.web.dhtml.* must be included here.
For local use
●
Both of the following methods can be used to get an instance of the DHTML API locally. The results of
these two methods are exactly the same.
❍
Method 1:
DHTMLClientService service = DHTMLServiceFactory.getDHTMLClientService(request);
❍
●
Method 2:
HttpRptServer server;
if (System.getProperty(APIConst.REMOTE_DISPATCHER) == null) {
server = HttpUtil.getHttpRptServer();
} else {
server = RemoteDispatcherFactory.getInstance().getDispatchedServer(request);
}
DHTMLClientService service = (DHTMLClientService)server.getDHTMLClientService();
For RMI use
This method can be used to get an instance of DHTML API from a remote server (RMI).
HttpRptServer server;
if (System.getProperty(APIConst.REMOTE_DISPATCHER) == null) {
server = HttpUtil.getHttpRptServer();
} else {
server = RemoteDispatcherFactory.getInstance().getDispatchedServer(request);
}
DHTMLClientService service = server.getDHTMLClientService();
Advanced DHTML API application
Besides fundamental functions that DHTML API provides, you can further obtain other instances from DHTMLClientService.
How to get the other instances
//Get a DHTML API instance using the method 1 or
//2 provided in the preceding section, and then
//use the following method to get the other instances.
//The instance "service" is supposed to be derived
//from the above method 1 or 2.
DHTMLConfig config = service.getDHTMLConfig();
DHTMLDataInfo dataInfo = service.getDHTMLDataInfo();
DHTMLWriter writer = service.getDHTMLWriter(sessionId, rptSetId)
How to use the other instances
Customizing DHTML toolbar using the DHTML API
DHTML API provides you with the API interface. With the DHTML API, you can easily embed the DHTML page or components
into your own JSP. Here jet.web.dhtml.DHTMLConfig is used to customize your own DHTML toolbar.
●
Method: jet.web.dhtml.DHTMLConfig.customizeToolbar (java.lang.String sessionId, java.lang.String rptSetId, java.lang.
String toolbarname, int[] buttonId, boolean isVisible)
This method is used to specify the buttons displayed on the DHTML toolbar.
Parameters:
❍
❍
❍
❍
❍
●
sessionId
The session id of the current user or current request.
rptSetId
The report set id of the current user or current request.
toolbarname
Name of the toolbar, such as "Standard", "View", "Analysis", and user-defined ones.
buttonId
The buttonId constant for the toolbar. The buttonId argument is an integer bitmask that can be
DHTMLConstant.TOOLBAR_UNDO, DHTMLConstant.TOOLBAR_REDO, DHTMLConstant.TOOLBAR_SEARCH,
DHTMLConstant.TOOLBAR_PREVIOUS_SEARCH, DHTMLConstant.TOOLBAR_NEXT_SEARCH, DHTMLConstant.
TOOLBAR_EXPORTTOHTML, DHTMLConstant.TOOLBAR_EXPORTTOPDF, DHTMLConstant.TOOLBAR_EXPORTTOXML,
DHTMLConstant.TOOLBAR_EXPORTTORTF, DHTMLConstant.TOOLBAR_EXPORTTOXLS, DHTMLConstant.
TOOLBAR_EXPORTTOTEXT, DHTMLConstant.TOOLBAR_EXPORTTOPS etc., or a bitwise union of them (for example,
DHTMLConstant.TOOLBAR_UNDO | DHTMLConstant.TOOLBAR_REDO).
isVisible
If it is true, the buttons are visible.
Method: jet.web.dhtml.DHTMLConfig.setUsedToolbar (java.lang.String sessionId, java.lang.String rptSetId, java.lang.
String rptName, java.lang.String toolbarName, boolean isShow)
This method is used to set the toolbar's default status: shown or hidden.
Parameters:
❍
❍
sessionId
The session id of the current user or current request.
rptSetId
The report set id of the current user or current request.
❍
❍
❍
rptName
The report name of the current user or current request.
toolbarname
Name of the toolbar, such as "Standard", "View", "Analysis", and user-defined ones.
isShow
If it is true, the toolbar is visible.
To customize the DHTML toolbar, you must add the following code to run_report.jsp in <intall_root>\public_html
\dhtmljsp. And this code must be after the RunReport() method.
DHTMLClientService service = DHTMLServiceFactory.getDHTMLClientService(request);
DHTMLConfig
dhtmlConfig = service.getDHTMLConfig();
String SessionID = DHTMLUtil.getSessionID(request);
String RptSetId = DHTMLUtil.getRptSetId(request);
int[] bId = new int[]{DHTMLConstant.TOOLBAR_EXPORTTOPDF,DHTMLConstant.TOOLBAR_EXPORTTOXML,DHTMLConstant.
TOOLBAR_SEARCH};
dhtmlConfig.customizeToolbar(SessionID, RptSetId, "View", bId, true);
dhtmlConfig.setUsedToolbar(SessionID, RptSetId, null, "View", true);
Reference: For more information on this topic, see the Javadoc located in <install_root>\help\server\en\api.
Dialog Reference
This chapter covers the dialogs that you will come across when using JReport Enterprise Server,
providing descriptions and explanations of the options available. By referencing this chapter, you will
find JReport Enterprise Server much easier and more convenient to use.
In this chapter, the following types of dialogs are covered:
●
JReport Enterprise Server dialogs
●
JReport Web dialogs
JReport Enterprise Server dialogs
There are two classes of dialog in JReport Enterprise Server. They are distinguished by the types of
users who can gain access to them. The JReport Console page dialogs are available to general users,
while the JReport Administration page dialogs are only accessible to users who have been assigned the
administrator's role.
The following are dialogs of the JReport Enterprise Server, which are listed in alphabetic order:
●
Advanced Run dialog
●
Auditing dialog
●
Change Password dialog
●
Cluster dialog
●
Configuration dialog
●
Create New Font Map dialog
●
Customize Waiting Page dialog
●
Data dialog
●
DHTML Profile dialog
●
Edit Expression dialog
●
Encrypt dialog
●
Enter Values dialog
●
Expression dialog
●
New Group dialog
●
New Realm dialog
●
New Role dialog
●
New Schedule dialog
●
New User dialog
●
NLS Editor dialog
●
Profile dialog
●
Properties dialog - catalog
●
Properties dialog - folder
●
Properties dialog - report set
●
Properties dialog - result
●
Publish to Local Server dialog
●
Publish to Remote Server dialog
●
Schedule dialog
●
Security dialog
●
Select Another Catalog dialog
●
Set Alias dialog
●
Set Permissions dialog
●
Sign dialog
●
Specify Catalog dialog
●
Triggers dialog
Advanced Run dialog
The Advanced Run dialog appears when you select a report set row on the JReport Console > Reports
page and then click Run > Advanced Run on the task bar of the Reports page.
There are four tabs in this dialog, which are listed below. You can set the settings to your requirements
in each tab.
●
General tab
●
Format tab
●
Archive tab
●
Duration tab
Back
Goes back to the left tab.
Next
Goes to the right tab.
Finish
Applies the settings.
Cancel
Closes the dialog and discards any changes.
Help
Displays this help document.
General tab
This tab allows you to specify the general information about a report.
Enter Parameters section
Specifies the report in the report set you want to run in Advanced mode and the parameter values for the report if any.
Select Report
Specifies the report from the report set which you want to run. Bursting reports are not listed in the table.
Parameters
Specifies values of the parameters applied in the selected report. If the report has no parameter, "No Parameter Needed" will be displayed
here.
You may specify parameter values in these ways:
●
●
●
●
In the parameter value combo box, input the value manually or select the required one from the drop-down list.
Click the button
, which is available when the parameter's Allow Multiple Values was set to true while it was created in JReport
Designer, to specify multiple values in the Enter Values dialog.
If the parameter is of DateTime type, click the calendar button
to set a DateTime value with calendar.
If the parameter is of Date, DateTime, or Time type, check the checkbox ahead of the button
dynamic date or time parameter value with expression in the Expression dialog.
and then click the button to specify a
●
Click the Use Previously Saved Auto Complete Parameters link, which is available when Enable Saving Parameter Values is checked
in the Profile > Customize Server Preferences > Advanced tab, to select a previously saved parameter value list to apply. You can view
the parameter values of the available lists or delete the unwanted list in the prompted dialog as required.
Save Current Parameters in Auto Complete List
Specifies to save the parameter values set for the specified report for reuse next time. The parameter values will then be saved as a whole
marked as a list, and you need to provide a name for the list in the prompted dialog as required. This link is available when Enable Saving
Parameter Values is checked in the Profile > Customize Server Preferences > Advanced tab.
The parameter value lists saved for the selected report are limited. The maximum number is controlled by the option Maximum Number of
Auto Complete Parameters List in the Profile > Customize Server Preferences > Advanced tab. By default it is 3. When the number of the
saved parameter value lists reaches the maximum number, if you want to save another parameter list, it will overwrite the oldest list.
Report Set Info section
Specifies other report set information.
Report Set
Lists the report set information.
Catalog
Lists the catalog information.
Select Another Catalog
Click to specify another catalog for the report set in the Select Another Catalog dialog.
Report Set Version
Specifies the report set version.
Catalog Version
Specifies the catalog version.
Priority
Specifies a priority level to the report running task. The priority levels are from 1 to 10 in ascending order of lowest priority to highest
priority. This property is available to administrators. By default this property is ignored unless server.properties is modified to set queue.
policy not equal to 0.
Format tab
This tab allows you to specify the format in which you would like to generate the report and set its corresponding settings.
Select Format section
Specifies the format of the report result.
Select Format
Specifies the format in which the report result will be. It can be one of the following:
●
DHTML
●
HTML
●
PDF
●
Excel
●
Text
●
RTF
●
XML
●
PostScript
●
Applet
Advanced section
Specifies some advanced format settings.
Enable Style Group
When this option is disabled as default, use the style group property of the report for this format that is predefined in JReport
Designer to run the report.
When this option is enabled, you are allowed to select a style group from the Style Group drop-down list to run the report in the
format. This setting will cancel the predefined style group property of the report for this format and replace it with the value
specified here to run the report. When the None item in the Style Group drop-down list is selected, no style will be applied when
running the report in the format.
Enable Converting Encoding
Specifies whether to enable the conversion of encoding. If checked, the Before Converting and After Converting options will be
activated. Select the encoding from the drop-down lists as required.
Encoding
Specifies the encoding for the report.
Use the default DB user and password defined in catalog
If checked, the default DB user and password defined in the catalog will be used.
Use the DB User
If checked, specify another DB user and password in the catalog instead of the default one.
Add TaskListener to be Invoked
Specifies whether to enable the user to call the Java application before/after viewing. Enabled only when the format is not specified
to DHTML.
With Load Balancer, prefer a server to run the task
Specifies whether to enable the user to directly specify a server in a cluster to perform a scheduled task or an advanced-run task
instead of using load balancing. This option is available only when there are more than one active clustered servers in a clustered
environment and when the Identify Server Preference option is selected in the Profile > Customize Server Preferences > Advanced
tab.
DHTML
This format allows you to export your report set to a DHTML result that can be viewed in a JReport DHTML window. Some reports
cannot be published to version in a DHTML result format, such as self-contained (CLX) reports, multi-level nested master and
subreports, reports containing data objects, and reports developed from a dynamic query or hierarchical data source (HDS).
Resolution
Specifies the resolution of the DHTML result to zoom in/out, in DPI. The default value is obtained from the operation system, which
is the resolution of your monitor, for example, 72 dpi on UNIX or 96 on Windows. You can set higher/lower value to zoom in/out.
Profile
Specifies the DHTML profile to be applied to run the report set, which contains a set of JReport Web settings.
Background Mode Timeout
Specifies the time after when the report set will run in background mode. When a DHTML report set runs and the results have not
yet been generated after the specified time, it will be automatically be switched to run in background mode.
HTML
No Margin
Removes the margins you originally set while designing the report.
Multiple Files
Generates the report result to multiple HTML files. JReport designates a serial number for each HTML page. For example, if you
named a 3-page report as "sales", JReport will create three files called sales_1.html, sales_2.html, and sales_3.html.
●
Embedded CSS
Specifies to embed the cascading style sheet (CSS) in the exported HTML files; otherwise, the .css file will be generated
individually.
Single File
Generates the report result to a single HTML file.
●
●
No Hyperlink
If checked, there will be no hyperlinks for navigating previous and next pages on the navigation bar of the exported HTML file.
No Page Number
If checked, there will be no page number information showing the current page number and total page number on the navigation
bar of the exported HTML file.
Drilldown
Generates the report result into an HTML file with the Drilldown feature enabled. The Drilldown feature enables you to inspect
certain items for further detailed data.
Section 508 Compliant Output
If checked, the accessibility attributes defined for the report elements via the Report Inspector will be exported to the HTML format
report result which is Section 508 compliant. See Accessibility for more information.
When Section 508 Compliant Output is checked, the Use HTML Data Table and Relative Font Size options will be checked and
disabled. The output will be Section 508 compliant including HTML data table, accessible attributes, and relative font feature.
Use HTML Data Table
Specifies whether the table and crosstab components will be output as table objects in the HTML format result.
Absolute Font Size
Generates the report result using an absolute font size, which means that the font size is fixed, and cannot be adjusted according to
the font size settings in the web browser.
Relative Font Size
Generates the report result using a relative font size. The font size can be adjusted according to the font size settings in the web
browser.
Use Chart
●
●
Applet Chart
Uses a Java applet to display the charts in an HTML format result file.
Image Chart
If selected, charts will be displayed as images. You can specify the image type from the drop-down list. The options are:
❍
❍
❍
❍
auto select
If selected, the image format will be detected to JPG or GIF by the JReport system automatically. If the image colors are less
than 256 colors, GIF will be applied; otherwise, it is JPG.
GIF
If selected, the GIF format will be applied, which is a lossless compression technique and supports only 256 colors. GIF is better
than JPG for images with only a few distinct colors, such as line drawings, black and white images and small text that is only a
few pixels high.
JPG (JPEG)
If selected, the JPG (JPEG) format will be applied, which is supported on the Web. JPG is a lossy compression technique that is
designed to compress color and grayscale continuous-tone images. JPG images support 16 million colors and are best suited for
photographs and complex graphics.
PNG
If selected, the PNG format will be applied, which provides a portable, legally unencumbered, well-compressed (effectively 100
percent lossless compression), well-specified standard for lossless bitmapped image file. PNG supports indexed-color images of
up to 256 colors and shows a more interchangeable, flexible and robust function than GIF.
Resolution
Specifies the resolution of the HTML result to zoom in/out, in DPI. The default value is obtained from the operation system, which is
the resolution of your monitor, for example, 72 dpi on UNIX or 96 on Windows. You can set higher/lower value to zoom in/out.
Web Browser
Specifies the web browser with which you want to view the HTML result file.
Text Overflow
Specifies whether the text overflow is visible or hidden.
PDF
No Margin
Removes the margins you originally set while designing the report.
Compress Image
Compresses the images in the report by the percentage you specify in the box.
Generate charts and barcodes using images (recommended)
When you run a report in PDF format, JReport will take the result of the whole report as a graphic to transform the report by the
method of simulated printer and generate the report result in PDF format.
Generate charts and barcodes using vector graphics
The result of using Generate charts and barcodes using vector graphics is the same as with using Generate charts and barcodes
using images (recommended). However, when you run a report in PDF format using Generate charts and barcodes using vector
graphics, JReport will take the result of the whole report as a dataset to transform the report by sequence and to generate the
report result in PDF format.
TOC
Generates the report result to PDF format with a Table of Contents.
Drilldown
Generates the report result to a PDF file with the Drilldown feature enabled. The Drilldown feature enables you to inspect certain
items for further detailed data.
Encrypt
Specifies whether to encrypt the PDF file. If checked, click the Settings button to configure the encrypt settings in the Encrypt
dialog.
Sign
Specifies whether to add the digital sign to the PDF file. If checked, click the Settings button to configure the sign settings in the
Sign dialog.
Excel
Word Wrap
●
●
●
Keep Existing
Keeps all the settings of each object's Word Wrap property originally specified in the report.
All Disabled
Disables the Word Wrap property for all objects. That is, the Word Wrap property is made false for all objects.
All Enabled
Enables the Word Wrap property for all objects. That is, the Word Wrap property is made true for all objects.
Preserve Report Formatting
Specifies to adopt the original layout of the report set when exporting.
Normal Formatting
If checked, and the Columned property of the report was set to true in JReport Designer, the exported Excel file will be in columned
format.
Excel 2000
If checked, only the report data will be exported without format.
More/Less Options
Click to show/hide the additional settings for exporting the report to Excel. When Excel 2000 is selected, there will be no more
options.
●
Include Shapes in Export
Specifies whether to include the drawing objects in the exported Excel file, such as line, oval, and box.
●
●
●
Print Page Header
Specifies the page header text for the printed file.
Print Page Footer
Specifies the page footer text for the printed file.
Print Gridlines
Specifies whether to include gridlines when printing the exported Excel file.
Text
Delimited Format
Generates the report result to a standard text file, using a delimiter you specify to separate the fields.
●
●
●
●
●
Use Quote Mark
Specifies to use quote marks in the text file.
Repeat Last Column Value If Null
If checked, when a cell in the exported CSV text has no value, value of the previous cell in the same column will be used.
Customize Delimited
Fields in the exported text file will be separated by a user defined delimiter. You can type your own delimiter in the Delimiter box.
Tab Delimited
Specifies to use a Tab delimiter to separate the fields.
CSV Format
Exports to CSV format text file.
Horizontal Density
Specifies the value for each unit of the horizontal density between columns. The resulting density is a direct ratio of the value you
specify. That is, the greater the value, the smaller the width between columns. By default the density will be specified by JReport.
Vertical Density
Specifies the value for each unit of the vertical density between columns. The resulting density is a direct ratio of the value you
specify. That is, the greater the value, the smaller the height between columns. By default the density will be specified by JReport.
Notes:
●
By exporting using user defined densities, if the densities are not set appropriately, the fields in the report may overlap each
other, so you are not recommended to use this way to export the report result to Text.
When setting the value of Horizontal/Vertical Density, you need to pay attention to the following:
●
❍
❍
❍
❍
❍
The value of Horizontal/Vertical Density must be greater than the character's width/height of the smallest field in the report
(smallest field is the field with the smallest font size), otherwise, the value you set will not be applied.
If the value of Vertical Density is greater than 0 and the value of Horizontal Density is less than 0, the value that you specify for
the Vertical Density will be applied and the value of Horizontal Density will be specified by JReport.
If the value of Vertical Density is less than 0 and the value of Horizontal Density is greater than 0, the value that you specify for
the Horizontal Density will be applied and the value of Vertical Density will be specified by JReport.
If the values of Vertical Density and Horizontal Density are both greater than 0 and the value of Horizontal Density is less than
11, the specified value of the two densities will be applied. Otherwise, they will be specified by JReport.
If the values of Vertical Density and Horizontal Density are both less than 1, these densities will be specified by JReport.
Compress
Specifies whether to generate the report set result to Text format in a compressed size, that is to say, there will be no clearance
between the columns.
Header and Footer
If checked, the Text file will contain all headers and footers in the report, including Report Header/Footer, Page Header/Footer and
Group Header/Footer. Otherwise, the Text file will only contain data in Detail panel.
Windows End-of-line (CR-LF)
Specifies to use Windows end-of-line characters to indicate the start of a new line. If checked, two characters <cr> and <lf> will be
used at the end of the line.
Unix End-of-line (LF)
Specifies to use Unix End-of-line characters to indicate the start of a new line. If checked, only the Unix End-of-line character <lf>
will be used.
RTF
Best Editing
Specifies whether to apply flow layout when exporting the report to RTF.
No Margin
Removes the margins you originally set while designing the report.
XML
Only Data
●
●
If checked, the exported XML file will only contain the database column information. The exported XML schema file will only
contain the structure information of the report.
If unchecked, the exported XML file will also contain elements controlled by formulas, and the exported XML schema file will
contain all the detailed information from the report, including all the property values of each report object.
Schema File Name
Specifies the directory and the name of an existing XML schema (.xsd) file. If you specify an existing XML schema file, the exported
XML file, the generated XML file that is to be exported will be based on it. Otherwise, a new XML schema file will be generated to the
directory where the exported XML file is to be exported. The new XML schema file and the exported XML file will have the same
name but with different extensions.
PostScript
No Margin
Removes the margins you originally set while designing the report.
Applet
Pop-up Window
Specifies to show an Applet window when viewing a report.
Zip Result
Specifies to compress the result and its size would be smaller.
Java Plug-In 1.2 for Windows
Directs applets to run using Sun's Java Runtime Environment (JRE).
Java Plug-In 1.3 for Windows
Directs applets to run using Sun's Java Runtime Environment (JRE).
Note: You'd better specify a file destination when exporting a report set via Applet, such as D:\folder\filename.pdf in case you
may not find the result. By default when exporting a report set via Applet on Internet Explorer, the exported result will be located
on the Desktop, and when on Firefox, it will be in its installation root.
If you do not have read or write permission to the default location or the location you specified, you will get an access denied error.
To handle this, add the required permission in jdk\jre\lib\security\java.policy that the applet uses:
For the default location "Desktop":
permission java.util.PropertyPermission "user.dir", "read";
permission java.io.FilePermission "${user.home}${/}Desktop${/}*", "read,write";
For user defined location:
permission java.io.FilePermission "D:${/}temp${/}*", "read,write";
Archive tab
Options below are available only when the view format is NOT set as DHTML in the Format tab.
Auto Archive Properties
Specifies to archive the report set result version automatically after the report set has finished running.
Archive Location
Specifies the location in which to archive the report set result version.
●
●
●
Built-in Version Folder
Specifies to save the report set result version to the built-in version folder.
My Reports Folder
Specifies to save the report set result version to the My Reports folder.
Public Reports Folder
Specifies to save the report set result version to the Public Reports folder.
Input archive destination and result name
Specifies the name and location with which to archive the result.
Apply Archive Policy
Applies an archive policy to the report set result version.
●
●
Archive as New Version
Specifies whether to use multiple versions for the specified resource. Available only for the resources in the
resource tree. The Maximum Number of Versions option specifies the maximum version amount that will be
listed in the version table. By default the version amount is unlimited.
Replace Old Version
Specifies to replace the old version when a new version is generated.
Result Auto-delete
Specifies the deleted date of the report set result version. You should make sure to set the report set result
version as deleted automatically within one hundred years. If the time you specified exceeds one hundred
years, JReport Enterprise Server will keep the report set result forever.
●
●
Result Expires in N Days
Specifies a period after which the report set result version will be automatically deleted.
Result Expires After
Specifies a certain day on which the report set result version will be automatically deleted.
Set Permissions
Available only when the Archive Location is specified to be Public Reports Folder. Click the link to set user
permissions to the specified report.
Duration tab
This tab is available only when you have enabled the task-level timeout mechanism either by setting the task.duration.enable property
to true in the server.properties file or by checking the Enable Task Duration option in the Advanced tab of the Configuration dialog on
the JReport Administration page.
In this tab, you can specify a time duration for a task, and ask JReport Enterprise Server to cancel the task or to notify you or
someone else of the task status via e-mail if the task has not yet finished running when the task duration is up.
The following are the available options:
Timeout
Specifies the time duration for the task.
Notify by e-mail after the specified time
Sends an e-mail about the task information when the specified time is up.
●
Mail To
Specifies the e-mail address of the recipient.
Cancel the task after the specified time
Cancels the running task when the specified time is up.
Auditing dialog
This dialog is opened when you click the Auditing link of a user in the User tab of the Security dialog
on the JReport Administration page.
The following are details about the options in the dialog:
Disable Auditing on All Events
Specifies whether to audit on all events.
Auditing the Accessed Events
Specifies to audit accessed events and record them in the log file in <install_root>\logs.
●
Success
Specifies to audit and record the accessed events when they have been successfully performed.
●
Failure
Specifies to audit and record the accessed events when they fail.
Auditing the Management Events
Specifies to audit the management events and record them in the log file in <install_root>\logs.
●
●
Success
Specifies to audit and record management events when they have been successfully performed.
Failure
Specifies to audit and record management events when they fail.
OK
Audits and records the events with the information you have specified.
Cancel
Cancels operations and closes the dialog.
Change Password dialog
This dialog is opened when you click the Change Password link of a user in the User tab of the
Security dialog on the JReport Administration page.
The following are details about the options in the dialog:
Logged In User's Password
Specifies the password of the user.
New Password
Specifies the new password.
Confirm New Password
Confirms the new password by typing it in again.
OK
Changes the password with the information you have specified.
Cancel
Cancels operations and closes the dialog.
Cluster dialog
To access the Cluster dialog, click Cluster on the system toolbar of the JReport Administration page. The Cluster
dialog is only available when your JReport Enterprise Server license permits the cluster feature.
There are three tabs in this dialog as listed below:
●
Config tab
●
Weight tab
●
Admin tab
Config tab
Use this tab to configure the servers in a cluster.
New Server
Click to add a new server to the cluster.
Predefined server list
Lists the relevant information of the clustered servers.
●
●
●
●
●
Server Name
Displays the name of the server.
Host Address
Displays the host address of the server.
RMI Port
Displays the RMI port of the server.
Backup Priority
Displays the backup priority of the server.
Control
Controls the server. You can click the Delete link in the column to delete a specified server from the cluster.
Notes:
●
●
●
●
The backup priority for each backup server cannot be the same, but can be left empty. The default priority for
the admin server is 0, which is the highest level of priority in the cluster.
When you add a new server, if the server is a backup server, you must specify a backup priority for it,
otherwise it will be considered as a slave server and will never be promoted to be the admin server.
When you add a new server, if the server is a slave server, leave the backup priority field empty. Specifying a
backup priority for a slave server makes no sense to the cluster and will take no effect.
The name of the server you are adding does not necessarily need to be the same as the computer name from
where the server runs.
Weight tab
Use this tab to configure the performance weight on the admin server.
Catalog
Specifies the catalog that will be used for performance weight testing.
Report Set
Specifies the report set that will be used for performance weight testing.
Clustered Server Name
Displays the name of the clustered server.
Admin Server
Specifies whether the clustered server is the admin server or not.
Performance Weight
If you have chosen the Least Weighted Current Report Sets (Weighted Min-load) (loadbalance.type=2 in the
server.properties file) algorithm for load balancing, you will have to configure a performance weight for each
clustered server on the admin server. See Configuring performance weight for how to set performance weight
and how this algorithm works.
Performance weight is a positive float number. The higher performance weight you set to a clustered server, the
higher chance it may get selected by the admin server during load balancing.
Test
Calculate each clustered server's performance weight value at current time.
OK
Applies the settings.
Cancel
Cancels the settings.
Help
Displays this help document.
Admin tab
Use this tab to administrate the servers in a cluster.
Shut Down Server
Specifies the server you want to shut down from the drop-down list.
Shut Down
Shuts down the specified server.
Enable notification after a server has been shut down
Specifies to send a notification mail after a server is shut down.
●
E-mail Address
Specifies the e-mail address to which the notification will be sent after a server is shut down.
Note: This feature only applies to the JReport Enterprise Server Cluster environment due to requiring at least
one running server to send the mail when the other server is shut down.
OK
Applies the settings.
Cancel
Cancels the settings.
Help
Displays this help document.
Related topics:
●
Setting up a JReport Enterprise Server cluster
Configuration dialog
To access the Configuration dialog, click Configuration on the system toolbar of the JReport
Administration page.
The tabs in the Configuration dialog are as follows:
●
Cluster tab
●
Service tab
●
Log tab
●
Cache tab
●
Performance tab
●
Advanced tab
●
LDAP tab
●
Export tab
●
Connection tab
●
Upload tab
Cluster tab
The Cluster tab is available only when JReport Enterprise Server is installed with a license for cluster. It allows you to configure
the settings of three roles in a cluster - admin server, backup server and slave server.
The following are options available in this tab:
Admin Server
Specifies to indicate that this server will run as the admin server in the cluster.
Backup Server
Specifies to indicate that this server will run as the backup server in the cluster.
Slave Server
Specifies to indicate that this server will run as the slave server in the cluster.
Shared Properties Directory
Specifies a directory for storing system data. The Shared Properties Directory of all admin/backup servers must point to the
same location. This option is available for Admin server and Backup server only.
Shared Realm Directory
Specifies a directory for storing system data. The Shared Realm Directory of all admin/backup servers must point to the same
location. This option is available for Admin server and Backup server only.
Shared Resource Root
Specifies a directory for storing system data. The Shared Resource Root of all admin/backup servers must point to the same
location.
History Directory
Specifies a directory for storing report set/catalog/result files. For a non-admin server, a shared history directory can improve
performance, because a non-admin server can read/write files from/in history directory directly instead of reading/writing files
via the admin server.
Temporary Files Directory
Specifies a directory for storing temporary result files. Along with the running of JReport Enterprise Server, temporary result
files (generated by background run) will be written to the temp directory. With a shared temp directory, performance is
improved since there is no need to copy the temporary result files from one server to another.
Admin Server's RMI Host
Specifies the RMI IP address or host name of the admin server.
Admin Server's RMI Port
Specifies the RMI port number of the admin server.
Server's RMI Host
Specifies the RMI IP address or host name of the local server.
Server's RMI Port
Specifies the RMI port number of the local server.
Save
Applies any changes to JReport Enterprise Server.
Service tab
This tab allows you to configure the service settings of JReport Enterprise Server.
The following are the options available in the Service tab:
Port
Specifies a port as the TCP port on which JReport Enterprise Server listens.
When you start JReport Enterprise Server, you will need to specify a port as the TCP port on which the server listens. The port
can be an integer between 1 and 65535. However, numbers less than 1024 are usually reserved by system, and so numbers
larger than 1024 are preferred. JReport Enterprise Server uses 8888 as the default port.
Administration Port
Specifies the port used for remote administration. If JReport Enterprise Server is running as a standalone web server, the
administrator can specify the port for client users to configure and administer the server remotely. This port is where the servlet
for remote administration (jet.server.servlets.RcServlet) listens. The default administration port is 8889.
Maximum Number of Handlers
Specifies the maximum number of connection handlers.
A connection is set up between the server-side and a client-side when a request from the client-side reaches the server. The
maximum number of requests that can be handled depends on the maximum number of handlers. When there is a limit on the
maximum number of connection handlers, if there are no free connection handlers available, a request from the client-side will
be blocked. In which case, the request will either be handled after a connection handler has been set free, or be refused when
timeout occurs. A connection handler is set free after the server sends a response to a client request.
Maximum Number of Connections
Specifies the maximum number of HTTP connections between the server-side and client-side.
The maximum number of connections depends on the number of requests that can be handled. It should be larger than the
maximum number of handlers. For example, if the maximum number of handlers is 10, and the maximum number of
connections is 12, when the eleventh and twelfth requests come, they will be blocked until a handler has been set free. When
the thirteenth request comes, it will be refused.
Connection Timeout in _ Milliseconds
Specifies the maximum time in milliseconds for a request from a client-side to be blocked before being refused by the server. A
request will be blocked if there are no free connection handlers in the server. However, it cannot be blocked forever, and if
there are still no free connection handlers after the time specified here (in milliseconds), then the request will be refused back
to the client.
Enable Secure Socket Layer Connection
If enabled, you can use HTTPS schema to visit JReport Enterprise Server UI in the standalone mode.
●
●
●
●
●
●
●
Secure Port
The port used for visiting JReport Console page via HTTPS schema. It should be different from the Port for HTTP schema.
Secure Administration Port
The port used for visiting JReport Administration page via HTTPS schema. It should be different from the Administration Port
for HTTP schema.
Keystore File Path
The location of your trusted keystore file.
Keystore Password
The password used to protect the integrity of the keystore.
Keystore Type
The type of keystore to be instantiated. The valid values are JKS and PKCS12.
Keystore Protocol
The encryption/decryption protocol to be used on the socket. The valid values are SSL and TLS.
Keystore Algorithm
The X509 algorithm to use. This defaults to the Sun implementation (SunX509). For IBM JVMs you should use IbmX509.
Servlet Properties File Name
Displays the full path of the property file of the servlet jet.server.servlet.JRServlet.
Assuming that JReport Enterprise Server has been installed to C:\JReport\Server, the servlet property file is C:\JReport
\Server\bin\servlet.properties.
Active Realm
Specifies the realm that will take effect when the server starts up.
A realm is the context of JReport Enterprise Server where the entities reside. A user is a kind of entity that is contained in a
realm. Different users in one realm must have different names. There can be multiple realms in the server, but only one is
active at runtime. Only the users and resources in the active realm are accessible. Realm names cannot contain the "/" or "\"
character.
Provide Service On
Specifies whether JReport Enterprise Server listens on all network addresses or just some.
●
●
All Network Addresses
If checked, JReport Enterprise Server listens on all network addresses, which means that all the hosts of the machine are
active, and the client-end can connect with any of the hosts of this server.
Network Address At
If checked, JReport Enterprise Server listens on the specified hosts, and you can specify them by inputting the host names or
IP addresses.
Notes:
●
●
The machine that JReport Enterprise Server runs on can be multi-homed (for example, two interface cards have been
installed on the machine), if there is more than one IP address. JReport Enterprise Server opens the listening port at host
name 'localhost' or at IP address '127.0.0.1' automatically.
When Network Address At is checked, if you want to specify all the host addresses to be active, input * into this field; if you
want to specify more than one address to be active, you should separate them using a blank, for example, "leo
204.177.148.110".
Active Host Address
Lists the current active host' address.
Save
Applies changes to JReport Enterprise Server.
Log tab
Options for configuring JReport Enterprise Server logs have been provided in this tab. Logs can help you find out the reasons
of problems, track down the workflow of a business process, and debug trivial messages.
You can configure settings for each log category. After you select a log type, all the other options in the tab are used to define
the log type.
The options in the Log tab are listed as follows:
Log Type
Specifies the log category. It can be specified as one of the following:
●
●
●
●
Engine
Uses the "Engine" log if you want to log the events related to running reports, that is creating report results or exporting
reports. Reports are run by the Engine component of JReport Enterprise Server.
DHTML
Uses the "DHTML" log if you want to log the events related to end users modifying and saving DHTML format reports,
including Ad Hoc and analysis features supported by JReport Live.
Access
Uses the "Access" log if you want to log which users accessed which services, such as report running service and task
scheduling service.
Manage
Uses the "Manage" log if you want to log the events related to modifying settings in the Administration Console or server.
properties.
●
●
●
●
●
Error
Uses the "Error" log if you want to log errors in any of the categories.
Event
Uses the "Event" log if you want to log the events related to the lifecycle of the server instance, such as its start time and
stop time.
Debug
Uses the "Debug" log if you want to log the events most likely needed for debugging purposes, such as the exact SQL
statements used to query the database.
Performance
Uses the "Performance" log if you want to analyze the performance of report result or export operations.
Dump
Uses the "Dump" log if you want to log events related to at what time what action is started or ended during the process of
running tasks. For example, when the task is submitted, when the task is run, when the Engine is initiated, and when the
Engine is stopped.
Descriptions
Specifies the brief description of the specified log type.
Trace Level
Used for logging something expectable or regular, such as tracing program workflow, logging runtime information and
associated elements.
You can set the trace level of the specified log type to one of the following:
●
●
●
●
OFF
Specifies not to use the trace level.
OUTLINE
The OUTLINE level specifies an outline of program workflow, and dump global variables, including a single thread, multiple
threads, the time for when to begin to fetch data, and success in exporting to the specified result format.
INFO
The INFO level specifies informational messages that highlight the application progress at a coarse-grained level, and
important local variables, such as query, parameter, formula value used when running report sets, connection information,
and SQL statement.
TRIVIAL
The TRIVIAL Level specifies fine-grained informational events most useful in tracing an application. Such as the report
structure dump, or the result set dump.
Error Level
Used for logging something unexpected or irregular. For example, a URL is unreachable, a file is not there, or a table cannot
be found in a data source.
You can set the error level of the specified log type to one of the following:
●
●
●
●
OFF
Specifies not to use the error level.
FATAL
The FATAL level specifies severe error events that will presumably lead the application to abort, for example, failing to read
the valid key, and exceptions that result in feature uncompleted.
ERROR
The ERROR level specifies error events that may allow the application to continue running, such as failing to load a report
set, failing to find a catalog file, failing to parse a parameter, and failing to create db buffer.
WARN
The WARN level specifies potentially harmful situations, such as failing to find the resource, or having found invalid query or
formula with grammar error when loading a catalog.
Additivity
Determines the inheritance of the appenders defined by the Logger's ancestors.
Log Destination
Specifies where the log contents will be outputted to.
●
File
Outputs log contents to the file appender that requires a layout. Logs of the specified category are written into a file. When
File is checked, the following options are available:
❍
❍
❍
❍
❍
❍
●
Layout Type
Specifies the layout type used to format the log contents.
Pattern Conversion
Sets the conversion pattern for the Pattern Layout.
File Name
Specifies the name of the log file to which the File Appender will output the log contents. The suffix of the log file name
is .log.
Append
Specifies whether or not to retain the old contents of the specified file.
Buffered IO
Specifies to create a buffer for the log IO.
Rolling File
Outputs log contents to the rolling file appender that requires a layout. When Rolling File is checked, the following options
are available:
❍
❍
❍
❍
❍
❍
❍
❍
●
Threshold
Defines the appender's level (Log4j named as threshold).
Threshold
Defines the appender's level.
Layout Type
Describes the layout type used to format the log contents.
Pattern Conversion
Sets the conversion pattern for the Pattern Layout.
File Name
Specifies the name of the log file to which the appender will output the log contents. The suffix of the log file name is .
log.
Append
Specifies whether or not to retain the old contents of the specified file.
Buffered IO
Specifies to create a buffer for the log IO.
Maximum File Size
Decides the maximum file size of the rolling file appender. The log system will create a new rolling file when the file size
exceeds the maximum file size.
Maximum Backup Index
Decides the maximum number of the latest rolling files that will be retained by the log system.
Daily Rolling File
Outputs log contents to the daily rolling file appender that requires a layout. When Daily Rolling File is checked, the
following options are available:
❍
❍
❍
❍
❍
Threshold
Defines the appender's level.
Layout Type
Specifies the layout type used to format the log contents.
Pattern Conversion
Sets the conversion pattern for the Pattern Layout.
File Name
Specifies the name of the log file to which the appender will output the log contents. The suffix of the log file name is .log.
Append
Specifies whether or not to retain the old contents of the specified file.
❍
❍
●
❍
❍
❍
❍
❍
❍
❍
Remote Host
Specifies the host name where the Socket Server is located.
Port
Specifies the port number on which the Socket Server listens.
Delay
Specifies the timeout interval value for when a client attempts to create a socket connection.
Location Information
Specifies whether or not to output the log location information to the socket stream.
Threshold
Defines the appender's level.
Layout Type
Specifies the layout type used to format the log contents.
Pattern Conversion
Sets the conversion pattern for the Pattern Layout.
Source
Specifies the source name used and displayed by the NTEvent Viewer.
Syslog
Outputs log contents to a remote syslog daemon. Applies only to UNIX and Linux servers. This appender requires a layout.
When Syslog is checked, the following options are available:
❍
❍
❍
❍
❍
❍
●
Threshold
Defines the appender's level.
NTLog
Outputs log contents to the NT event log system. Applies only to Windows servers. This appender requires a layout. When
NTLog is checked, the following options are available:
❍
●
Date Pattern
Specifies the data pattern used to generate the daily rolling file.
Socket
Outputs log contents to a remote log server. The socket appender needs not a layout. When Socket is checked, the
following options are available:
❍
●
Buffered IO
Specifies to create a buffer for the log IO.
Threshold
Defines the appender's level.
Layout Type
Specifies the layout type used to format the log contents.
Pattern Conversion
Sets the conversion pattern for the Pattern Layout.
Syslog Host
Specifies the host name where the Syslog server is located.
Facility
Specifies the facility name that is used by the Syslog.
Facility Printing
Specifies whether or not to print the facility information.
LF5
Outputs log contents to a swing based logging console. LF5 has a swing-based UI to view all of the logging messages at run
time and enables you to search and filter logging messages. This appender needs not a layout.
When LF5 is checked, the following option is available:
❍
Threshold
Defines the appender's level.
●
Telnet
Outputs log contents to a read-only socket. You use telnet to connect to the socket and receive log data, and this is handy
for remote monitoring, especially when monitoring a servlet. This appender requires a layout.
When Telnet is checked, the following options are available:
❍
❍
❍
❍
●
Threshold
Defines the appender's level.
Layout Type
Specifies the layout type used to format the log contents.
Pattern Conversion
Sets the conversion pattern for the Pattern Layout.
Port
Specifies the port number on which Telnet listens.
Console
Outputs log contents to the standard stream of Jave console. When Console is checked, the following options are available:
❍
❍
❍
❍
Threshold
Defines the appender's level.
Layout Type
Specifies the layout type that is used to format the log contents.
Pattern Conversion
Sets the conversion pattern for the Pattern Layout.
Target
Specifies the standard IO target of the Console.
■
■
System.out
If selected, the log contents will be outputted to the standard output stream of the console.
System.err
If selected, the log contents will be outputted to the standard error stream of the console.
Save
Applies all changes to JReport Enterprise Server.
Notes:
●
●
The Pattern Conversion option is available only when the Pattern is chosen as the Layout Type.
For more information about the Pattern Conversion option, see comments in the LogConfig.properties file located in
<install_root>\bin directory.
Cache tab
This Cache tab allows you to configure the cache settings of JReport Enterprise Server. It contains three sub tabs:
●
Report Cache
●
Security Cache
●
Image Cache
Save
Applies the changes to JReport Enterprise Server.
Report Cache
To improve performance, JReport Enterprise Server enables you to cache report sets and catalogs into memory so that they do
not have to be loaded from disk when they are required. Note that when you run a report set to DHTML format, the report set
and the catalog will not be cached.
The following options are available in the tab.
Cache Loaded Catalogs
Specifies whether to keep a catalog in memory or to remove it from memory after a report set has been generated.
Usually, after a report set has been generated, the catalog used to generate it is removed from memory. However, if you
specify this option, the catalog will be cached instead of being removed.
●
●
Maximum Number of Catalogs to be Cached
Specifies the maximum number of catalogs that can be cached by the server in its memory. No more catalogs can be cached
if this amount has been reached.
Cached Catalogs
Lists the currently cached catalogs.
If you are using the Add button to add a catalog, the listed catalog item includes information such as catalog file path in the
server resource tree and catalog version number. The format is as follows:<catalog file path>-V<version number>. The root
path stand for the My Reports folder is /USERFOLDERPATH/admin/; the root path stand for the Public Reports folder is /.
For the catalogs that are automatically cached by the server after the report sets in them are run, the real paths of them are
listed.
❍
❍
Add
Adds a new catalog to the list of catalogs to be cached.
Remove
Deletes the selected cached catalog.
Cache Loaded Report Sets
Specifies whether to keep the report sets in memory or to remove them from memory after they have been generated.
●
Maximum Number of Report Sets to be Cached
Specify the maximum number of report sets that can be cached in the memory by the server. No more report sets can be
cached if this amount has been reached.
Each cached report set will use some heap memory. If the heap is used up, an OutOfMemoryException will be thrown. -ms/Xms specifies the initial heap and -mx/-Xmx specifies the maximum heap. For example, -ms10m -mx512m means that the
initial heap is 10MB and the maximum heap is 512MB. You can refer to the documents of the Java VM for more information.
Here is an example, the accuracy depends on your OS and VM:
Cache Size
Heap Size Required
10 report sets
16M
30 report sets
25M
The default cache size is 10 report sets and the default maximum heap space is 512MB. When you adjust the number, you
should adjust the heap accordingly. The larger the heap space, the better the performance provided enough physical memory
is available.
●
Cached Report Sets
Lists currently cached report sets.
If you are using the Add button to add a report set, the listed report set item includes information such as report set file path
in the server resource tree, report set version number, and applied style name. The format is as follows: <report set file
path>-V<version number>(<applied style name>). When there is no style applied, the applied style name is None. The root
path stand for the My Reports folder is /USERFOLDERPATH/admin/; the root path stand for the Public Reports folder is /.
For the report sets that are automatically cached by the server after they are run, the real paths of them are listed.
❍
❍
Add
Adds new report sets to the list to be cached.
Remove
Deletes the selected cached report sets.
Report Buffer Size for Sort Action
●
●
System Managed Size
Specifies whether to automatically control the buffer size used in the RAM for each report when sorting on DHTML reports by
system. If checked, all data for sorting will be stored in the RAM automatically.
Custom Size
Specifies to customize the buffer size used in the RAM for each report when sorting on DHTML reports. The default value is 16
MB, and the minimum size required by JReport is 4 MB. Any value smaller than 4 MB will be ignored and use 4 MB instead,
because if the amount of data for sorting is large (such as 5,000,000 records), but the buffer size that you configure is small,
it will require a lot of IO and produce poor performance.
Note: Any change to the buffer size will take effect immediately.
Security Cache
The following options are available in the tab.
User Cache Size
Specifies the maximum number of user objects in the security cache.
Role Cache Size
Specifies the maximum number of role objects in the security cache.
Group Cache Size
Specifies the maximum number of group objects in the security cache.
Protection Cache Size
Specifies the maximum number of ACL objects in the security cache.
Image Cache
The following options are available in tab.
Cache Images
Specifies whether or not to enable image cache.
●
●
●
All used images
If checked, all the images that are used in reports will be cached.
Maximum Image Cache Size
If checked, specify the maximum size for caching images as required. The default value is 10 MB.
Show Details
If checked, the detailed status of the current image cache will be shown, that is to say, you can see all the cached images.
❍
❍
❍
❍
❍
❍
Name
Displays the name of the image.
Size
Displays the size of the image file.
Catalog
Displays the catalog file in which the image file is.
Path
Displays the path of the cached image.
Locked
Displays the lock status of the image file.
Add
Adds an image to the image cache.
■
■
■
■
■
❍
❍
❍
❍
Look In
Specifies the root of the catalog, My Reports or Public Reports.
Select Directory
Specifies the directory of the catalog.
Catalog
Specifies the catalog from the drop-down list.
Image File
Specifies the image file.
Image Size
Displays the size of the selected image file.
Lock
If you select one image and lock it, the image will be always kept in cache until you remove it manually or restart JReport
Enterprise Server.
Unlock
The unlocked image will not be always be kept in cache.
Remove
Removes the selected image from the image cache.
Remove All
Removes all the images from the image cache.
Performance tab
This tab allows you to tune the performance of JReport Enterprise Server.
The options in this tab are as follows:
Catalogs to Be Preloaded
Displays the catalogs that will be loaded when JReport Enterprise Server is started.
●
●
●
Add
Adds a catalog to be preloaded.
Remove
Removes a catalog from the preloading list.
Preload Catalog Referred Classes
Specifies to preload the Java classes that are used by a catalog when JReport Enterprise Server is started.
Preloading some useful Java classes will improve performance. Otherwise, it will take some time for JReport Enterprise Server
to load any required Java classes when generating reports.
●
●
Preload Report Set Referred Classes
Specifies to preload the Java classes that are used by a report set when JReport Enterprise Server is started.
Preload Engine Referred Classes
Specifies to preload the Java classes used by the JReport Engine when generating reports when JReport Enterprise Server is
started.
Report Sets to Be Preloaded
Displays the report sets that will be loaded when JReport Enterprise Server is started.
●
Add
Adds a report set to be preloaded.
●
●
Remove
Removes a report set from the preloading list.
Preload Fonts
Specifies to preload fonts when JReport Enterprise Server is started.
Improve I/O Performance
●
Compress Swap Files
Specifies whether or not to compress the temporary data generated during runtime before it is swapped to disk. By
compressing the swap files, the I/O efforts in certain circumstance may remarkably reduced so that the overall performance
can be improved.
Note: Compressing swap files will increase CPU pressure because it uses compress algorithm to shrink data, so if your system
already has high CPU usage, enabling this option will bring extra performance impact, depending on different circumstance, and
such impact may overcome the performance gain that comes from reducing I/O time.
Save
Applies the changes to JReport Enterprise Server.
Advanced tab
This tab allows you to configure the advanced settings of JReport Enterprise Server.
The options available in this tab are as follows:
No Security Check
Specifies whether the server responds to all the requests without security checking.
Enable "Publish to Versioning System" for Background Tasks View
Specifies whether to generate the hyperlink Publish to Versioning System in the view page when you run a report set on the
JReport Console page. Click this hyperlink to save the report set result as a version.
Keep Connection Alive
Specifies whether to keep the connection alive. By default, this option is checked. When connections are established to the
JReport Enterprise Server at runtime, you can choose either to keep the connections alive or to close them. If you uncheck
this option, the connection will be disconnected once the HTTP request has been responded to. That is, Internet Explorer or
Netscape will not hold the opened connection.
Prompt Message When Server Task Queue is Full
If checked, a message will be prompted asking you either to place the task in the waiting queue or to cancel it when a task
cannot be run in JReport Enterprise Server immediately due to the task queue being fully occupied.
Prompt Message When JReport Live Action Queue is Full
If checked, a message will be prompted asking you either to place the action in the waiting queue or to cancel it when an
action cannot be performed in JReport Live immediately due to the action queue being fully occupied, or simply showing that
no more action can be held at the moment when the waiting queue is full.
Enable Multiple Users to Login Using the Same User Name
Specifies whether multiple sessions created by one user can exist simultaneously. By default, this option is checked and one
user can log onto JReport Enterprise Server repeatedly without having to terminate former sessions until the session number
reaches the number permitted by the license. If this option is unchecked, only the newly created session will be active, and
all the other former sessions created by the same user will be terminated by the server automatically.
Enable Resources from Real Paths
Specifies whether to enable getting resources from real paths. By default, this option is not checked. If you need to get
resources from real paths, make sure that this option is checked.
Enable Task Duration
Specifies whether to enable setting a time duration for a task and asking JReport Enterprise Server to cancel the task or to
notify you or someone else of the task status via e-mail if the task has not yet finished running when the task duration is up.
If this option is checked, the Duration tab will be available in the Advanced Run and Schedule dialogs.
Enable Linked Catalog
Enables to predefine a linked catalog at server level for the My Reports and Public Reports folders to inherit.
If you have set a linked catalog here, then the My Reports and the Public Reports folders can inherit the linked catalog from
the server level once their Enable Linked Catalog property is enabled.
If the option is unchecked, the My Reports and the Public Reports folders cannot inherit linked catalog.
●
Select Another Catalog
Speciifes another catalog. All catalogs in the server resource tree are listed for your selection.
Role Based Authorization
Specifies whether to activate the role based security in replace of the default applied security of setting permissions for users,
groups and roles. In the role based security, permissions are defined on roles only, and users and groups are mapped to
roles.
If this option is checked, the option Permission Setting UI Displays will be hidden since it applies to the default applied
security.
Permission Setting UI Displays
Controls whether to display user, role or group permissions in the permission setting UI for the server resource tree node and
version properties, and the scheduling to version and advanced run dialogs.
Permission Algorithm
Specifies an algorithm for calculating a user, role or group's permission.
For information about the permission accumulation algorithm and the user permission replacement algorithm, see server.
permission.algorithm.
User Session Timeout
Specifies the time limit for a user to gain access to JReport Enterprise Server.
Generally speaking, if several users attempt to gain access to JReport Enterprise Server at the same time and among them, a
user is unable to send requests to JReport Enterprise Server for a period of time, the server will then log it out after timeout.
The default session timeout is 3 hours.
Time Limit before Moving to Background
Specifies the maximum time for running a report set. If a report set is so large that JReport Enterprise Server cannot run it
within the time specified here, it will be put into the Background Tasks page and the server will go on running the report set
there. If you want to stop running the report set, select the report set by clicking in the row and then delete it from the
Background Tasks tab.
Status Refresh Interval
Specifies task duration check frequency. By default, JReport Enterprise Server checks task duration every 30 seconds. This
value can also be reset by the task.duration.check_cycle property in the server.properties file. Note that the value must be an
integer greater than 0.
The option is available when the option Enable Task Duration in this tab is checked.
Temporary Files Life
Specifies the length of the period to keep the temp files for after they have been generated. By default it is 24 hours. Temp
files are deleted 24 hours after they have been generated.
Engine Priority
Specifies the priority of the engine in CPU usage when multiple tasks are running on your machine. It can be one of the
following: Lowest Priority, Low Priority, Normal Priority, High Priority, and Highest Priority.
On the condition that multiple tasks are running on your machine, you can decide your engine's priority in CPU usage by
choosing one of them. For example, if you choose Low Priority, JReport Engine will share a comparatively small part of the
CPU usage when it is running. Whereas, if you choose High Priority, JReport Engine will occupy more CPU usage. This choice
provides you with greater flexibility in adjusting the engine's utilization of the CPU according to your requirement. Of course,
the higher the priority, the faster the performance.
Save
Applies the changes to JReport Enterprise Server.
LDAP tab
LDAP (Lightweight Directory Access Protocol) is a lightweight client-server protocol for accessing directory servers. With LDAP
support, the JReport Enterprise Server enables you to import users/groups from directory servers.
This tab allows you to configure the JReport Enterprise Server LDAP settings. It contains further four sub tabs:
●
Server
●
Import
●
Synchronize
●
Role Map
Server
This tab allows you to configure LDAP server settings.
There are several Examples of LDAP server configuration for your reference.
Select LDAP Server
Specifies the Directory Server. Supported servers are: Novell Directory Server, iPlanet Directory Server, Microsoft Site
Server, OpenLDAP Directory Server, Win2000 Active Directory, and Lotus Domino on NT.
Load Settings
Loads the settings of the specific server.
Enable LDAP Version2/Version3
Specifies whether or not to enable JReport Enterprise Server to retrieve users from the Directory Server and which LDAP
Version to adopt.
The LDAP Version3 extends LDAP Version2 in the areas of internationalization, authentication, referral, and deployment. It
also allows new features to be added to the protocol without also requiring changes to the protocol. This is done by using
extensions and controls.
LDAP Version3 protocol has extensible authentication which uses Simple Authentication and Security Layer ( SASL)
mechanisms so as to support pluggable authentication.
Note that currently when you select Version3, JReport Enterprise Server will only use LDAP Version3 protocol to connect to
LDAP server.
Enable Direct Authentication to LDAP Server
Specifies whether or not to enable LDAP support without importing LDAP security information. This option controls the LDAP
feature's work mode. Currently, the JReport Enterprise Server security system can run two modes in which you can use an
LDAP server's security system. The first is importing mode. In this mode, if you want to use the LDAP feature, you will have
to import the security information from an LDAP server. The second is non-importing mode. With this mode, JReport
Enterprise Server can directly access an LDAP server and obtain LDAP security information without having to import it.
Enable Auto-Import of Users from LDAP Server
Specifies to enable JReport Enterprise Server to import LDAP users automatically. If activated, the server security system will
import security information from the LDAP server when an LDAP user logs into JReport Enterprise Server for the first time.
LDAP URL
Specifies the URL of the LDAP server.
LDAP Server Port
Specifies the port of the LDAP server.
Root Entry
Specifies the root of the Directory Server. From this root, JReport Enterprise Server searches for objects in Directory Server.
Directory Manager DN
Specifies the entry path of the Directory Manager who has the priority to manage users on the Directory Server.
Password
Specifies the Directory Manager's password.
Remember Password
Specifies to remember the Directory Manager's password.
Encryption Type
Specifies the encryption type. There are two types available. None means using a plain port to connect to the LDAP server,
and SSL refers to connecting to the LDAP server by SSL.
Import LDAP Group(s) to
Specifies whether the LDAP groups will be imported into the JReport security system as local roles or as local groups.
Test Connection
Tests whether the connection to the specified server is successful or not.
User Schema
Specifies the settings of user schema.
●
●
●
●
●
●
User Attribute Name
Specifies the user's attribute name.
User Common Name
Specifies the user's common name.
User Password
Specifies the user's password.
Distinguished Name
Specifies the name of the organization unit inside the LDAP server where you want to perform a search for users.
Query User
Views properties of users in the organization unit.
Filter
Specifies the filter criteria with which to search for users.
Group Schema
Specifies the group schema settings.
●
●
●
●
●
●
Group Common Name
Specifies a common name for the group.
Group Member Type
Specifies the member type of the group.
Distinguished Name
Specifies the name of the organization unit inside the LDAP server where you want to perform a search for groups.
Filter
Specifies the filter criteria with which to search for groups.
Admin Group
JReport Enterprise Server will add the group specified here as a member to the Admin group.
Query Group
Views properties of groups in the organization unit.
Save
Saves all changes.
Import
This tab allows you to import users/groups from directory servers.
LDAP server overwrites local users
Specifies that users of the LDAP server will overwrite those of the local server.
Local overwrites LDAP server users
Specifies that users of the local server will overwrite those of the LDAP server.
List Users
Lists the LDAP users with the same names as the users from JReport Enterprise Server.
List Groups
Lists the LDAP groups with the same names as the groups from JReport Enterprise Server.
Import Users
Imports LDAP users.
If LDAP Server overwrite Local users is selected, all LDAP users will then be imported, and any JReport Enterprise Server
users that have the same names as the LDAP users will be overwritten.
If Local overwrite LDAP server users is selected, all LDAP users will be imported, and any users that have the same names as
JReport Enterprise Server users will be overwritten.
●
●
●
Import
Imports the selected users from the LDAP server to JReport Enterprise Server.
Import All
Imports all users from the LDAP server to JReport Enterprise Server.
Back
Returns to the default Import tab.
Import Groups
Imports LDAP groups.
If LDAP Server overwrite Local users is selected, all LDAP groups will be imported, any LDAP group that has the same name
as a group in the local server will be merged into the local group, and local users of the same names as the LDAP users will
be overwritten.
If Local overwrite LDAP server users is selected, all LDAP groups will be imported, any LDAP group that has the same name
as a group in the local server will be merged into the local group, and LDAP users of the same names as the local users will
be overwritten.
●
●
●
Import
Imports the selected groups from the LDAP server to JReport Enterprise Server.
Import All
Imports all groups from the LDAP server to JReport Enterprise Server.
Back
Returns to the default Import tab.
Notes:
●
●
●
There is an admin group named "Administrators" on the LDAP Server. If you perform an Import operation, all groups will
then be imported except for the "Administrators" group.
In the case of a non-admin group on the LDAP Server having the same name as a non-admin group on JReport Enterprise
Server, if you perform an Import operation, all users from the non-admin group on the LDAP Server will be merged into the
non-admin group of JReport Enterprise Server.
If you have imported users/groups from the LDAP server to JReport Enterprise Server once and you want to import them
again, in order to prevent the information of the users/groups on JReport Enterprise Server from being overwritten by the
newly imported users/groups, you should first select the Local overwrite LDAP server users radio button and then
import the users/groups.
Import All
Imports all LDAP users and LDAP groups.
Synchronize
This tab enables you to synchronize security information from your local server with that of the LDAP server so that you have
the most current security information.
The synchronization process first compares the security information on both the local server and the LDAP server. Then, if
necessary, it updates the information on the local server so that both sides are consistent. However, note that for security
reasons, this process does not automatically import the newly-added users or groups from the LDAP server.
Synchronize Now
Synchronizes local security information.
Synchronization Information
Lists information about the synchronization task when the synchronization process is complete.
LDAP Synchronization Schedule Settings
Sets the schedule settings to your requirement.
●
●
●
●
Enable
Enables the LDAP synchronization schedule task.
Disable
Disables the LDAP synchronization schedule task.
Edit
Edits the synchronization schedule task.
Detail
Lists information about the last run synchronization task.
Role Map
This tab allows you to pre-define a role map for the imported LDAP users.
When an LDAP user account is automatically imported (the Enable Auto-Import of Users from LDAP Server option in the
Server tab has been checked), JReport Enterprise Server can automatically assign it to specific roles according to the predefined role map.
A role map consists of two parts: Search Filter String and Corresponding Role Name. When an imported LDAP user account
matches the filter condition (specified by the Search Filter String), it will automatically be added to a specific role (specified
by the Corresponding Role Name). You can create more than one role map.
Create New Role Map
Creates a new role map.
●
●
●
●
●
Search Filter String
Specifies the search filter criteria.
Corresponding Role Name
Specifies the corresponding role to which you want to assign the matching users.
Test
Tests the contents of the filter. The results of the test do not affect the creation of the new role map.
Save
Creates a role map and exits the dialog.
Cancel
Cancels the settings.
Edit
Edits the specified font map.
Test
Tests the contents of the filter.
Delete
Deletes the specified role map.
Export tab
This tab allows you to configure the default settings for exporting report set results in JReport Enterprise Server. It is divided
into three sub tabs:
●
E-mail tab
●
Fax tab
●
Layout Precision tab
Save
Saves changes made in this tab. The changes will be applied the next time JReport Enterprise Server starts.
E-mail tab
Configures the default settings for exporting report set results to e-mail.
The options available in this tab are as follows:
SMTP Server
Specifies the numeric or named host of the machine where the e-mail server is located.
Server Requires Authentication
This option must be checked if an SMTP Server requires authentication.
SMTP Server Port
Specifies the port where the e-mail server runs.
E-mail Address
Specifies the address of the e-mail sender. You must specify an address and make sure that the format of the specified address
is valid.
Default E-mail Format
Specifies how a published report set is sent out by e-mail. The format can be any of the following:
●
●
●
●
●
●
●
●
●
●
E-mail Result in HTML E-mail Format
Sends the report set result via e-mail to the specified address in HTML format. The report result will be shown in HTML format
in the mail body.
E-mail Result in Plain Text E-mail Format
Sends the report set result via e-mail to the specified address in plain text format. The report result will be shown in plain text
format in the mail body with no other information such as color, images and so on.
Attachment in JReport Result Format
Sends the report set result via e-mail to the specified address with a JReport result file as attachment.
Attachment in HTML Format
Sends the report set result via e-mail to the specified address with an HTML file as attachment.
Attachment in PDF Format
Sends the report set result via e-mail to the specified address with a PDF file as attachment.
Attachment in Excel Format
Sends the report set result via e-mail to the specified address with an Excel file as attachment.
Attachment in Text Format
Sends the report set result via e-mail to the specified address with a Text file as attachment.
Attachment in RTF Format
Sends the report set result via e-mail to the specified address with a RTF file as attachment.
Attachment in XML Format
Sends the report set result via e-mail to the specified address with an XML file as attachment.
Attachment in PostScript Format
Sends the report set result via e-mail to the specified address with a PostScript file as attachment.
Compress Attachment as Java Archive
Specifies whether or not to compress the mail attachment as Java Archive.
Split PDF
Applies in scheduling a report set result to e-mail in PDF file attachment. If it is unchecked, the report set result will be exported
in one PDF file. If it is checked, the report set result will not be exported to a big complete PDF file, but instead be split into
several smaller PDF files, and you can specify how the PDF file will be split, by file size or by file page.
●
●
Maximum File Size (KB)
Specifies in KB the largest size each PDF file could have after splitting.
Maximum File Page
Specifies how many pages each PDF file could have at most after splitting.
If you choose to split a PDF file by file size, then how to split the PDF file depends on the following two aspects:
●
The separated pages by the before-split PDF file
●
The maximum file size specified for an after-split PDF file
Here the before-split PDF file refers to the big PDF file to be split and an after-split PDF refers to one of the smaller PDF files
generated after splitting the big PDF file. When a PDF file is to be split by file size, the splitting will be carried out based on the
pages the file separates but not physically on the maximum file size specified for an after-split PDF file. However, the maximum
file size helps to decide by which page to split: the page that the maximum size comes to is not included with the previous
pages in an after-split file, but instead is the beginning page of the following after-split file. For example, there is a 2M PDF file
with 1M per page. If the maximum file size is set to 1.5M, we will get two PDF files with each 1M and one page as the split result.
Notes:
●
●
When the before-split PDF file contains only one page, the split function will not take effect for the only one page cannot be
further split either by file size or by file page, and therefore the result is one PDF file as attachment no matter the Split PDF
feature is enabled or not.
The Split PDF function takes effect only when the selected option value is greater than 0.
●
If the Split PDF function is enabled, the TOC and Sign options are disabled when scheduling a report set result to e-mail in
PDF file attachment.
Fax tab
Configures the default settings for exporting report set results to fax. You can specify to export the report set results either via a
fax machine or a fax server.
Fax Machine
JReport supports exporting report set results to fax. If you want to use this feature, you will need to configure your running
environment first.
Download Java Communications API (Version 2.0) from the website http://www.jinfonet.com/download/third_party_tool/
JavaCommAPIV2_Solaris.zip for Solaris and http://www.jinfonet.com/download/third_party_tool/JavaCommAPIV2_Win32.zip for
Win32, and place the following files in the specified locations:
●
For Windows:
File Name
Location
comm.jar
<server_install_root>\lib
javax.comm. <Java_install_root>\jre\lib
properties
Win32Com.dll <Java_install_root>\jre\bin
●
For Solaris:
File Name
Location
comm.jar
<server_install_root>/lib
javax.comm.properties
<Java_install_root>/jre/lib
libSolarisSerialParallel.so
LD_LIBRARY_PATH
The following are options available when Fax Machine is checked:
●
●
●
Dialing
Specifies the dialing mode for the fax modem. Options are: Pulse or Tone.
Modem Class
Specifies the class of the modem. Options are: Class 1, Class 2 or Class 2.0. All are fax protocols. Most modems only support
Class 1, so if you select Class 2 or Class 2.0, you should make sure that your modem can support it.
Flow Control
Specifies the flow control mode between DTE (Data Terminal Equipment) and DCE (Data Circuit-terminating Equipment).
Specifying flow control can help the compressing data function of the modem work better.
The flow control options are as follows:
❍
❍
❍
●
●
●
●
●
RtsCts
Flow control of the hardware (recommended).
Xon/Xoff
Flow control of the software.
None
No flow control specified.
Flow Control Command
Specifies the flow control command according to the modem being used. If not contained in the drop-down list, you can leave
this field empty and then enter the command as part of the initial string. The command should be obtained from your modem
manual.
Port
Specifies the port number. The port should be obtained from your modem manual.
Initialization String
Initializes the modem. The string should be obtained from your modem manual.
Timeout
Specifies the maximum amount of time that the fax should wait for a response from the destination before timing out.
Retries
When the line is busy, the report set result cannot be faxed. Here, you can specify the maximum number of times the modem
re-tries faxing the report set result.
Fax Server
If you choose to export the report set results via a fax server, configure the following settings according to your requirements:
●
Fax Gateway Connector
Specifies the name of the class implemented by users.
Note: By default, the fax server JReport uses is based on Hylafax Server, however, if you want to export your report set
results via Hylafax Server, you need to download the gnu-hylafax packages according to your requirements from http://
sourceforge.net/projects/gnu-hylafax/, for example, gnu-hylafax-util-0.0.9.2.jar, gnu-inet-ftp-0.0.9.2.jar, and gnuhylafax-0.0.9.2.jar, and then add them to the classpath of JREntServer.bat.
●
●
●
●
●
●
●
Server IP
Specifies the IP address or domain name of the fax server.
Server Port
Specifies the port number of the fax server.
Login ID
Specifies the username for the class communicating with fax server.
Password
Specifies the password for the class communicating with fax server.
Fax Sender
Specifies the user's name that shows in the fax server manager.
Special Parameters
Specifies some parameters for the fax server.
Time Out
Specifies the maximum amount of time that the fax should wait for a response from the destination before timing out.
Note: For Hylafax Server the value should not be larger than 59 seconds. It is a limitation of Hylafax Server.
●
Retries
Specifies the number of times the modem retries faxing the report set result.
Layout Precision tab
Configures the precision level for different formats with which the report set result will be exported. The settings of high/low
precision take effect only in the reports whose Precision Sensitive property is set to true in the Report Inspector of JReport
Designer.
Customize for each format
In order for the pre-defined default precision for a format to take effect, you need also check the checkbox before the format.
For formats that are not checked, JReport will decide their precision.
Note: The RSD format controls only the DHTML Format in the Schedule dialog.
●
System Default Settings
Pre-defines the default precision for each format.
❍
❍
High
If checked, the report set result will be exported to the specified format with high precision.
Low
If checked, the report set result will be exported to the specified format with low precision.
Optimize for speed over visual effect
If checked, the report set results will be exported with precision level decided by JReport.
Connection tab
This tab is used for retrieving the modified catalog connection information from the datasource.xml file in the <install_root>
\bin directory.
The option available in this tab is as follows:
Reload
Reloads catalog connection information from the datasource.xml file.
Upload tab
This tab is used for specifying the allowed image size and types for the images which are uploaded from the local file system
when end users insert images into reports in JReport Web.
The option available in this tab is as follows:
Image Type
Sets the allowed image types.
Image Size
Sets the allowed image size. If the value is blank, it means that the image size is unlimited.
Save
Saves changes made in this tab. The changes will be applied the next time JReport Enterprise Server starts.
Create New Font Map dialog
To access the Create New Font Map dialog, click its link in the NLS Font Map tab in the Reports dialog of the JReport Administration page.
Language
Specifies a language in which you want to create font maps.
Original Fonts
Displays the original font to be replaced in a font map.
●
Font Face
Displays the original font's face.
●
Font Size
Displays the original font's size.
Target Fonts
Displays the target font with which to replace the original font in a font map.
●
●
Font Face
Displays the target font's face.
Font Size
Displays the target font's face.
❍
Use Relative Font Size
If the option is checked, the true final target font size is the value of the original font size plus the specified target font size. The target font size
specified can be a negative or positive number.
Add
Adds a new font map.
Remove
Deletes the selected font maps.
OK
Applies the settings and closes the dialog.
Cancel
Cancels the settings and exits the dialog.
Customize Waiting Page dialog
This dialog helps you to customize the waiting screen according to your requirements.
Default Format
Applies the default format provided by JReport.
Customize Format
Allows to customize loading status image and tip text font.
●
Enable Customize Loading Status Image
Allows to upload a local image to Server as the loading status image appearing in waiting pages.
❍
❍
❍
●
Loading Status Image File
Uploads an image from the local disk. These types of images are supported: GIF, JPG, BMP, and PNG.
Server-side File Name
This name will be used as the name of the image file after it is uploaded to server.
Alignment to
Specifies the relative position of the image as compared to tip text in waiting pages.
Tip Text Font
Specifies font face and size and style of tip text in the waiting pages.
Specify a JSP as Waiting Page
Allows customized JSP files to implement the waiting pages.
●
JSP File
Uploads a JSP from the local disk. Note that the required JSP file is not exactly a complete JSP but a segment. Its body can
contain only one root <div></div> tags and the non-body section can contain only tags that are allowed in the <body></
body> tags.
The following is a sample:
<div>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="middle" align="center">
<table cellpadding="5" cellspacing="0" border="0">
<tr>
<td><font style="font-size:12px;font-family:Verdana;">waiting....processing</font></td>
</tr>
<tr>
<td><img src="../images/loadingdefault.gif" /></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
●
File Name
This name will be used as the name of the JSP file after it is uploaded to server.
Data dialog
To access the Data dialog, click Data on the system toolbar of the JReport Administration page.
The Data dialog allows you to manage server data, such as configuring your own server database, backing up server data,
archiving/restoring server data, viewing backup and archive files' summary information, and clearing invalid resource nodes.
Before managing, make sure to select a realm from the Select Realm drop-down list.
The following are tabs contained in the dialog:
●
Configuration tab
●
Backup tab
●
Archive tab
●
Summary tab
●
System DB Check tab
Configuration tab
This tab allows you to configure your own database to store server data. You can configure for systables and profiling
individually.
Driver Class Location
Specifies the path of the JDBC driver. It can be null, which means that JReport Enterprise Server will load the driver from the
VM's class path. Click the Browse button to specify the location for the driver class.
Driver
Specifies the name of the JDBC driver.
URL
Specifies a valid URL that can be used to establish a connection to your database. For the valid format of the URL, refer to the
handbook of the specific driver.
User
Specifies the JDBC user name for connecting to the database.
Password
Specifies the user password.
Test
Tests whether the JDBC configuration works.
Update
Updates the JDBC configuration and saves it to disk.
Cancel
Cancels the settings.
Backup tab
This tab allows you to back up your system's database for archiving.
Backup System DB/Profiling DB
Backups JReport Enterprise Server's system/profiling database to an archive. Click the Browse button to specify a file path to
store the backup archive.
With External Data
If it is checked, the external data bound with the database will also be archived. Otherwise, only the database will be archived.
Note that this option is not available for Profiling DB.
Backup
Begins the backup process.
Archive tab
This tab allows you to archive the result version data in an archive file.
Archive Result Version Data
●
●
●
●
Data Scope
Displays the result version data range.
Records Count
Displays the number of sets of result version data in the database.
Move to Archive Data Before
Specifies the range of data that you want to archive. The range is defined using date, for example, you can archive data
before a certain date. Click the Browse button to specify the file path for storing the archived data.
Archive
Begins the archiving process.
Restore Result Version Data
After data has been saved to an archive file, you then have the option to restore it.
●
●
Restore from Archive
Specifies the archive file that contains the archived result version data. Click the Browse button to specify the archive file.
Restore
Begins the restoring process.
Summary tab
This tab allows you to view the archive files' summary information.
Archive
Specifies the name of the archive from which you want to retrieve summary information. Click the Browse button to specify the
archive.
Summary
Begins the summary process and returns summary information about the specified archive.
System DB Check tab
This tab allows you to clear invalid resource nodes from JReport Enterprise Server.
Check
Checks whether there are any resource nodes that have lost external data. If any corresponding files (the resource's external
data) have been manually deleted, the resource nodes will become invalid. Invalid nodes should be cleared from JReport
Enterprise Server.
Invalid Dynamic Nodes
Displays all invalid resource nodes in the system database.
Delete
Deletes the specified invalid resource nodes.
Cancel
Cancels the operation.
Related topics:
●
Managing server data
DHTML Profile dialog
This dialog helps the administrators to create profiles for applying in running report sets in DHTML.
DHTML Profile Name
Specifies the name for the new profile.
Description
Specifies information about the new profile.
Basic tab
In this tab, you can turn on/off the required basic DHTML features for the profile.
●
●
●
Save
Specifies to enable the Save feature which allows you to save the report set result as a version.
Save as
Specifies to enable the Save As feature which allows you to save the current report set as another file.
Filter
Specifies to enable the Filter feature, which allows you to filter report data according to your filter conditions.
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
Sort
Specifies to enable the Sort feature, which allows you to sort records in the data buffer by certain fields.
Export
Specifies to enable the Export feature, which allows you to export your report set result for exchange purposes.
Printable Version
Specifies to enable the Print feature, which allows you to print the report data.
Search
Specifies to enable the Search feature, which allows you to search for the required data in a report.
Style
Specifies to enable the Style feature, which allows you to use styles in your report.
Zoom
Specifies to enable the Zoom feature, which allows you to zoom in on your report.
Change Skin
Specifies to enable the Change Skin feature, which allows you to change the skin of the DHTML window.
Go to
Specifies to enable the Go to feature, which allows you to select to show certain groups of records in a banded
object.
Open
Specifies to enable the Open Report feature, which allows you to open/hide some reports in a report set.
Refresh
Specifies to enable the Refresh feature, which allows you to reload the report data.
Reset
Specifies to enable the Reset feature, which allows you to reset your DHTML window and load page defaults.
Undo/Redo
Specifies to enable the Undo/Redo feature, which allows you to undo/redo previous operations.
Navigation
Specifies to enable the Navigation feature, which allows you to navigate through the report pages.
Page Setup
Specifies to enable the Page Setup feature, which allows you to set page properties.
Max Records
Specifies to enable the Max Records feature, which allows you to set the maximum number of records retrieved by
all components in the report.
Help
Specifies to enable the Help feature, which allows you to access the index page of JReport Web help documents
with the Help button.
Advanced tab
In this tab, you can turn on/off the required advanced DHTML features for the profile.
●
●
●
●
Query Filter
Specifies to enable the Query Filter feature, which allows you to apply a filter a the business/report cube by certain
component.
To Chart
Specifies to enable the To Chart feature, which allows you to turn a crosstab to a chart.
To Crosstab
Specifies to enable the To Crosstab feature, which allows you to turn a chart to a crosstab.
Rotate
Specifies to enable the Rotate feature, which allows you to rotate the selected crosstab.
●
●
●
●
●
●
●
●
●
●
●
●
●
Split
Specifies to enable the Split feature, which allows you to split a cell in a tabular.
Merge
Specifies to enable the Merge feature, which allows you to merge several cells in a tabular.
New
Specifies to enable the New Report feature, which allows you create a new report using a DHTML window with
existing queries.
Editing Marks
Specifies whether or not to enable the Editing Marks feature, which allows you to show or hide the dashed borders
of some components and the report body. If the feature is disabled, the editing mark will not be shown when a
report object receives focus, and report objects cannot be moved or resized.
Chart Type
Specifies to enable the Chart Type feature, which allows you to change the type of a chart.
Insert/Remove
Specifies to enable the Insert/Remove feature, which allows you to insert/remove objects in a report.
Grid
Specifies to enable the Grid feature, which helps you in laying out objects in a report.
Pivot
Specifies to enable the Pivot feature, which allows you to change the structure of a table, and crosstab, for
example, you can change the order of group levels in a table/crosstab, change the order of columns in a table, and
so on.
Resize
Specifies to enable the Resize feature, which allows you to resize an object.
Move
Specifies to enable the Move feature, which allows you to change the position of an object.
Resource View
Specifies to enable the Resource View feature, which allows you to insert a cube element into your report.
Toolbox
Specifies to enable the Toolbox feature, which allows you to use the Toolbox to insert a component into your report.
Drill
Specifies to enable the Drill feature, which allows you to select to show certain groups of records in a crosstab.
Function Visibility tab
In this tab, you can show or hide the required DHTML window elements for the profile.
●
●
●
●
●
User Information Bar
Specifies to enable the User Information Bar feature. With this feature enabled, you may view information about
the user, catalog, and report set by clicking the User Information button in JReport Web.
Report Set Bar
Specifies to enable the Report Set Bar feature. This feature allows you to specify whether to show the report set
bar.
Toolbar
Specifies to enable the Toolbar feature.
Menu
Specifies to enable the Menu feature, which allows you to access DHTML features by providing you with menu
commands.
Table of Contents
Specifies to enable the Table of Contents feature, which allows you to navigate around in the report using the TOC
Browser.
●
Right-click Menu
Specifies to enable the Right-click Menu feature. If this feature is enabled, you can further specify the commands
on the right-click menu.
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
❍
Display Name
Specifies to show the object display name on the right-click menu.
Filter
Specifies to show the Filter command on the right-click menu, which allows you to filter report data according to
your filter conditions.
Sort
Specifies to show the Sort command on the right-click menu, which allows you to sort records in the data buffer
by certain fields.
Go to
Specifies to show the Go to command on the right-click menu, which allows you to select to show certain groups
of records in a banded object.
Drill
Specifies to show the Drill command on the right-click menu, which allows you to select to show certain groups of
records in a crosstab.
Show/Hide
Specifies to show the Show/Hide command on the right-click menu, which allows you to show/hide the selected
object.
Rotate
Specifies to show the Rotate command on the right-click menu, which allows you to rotate the selected crosstab.
Reset
Specifies to show the Reset command on the right-click menu, which allows you to reset your DHTML window
and load page defaults.
Refresh
Specifies to show the Refresh command on the right-click menu, which allows you to reload the report data.
Search
Specifies to show the Search command on the right-click menu, which allows you to search for the required
information in a report.
Chart Type
Specifies to show the Chart Type command on the right-click menu, which allows you to change the type a chart.
To Chart
Specifies to show the To Chart command on the right-click menu, which allows you to convert a crosstab to a
chart.
To Crosstab
Specifies to show the To Crosstab command on the right-click menu, which allows you to convert a chart to a
crosstab.
Link Report
Specifies to show the Link Report command on the right-click menu, which allows you to open the linked report.
Detail Report
Specifies to show the Detail Report command on the right-click menu, which allows you to open the detail report.
Delete
Specifies to show the Delete command on the right-click menu, which allows you delete the selected object from
a report.
Query Filter
Specifies to show the Query Filter command on the right-click menu, which allows you to apply a filter to the
business/report cube used by the selected component.
Expand Data
Specifies to show the Expand Data command on the right-click menu, which allows you to expand data of a
crosstab or group.
❍
❍
Properties
Specifies to show the Properties command on the right-click menu, which allows you to configure the properties
of the selected object.
Style
Specifies to show the Apply Style command on the right-click menu, which allows you to apply a style to the
selected component.
Select All
Has all options in the current tab checked.
Select None
Has all options in the current tab unchecked.
OK
Finishes creating the profile and leaves the dialog.
Cancel
Cancels creating the profile and leaves the dialog.
Edit Expression dialog
The dialog is displayed when you click the button
in the Expression dialog. It provides some builtin functions of the Date/Time type for you to edit a template expression to create your own expression.
The current expression is displayed at the top of the dialog. Edit it directly in the text field. If required,
you can insert a function into the expression by double-clicking it from the built-in function list below.
For details about the functions, see Date/Time in the Formula Reference chapter of the JReport
Designer User's Guide.
OK
Saves the expression and closes the dialog.
Cancel
Does not retain any changes and closes the dialog.
Help
Displays this help document.
Encrypt dialog
This dialog is opened when you click the Setting button next to the Encrypt option while configuring settings for
advanced running/publishing a report set in PDF format.
The following are details about the options in the dialog:
Compatibility
Specifies the encryption type from the two types that are provided here in order to encrypt a PDF document. The
option Acrobat 3.0 and later uses a low encryption level (40-bit RC4), while the other option Acrobat 5.0 and later
uses a high encryption level (128-bit RC4).
Encryption Level
Shows the level of the encryption compatibility that you specified in the Compatibility drop-down list.
Require a password to open the document
Specifies the Document Open Password to prevent others from opening the document without authorization.
●
Document Open Password
Specifies the password to prevent others from opening the document without authorization.
●
Confirm Password
Confirms the password you have specified in the Document Open Password text box.
Use a password to restrict printing and editing of the document and its security settings
Specifies the Permission Password to prevent others from printing and editing.
Note: The password you specify here cannot be the same as the one that you use to open the document.
●
●
●
●
Permissions Password
Specifies the password to prevent others from printing and editing.
Confirm Password
Confirms the password you have specified in the Permissions Password text box.
Printing Allowed
Specifies the printing quality for the PDF document.
Changes Allowed
Specifies the editing actions that are permitted in the PDF document.
Enable copying of text, images and other content
Allows others to select and copy the contents of the PDF document.
Enable text access for screen reader devices for the visually impaired
Allows visually impaired users to read the PDF document with window readers. This option is available only if the
Compatibility option is set to Acrobat 5.0 or later Acrobat version.
OK
Saves the settings and exits the dialog.
Cancel
Cancels the settings and closes the dialog.
Enter Values dialog
The dialog is displayed when you click the button
to specify multiple values for a parameter.
while specifying parameter values. It helps you
Available Values
Lists all predefined parameter values for selection. When the parameter is bound with a column, but
the Display Column is different from the Bind Column, values of the Display Column are listed here.
Selected Values
Lists the values selected. The selected values are case sensitive.
Adds the selected values from the Available Values box to the Selected Values box.
Removes the selected values from the Selected Values box.
Adds all the selected values from the Available Values box to the Selected Values box.
Removes all the selected values from the Selected Values box.
Enter Values
This option is available when the parameter's Allow Type-in of Value was set to true while it was
created in JReport Designer.
Enter a value manually in the text box and then click the button next to add the value to the Selected
Values box. When the parameter is bound with a column, but the display column is different from the
bind column, make sure the value you enter is that of the bind column.
All
If selected, it means that the parameter value result is all the values in the DBMS. This option is
available when the parameter's Enable the "All" Option was set to true while it was created in JReport
Designer. This is translated in SQL to remove the parameter which may select more values than listed
in the available values list.
For example, when the parameter query is:
SELECT CUSTOMERS.CUSTOMERID,CUSTOMERS.CUSTOMERNAME FROM CUSTOMERS where CUSTOMERS.
CUSTOMERID>0 and CUSTOMERS.CUSTOMERID<4
When you click
SQL is:
to add 1, 2 and 3 as the parameter values, which are all the available values, the
(CUSTOMERS.CUSTOMERID IN ( 1,2,3))
Run the same report again and this time check the All checkbox in the Enter Values dialog, the query is
then:
( 1 = 1)
In this case, you will get more customers even though available values are only 1 – 3.
Note: When a multi-value parameter is inserted as a field into a report and All is selected as the value,
the field will show the string "All" which represents all the values in the DBMS.
OK
Applies the selected values to the parameter and closes the dialog.
Cancel
Does not retain any changes and closes the dialog.
Help
Displays this help document.
Expression dialog
The dialog is displayed when you click the button
while specifying parameter values of Date,
DateTime, or Time format. It helps you to specify a dynamic date or time parameter value with
expression.
Template
Specifies the expression template on which to edit your expression.
Expression
Displays the expression. You can edit it directly in the text box to create your own expression.
●
Opens the Edit Expression dialog, which provides some built-in functions of the Date/Time type for
you to edit a template expression.
Result
Displays the value result based on the specified expression, or gives error information if the expression
is not correct.
OK
Sets the expression as the parameter value.
Cancel
Does not retain any changes and closes the dialog.
Help
Displays this help document.
New Group dialog
This dialog is opened when you click the Create a New Group link in the Group tab of the Security
dialog on the JReport Administration page.
The following are details about the options in the dialog:
Group Name
Specifies the name for the new group. The group name can contain comma, full stop and blank space.
Parent Group Name
Specifies the parent group for the new group.
Description
Specifies the description for the new group.
Privileges
Specifies whether the new group has the following privileges:
●
●
Publish
The privilege of publishing resources to JReport Enterprise Server.
Advanced Properties
The privilege of viewing advanced version properties information, such as catalog connections and
report set related resources.
OK
Creates a group with the information you have specified.
Cancel
Cancels operations and closes the dialog.
New Realm dialog
This dialog is opened when you click the Create a New Realm link in the Realm tab of the Security
dialog on the JReport Administration page.
The following are details about the options in the dialog:
Realm Name
Specifies the name of the new realm.
Scheme
Specifies the scheme of the new realm. It can be one of the following:
●
●
Basic Authentication
Specifies to use the Base64 method (re-conversion is easy).
Digest Authentication
Specifies to use the MD5 digest method (re-conversion is impossible).
OK
Creates a realm with the information you have specified.
Cancel
Cancels all operations and closes the dialog.
New Role dialog
This dialog is opened when you click the Create a New Role link in the Role tab of the Security dialog
on the JReport Administration page.
The following are details about the options in the dialog:
Role Name
Specifies the name for the new role. The role name can contain comma, full stop and blank space.
Parent Role Name
Specifies the parent role for the new role.
Description
Specifies the description for the new role.
Privileges
Specifies whether the new role has the following privileges:
●
●
Publish
The privilege of publishing resources to JReport Enterprise Server.
Advanced Properties
The privilege of viewing advanced version properties information, such as catalog connections and
report set related resources.
OK
Creates a role with the information you have specified.
Cancel
Cancels operations and closes the dialog.
New Schedule dialog
This dialog is opened when you click New Schedule on the task bar of the My Tasks page on the JReport Condole page. It
helps you to create a new schedule task.
The following are details about options in the dialog:
Select Report to Create Schedule
Specifies to create the schedule task on an existing report set.
●
●
●
●
Report In
Displays the folder path.
Select Folder
Specifies the folder in which the report set is.
Select a Catalog
Specifies the catalog file in which the report set is.
Select a Report
Specifies the report set on which the schedule task will be created.
Import Script to Create Schedule
Specifies to create the schedule task on an imported script file.
●
Select Script File
Specifies the script file on which the schedule task will be created. Click the Browse button to select the script file.
OK
Creates the schedule task.
●
●
If you specify to create the schedule task on an existing report set, when you click OK, the Schedule dialog will be
displayed. Specify the settings according to your requirement to finish the task.
If the schedule task is created on a script file, when you click OK, the Edit Script dialog will be displayed for you to
further edit the task information imported from the script file.
Cancel
Cancels the operations.
Help
Displays this help document.
New User dialog
This dialog is opened when you click the Create a New User link in the User tab of the Security dialog
on the JReport Administration page.
The following are details about the options in the dialog:
User Name
Specifies the name for the new user. The user name can contain comma, full stop and blank space.
Full Name
Specifies the full name for the new user.
Description
Specifies the description for the new user.
E-mail
Specifies the e-mail address of the new user.
Password
Specifies the password of the new user.
Confirm Password
Confirms the password by typing it in again.
Account Disabled
If this is checked, the user account will be disabled for the time being.
Password Life
Specifies the validity period of the password.
●
●
Password Never Expires
Specifies that the password is to be valid forever.
Expire in N days
Specifies a period of time during which the password is valid.
Password Length
Specifies the length of the password.
●
●
Permit Blank
Specifies that the password can be blank.
Minimum Length
Specifies the minimum number of characters that can be used in the password. The number you
specify here should be between 0 and 20.
Privileges
Specifies whether the newly created user has the following privileges:
●
●
Publish
The privilege of publishing resources to JReport Enterprise Server.
Advanced Properties
The privilege of viewing advanced version properties information, such as catalog connections and
report set related resources.
OK
Creates the user with the information you have specified.
Cancel
Cancels operations and closes the dialog.
NLS Editor dialog
To access the NLS Editor dialog, on the JReport Administration page, locate the row that the wanted report set is in,
then click the NLS Editor button
in the Control column.
Report Set
Displays the name of the report set.
Catalog
Displays the catalog that the report set uses. You can specify a different catalog.
Report Set Version
Specifies the report set version to apply the NLS settings.
Catalog Version
Specifies the catalog version.
Language
Specifies the language from the drop-down list. If you cannot find the language you need, click Add Language to add
it.
Add Language
Click to add languages to the Language drop-down list.
●
●
●
●
●
●
●
●
●
Available Languages
Displays all the languages that are available for your choose.
Selected Languages
Displays the languages that you have selected.
Adds the selected languages from the Available Languages box into the Selected Languages box.
Removes the selected language from the Selected Languages box and returns it to the Available Languages box.
Adds all languages from the Available Languages box into the Selected Languages box.
Removes all languages from the Selected Languages box and returns them to the Available Languages box.
Reset
Removes your changes and restores to the default settings.
OK
Applies your settings.
Cancel
Cancels your settings.
Note: If you are using Internet Explorer Version 6, and you change its Check for newer versions of stored page to
Every visit to the page (Tools > Internet Options > General > Temporary Internet files > Settings), the arrow
images on this page will not display well. This is a bug of Internet Explorer Version 6.
Remove Language
Removes the selected language from the Language drop-down list.
Enable Display
Specifies whether to translate the display texts in the report set into the specified language or to modify the text
content.
●
Type
Lists the types of display texts that have been translated or modified. There are four types:
❍
❍
❍
❍
●
Label
Type of display texts of label and some web controls.
Column
This type is only for DHTML. It is the type of display texts of columns.
Prompt
Type of display texts of parameter prompt value.
TOC
Type of display texts on TOC tree.
Key
Displays the display texts in the original language that have been translated or modified.
●
●
Translate
Translates the display text into the specified language or modify it.
Add Display
Adds display texts into the list and enables the translation or modification of them. Click the button to open the Add
NLS Display dialog which lists the display texts that have not been enabled.
The following are options in the dialog:
❍
❍
❍
❍
❍
❍
●
Type
Displays the types of the display texts.
Key
Lists the display texts in the original language.
Translate
Translates the display texts into the specified language or modify them.
Reset
Removes your changes and restores to the default settings.
OK
Closes the dialog and adds the selected display texts into the enabled list.
Cancel
Cancels your settings and exits the dialog.
Remove Display
Disables the translation or modification of the selected display texts and removes them from the list.
Enable Format
Specifies whether to translate the formats in the report set into the specified language or to modify them.
●
●
●
Key
Displays the formats in the original language that have been translated or modified.
Format
Specifies formats in the specified language or modify them.
Add Format
Adds formats into the list and enables the translation or modification of them. Click the button to open the Add NLS
Format dialog which lists the formats that have not been enabled.
The following are options in the dialog:
❍
❍
❍
❍
❍
●
Key
Displays the formats in the original language.
Translate
Translates the formats into the specified language or modify them.
Reset
Removes your changes and restores to the default settings.
OK
Closes the dialog and adds the selected formats into the enabled list.
Cancel
Cancels your settings and exits the dialog.
Remove Format
Disables the translation or modification of the selected formats and removes them from the list.
Enable Font
Specifies whether to translate font properties in the report set into the specified language or to modify them.
●
●
●
●
Key
Lists the faces and sizes of fonts in the original language that have been translated or modified.
Font Face
Specifies font face in the specified language or modify it.
Font Size
Specifies font size in the specified language or modify it.
Add Font
Adds fonts into the list and enables the translation or modification of them. Click the button to open the Add NLS
Font dialog which lists the fonts that have not been enabled.
The following are options in the dialog:
❍
❍
❍
❍
❍
❍
●
Key
Displays the fonts in the original language.
Font Face
Translates the font face into the specified language or modify them.
Font Size
Translates the font size into the specified language or modify it.
Reset
Removes your changes and restores to the default settings.
OK
Closes the dialog and adds the selected fonts into the enabled list.
Cancel
Cancels your settings and exits the dialog.
Remove Font
Disables the translation or modification of the selected fonts and removes them from the list.
Reset
Removes your changes and restores to the default settings.
OK
Applies your settings and closes the dialog.
Cancel
Cancels your settings and exits the dialog.
Profile dialog
The Profile dialog is available in both the JReport Administration and Console pages. However, any
settings you specify in the Profile dialog of the JReport Console page will only be applied to the current
user, while the settings specified on the JReport Administration page will be applied to all users.
To access this dialog, click the Profile tab on the system toolbar. The dialog contains three subjects:
●
Change Password
●
Customize Server Preferences
●
Configure DHTML Profile
Reset
Resets the settings without refreshing the web pages.
Restore Defaults
Uses the default settings. Available only when the Profile dialog is accessed on the JReport Console
page.
OK
Submits any changes to JReport Enterprise Server to allow the customizing of your web pages.
Cancel
Cancels the settings.
Help
Displays this help document.
Change Password
This tab allows you to change the password used for logging onto JReport Enterprise Server. It is available only when the
Profile dialog is accessed on the JReport Console page.
Logged In User's Password
Specifies the password of the currently logged in user.
User ID
Displays the ID of the current user.
New Password
Specifies the new password.
Confirm New Password
Confirms the new password by typing in it again.
Customize Server Preferences
This tab allows you to customize your JReport Enterprise Server web pages. It contains the following three sub tabs:
●
General
●
Export Formats
●
Advanced
General
Lists the general options for customizing the JReport Enterprise Server web pages.
Default Format for Viewing Report
Specifies the default format for viewing report sets.
Pop-up DHTML Window
Specifies whether to show a DHTML window when you view a report in DHTML format.
Only CSS style can be available in style list
Specifies whether to display only the CSS styles in the style list.
Display the Last Login Time
Specifies whether to display the last login time of a user on the top banner of JReport Enterprise Server. If checked, the login time will be
recorded in the login.properties file in <install_root>\bin after JReport Enterprise Server shuts down.
Display the Last Logout Time
Specifies whether to display the last logout time of a user on the top banner of JReport Enterprise Server. If checked, the logout time will be
recorded in the logout.properties file in <install_root>\bin after JReport Enterprise Server shuts down.
Keep Completed Tasks for
Specifies for how many days JReport Enterprise Server will keep the completed tasks in the Completed list. If the value is set to 0, the server
will keep the completed tasks until you delete them from the Completed page.
Parameter Display Size
Specifies the display length in characters of the parameters that are to be applied to both the completed and active schedules.
Folder Selector Type
Specifies the type of the tool used for selecting folder paths from the file system. This option is available on the Internet Explorer browser and
applied to local publishment only.
There are three types of folder selectors:
●
●
●
JavaScript format
Folder selector is a dialog generated by JavaScript.
VBScript format
Folder selector is a dialog generated by VBScript.
JSP format
Folder selector is an HTML page generated by JSP. This format is available to administrators only.
Skin Format
Specifies the skin format applied to JReport Enterprise Server and JReport Web UI. You can choose from Standard, Classical and Windows XP.
Columns Shown in _ List
Specifies which columns will be displayed as default in the following pages when you log onto JReport Enterprise Server: Reports, Scheduled,
Running, Completed, Background Tasks, Report Set Result Versions, Report Set Versions, Catalog Versions, and Result Versions.
Export Formats
Customizes the export formats.
●
JReport Result
Exports a report set to a result file. Once this option is checked, the following option is available:
❍
Zip Result
Specifies whether to compress the result and make its size smaller.
●
DHTML
●
HTML
●
PDF
●
Excel
●
Text
●
RTF
●
XML
●
PostScript
●
Applet
Advanced
Lists the advance options for customizing the JReport Enterprise Server web pages.
Enable Waiting Page
Specifies whether to show the waiting pages. Click the Customize button to customize waiting pages in the Customize Waiting Page dialog.
This option is available only when the Profile dialog is accessed on the JReport Administration page.
Specify Default Language
Specifies an environment language for JReport Enterprise Server and JReport Web. All UI text and messages will be displayed in the specified
language.
●
Reset All Users' Preference
Checking this option will reset all users' default language to the one specified here.
Identify Server Preference
Specifies whether a task can be performed on a manually specified clustered server when scheduling a report set or running a report set in
Advanced mode. Only available in clustered environments.
Use Accessible Version
Sets the accessible version of JReport Enterprise Server as the default portal instead of JReport Console page. In the accessible version,
reports are displayed in the HTML format with accessibility attributes, and table/crosstab components are output as HTML data table. With the
help of reader agent end users can navigate through the server resource to view the target report. See Accessibility for more information.
Enable Saving Parameter Values
Enables saving parameter values for reuse next time when specifying parameter values in order to run reports.
Maximum Number of Auto Complete Parameters List
When specifying parameter values in order to run or schedule to run a report, you can save the specified parameter values for the report as a
list. This option is used to control the maximum number of the saved parameter value lists for the report.
By default the maximum number is 3. If you change the number to a smaller number, the oldest lists that exceed the number will be removed.
Configure DHTML Profile
This tab allows you to customize DHTML features according to your requirement. It contains two sub tabs:
●
Features
●
Properties
Features
Administrators can define more than one DHTML profile on the JReport Administration page. Then end users can further customize the JReport
Web settings for the profiles on the JReport Console page and then select one of the profiles to apply in running reports in DHTML.
Default Profile
Specifies the profile which will be used as the default profile to run report sets in DHTML. End users can only select a profile and view its settings.
New Profile
Opens the DHTML Profile dialog to create profiles for applying in running report sets in DHTML. Available to administrators only.
Delete
Deletes the selected profile. Available to administrators only.
Profile list
Lists the DHTML profiles that have been created.
●
●
●
Name
Displays the names of the profiles.
Description
Displays the descriptions of the profiles.
Last Modified
Displays the time when the profiles were last modified.
Properties
The properties are classified in two categories: default properties and advanced properties. Some properties are not available when the Profile
dialog is accessed on the JReport Console page. If you want to customize them, log onto the JReport Administration page.
Default properties
Specifies to show or hide certain DHTML window elements. Check the element names to show/hide them. If disabled, the specified window
element will not be shown by default. To show it, click the relevant window buttons or menu commands in JReport Web.
●
●
●
●
●
●
●
●
●
●
●
●
User Information Bar
Specifies to show the User Information bar. This bar is on the top of the JReport Web window which shows information about the user, catalog,
and report set.
Toolbar
Specifies to show a default toolbar.
Table of Contents
Specifies to show the TOC Browser by default.
Resource View
Specifies to show the Resource View panel.
Toolbox
Specifies to show the Toolbox panel.
Right-click Menu
Specifies to show a shortcut menu when you click the right mouse button.
Pop Up New Window for Links
Specifies whether to display a new web browser window for the link target, which can be a link report, a detail report, a URL, a chart hyperlink,
or the detailed information created from the go-to-detail function. When defining such links in JReport Designer, if you have specified Server
Setting as the target frame of the links, this option will decide where the corresponding link targets will be displayed.
Editing Marks
Specifies whether to show editing marks (dashed outlines for objects and report body). If the option is unselected, the editing mark will not be
shown when a report object receives focus, and report objects cannot be moved or resized.
Pop Up Save Criteria Dialog
Specifies whether to pop up the Save Report Template dialog when you exit a report set which has been changed since it was first opened in
JReport Web. A change includes any action taken such as sort, filter and drill as well as actual changes to the template such as adding or
removing objects. By default, this option is checked so the dialog will always pop up. If you uncheck this option, the dialog will not pop up when
changes have been made and all changes will be discarded. The next time the report set is opened, it will be the previous version which was last
saved explicitly or the original published version. A second way to skip the pop up Save Report Template dialog is to create a profile which does
not have the Save option checked and assign the profile to the user or to the report set, then when the user closes the report set the dialog will
not be displayed and the changes will be discarded.
Save Filter Criteria
Specifies to check the Save Filter Criteria option by default when saving a report set to a report set version or as a new report set.
Save Sort Criteria
Specifies to check the Save Sort Criteria option by default when saving a report set to a report set version or as a new report set.
Switch Reports with Tab
Specifies to switch among reports in a report set using report tabs.
By default, this option is unchecked, which means that when a report set contains several reports, you can use the Go To drop-down list on the
toolbar to switch among the reports. In addition, when this option is unchecked, the path for tracing the master/detail report navigation as well
as the drilling and going actions will also be reflected in the Go To drop-down list.
●
●
●
●
●
●
●
●
●
●
Show Master Report
Specifies whether to show the master report in the same window when opening a detail report by default. If checked, end users can go back to
the master report by clicking the master report name link. If unchecked, the master report will be closed after the detail report is opened.
Tool Tips on Toolbars
Specifies to show the tool tips for toolbar commands.
Always Prompt Query Filter
Specifies to prompt the Query Filter dialog when inserting the first field from the Resource View panel into a blank component.
Always Prompt to Convert Data Fields
Specifies to prompt the Convert Data Fields dialog when performing data analytic actions on reports, which are created in JReport Designer, in
JReport Web.
Mouse Wheel Turn to Page
Specifies whether to allow using the mouse wheel to scroll up/down reports.
Always Prompt Whether to Adjust Page Size Automatically
Specifies whether to prompt with a message box when JReport is going to adjust the page size if the width of a table exceeds the defined page
size.
Zoom
Specifies the zoom ratio at which DHTML pages will be displayed.
Max Records
Specifies the maximum number of records that will be retrieved by components in the report.
Browser Page Title
Specifies the title for the DHTML window (displayed on the DHTML window title bar).
Filter Menu
Specifies which items will be shown on the Filter submenu.
❍
❍
❍
❍
●
Top N
Specifies to show the Top N item on the Filter submenu.
Bottom N
Specifies to show the Bottom N item on the Filter submenu.
More
Specifies to show the More item on the Filter submenu.
Grid
Specifies the grid properties.
❍
❍
❍
❍
●
Remove Filter
Specifies to show the Remove Filter item on the Filter submenu.
Show Grids
Specifies to show grids in JReport Web report area.
Snap to Grids
Specifies to snap an object to grids when you move it by dragging and dropping in JReport Web report area.
Grid Size
Specifies size of the grids. The default value is 0.07 inches.
Grid Color
Specifies color of the grids. The default value is #808080.
New Ad Hoc Report
Specifies properties for creating ad hoc reports.
❍
❍
Report Layout
Specifies the default report layout when creating an ad hoc report.
Report Style Group
Specifies the default selected style for the four types of components when creating them via the report wizard in JReport Web: table, crosstab,
chart, and banded object. However, when inserting them into a table or banded object which can bind style, the default style type will be
Inherit Style instead of the value specified by this option.
All CSS styles in the <install_root>\style directory are available in the drop-down list.
❍
Customize Group Indent
Specifies to customize the indent of groups created via the report wizard. If checked, enter the indent of each group in the text box. The input
value of indent should be between 0 and 4 inches.
By default, when you create groups in a report via the report wizard in JReport Web, the groups will be indented according to the width of the
group fields. You can check this option to customize indent of the groups as required.
❍
Align Summaries Vertically
Specifies whether to make summaries aligned vertically, which are created via the report wizard and have the same summary function.
❍
Use Vertical Group Header to Detail Panel in Table
Specifies whether to place the group header(s) in a table vertically when you create a new table or insert new group(s) in a table in JReport
Web. By default, the group headers in a table are horizontally displayed.
Advanced Properties
Specifies to show or hide some advanced DHTML properties. Click on the property names to switch them on/off.
●
Advanced User
Specifies to enable DHTML advanced features, such as editing group and report properties from the shortcut menu. In JReport Web, some
features are only available for advanced users, including the following:
❍
●
●
●
Advanced users can use a formula to control the value of a property. If a Boolean type property in a report is set to be controlled by a
formula, it will be displayed as a checkbox, with mixed value. This means that this option is currently controlled by a formula.
❍
Editing group and report properties (can be accessed by using the Group and Report command on the shortcut menu).
❍
Modifying the properties of images, special fields, and parameters (can be accessed by using the Properties command on the shortcut menu).
❍
Further options are available for advanced users, such as the options on the Export and Other tab.
Auto Refresh
Specifies whether to enable the Auto Refresh feature, which automatically refreshes the DHTML window at certain intervals, so as to make the
server session never time out when any JReport Web window is open. The auto refresh time interval equals user session time out minus 16
seconds. When the server session time out is set to be less than 32 seconds, the Auto Refresh feature is disabled.
Show Group by Name
Specifies whether to show the groups by name in the TOC panel.
Report Rendering Mode
Specifies a way of running and laying out a report set as the DHTML format. There are in all four rendering modes controlled by the combination
of the two options: View Incomplete Pages and Format Page On Demand.
❍
View Incomplete Pages
■
■
❍
●
●
If selected, fetch data for the required page and then format the page. The contents of the displayed pages may be incomplete for lack of
data integrity and will then be refreshed when their data is ready. The first page will be displayed more quickly.
If unselected, fetch all data before formatting report pages. The displayed pages are complete.
Format Page On Demand
■
If selected, format the required pages. The total number of pages will not be known and will show as a + sign.
■
If unselected, format all report pages. This shows the total number of pages but will take longer to show the first page.
Lock Screen Timeout
Specifies the idle time before the DHTML window is locked.
Report Timeout
Each opened DHTML report is cached in the buffer. If the server has not received a request for a period of time from one DHTML report, it will
then release its memory automatically. The default value for this option is 10800 seconds.
●
●
●
●
Report Set Timeout
Each opened DHTML report set is cached in the buffer. If the server has not received a request for a period of time from one DHTML report set,
it will release its memory automatically. The default value for this option is 10800 seconds.
Background Mode Timeout
Specifies the time allowed for a DHTML report set to run in foreground mode. After the Background Mode Timeout has expired, the DHTML
report set will automatically be switched to run in background mode. You can view the DHTML report result by clicking the report name in
the Background Tasks table of the My Tasks page on the JReport Console page, and after the result is opened in a browser, the report task in
the table will be deleted.
Maximum Number of Open Reports
Specifies the maximum number of DHTML reports that can be opened at the same time. For details, see Limiting the number of simultaneously
open reports.
Select Catalog Linked Model
If checked, ad hoc end users can decide the relationship between the saved report set and the catalog used to run it when saving a report set to
a different directory in JReport Web: either link the saved report set with the catalog, or copy the catalog to the target directory where the
report set is saved.
The two items As Linked Catalog and As Catalog Copy just predefine which corresponding option will be automatically checked in the Save As
dialog of JReport Web.
●
●
Show Splash Screen
Specifies whether or not to show the splash screen, which is the JReport logo and displays when you open a DHTML report set.
Check DHTML Resource Path
Checks the existence of static resources defined in the file ResourcePath.jsp.
Properties dialog - catalog
You can set the properties of a specified catalog in its Properties dialog according to your requirements.
The Properties dialog is divided into the following two tabs:
●
General
●
Permission
OK
Retains the settings and submits the task to the server.
Reset
Discards your modifications and restores the dialog to its default status.
Cancel
Cancels any settings and closes the dialog.
Help
Displays this help document.
General tab
Specifies the general properties of the catalog.
Resource Path
Shows the resource path.
Resource Node Name
Specifies the name for the catalog.
Resource Type
Shows the type of the resource.
Resource Description
Specifies the description of the catalog.
Apply Archive Policy
Applies an archive policy to the catalog versions.
●
Archive as New Version
Specifies whether to use multiple versions for the catalog. Available only for versions in the resource tree.
❍
●
Maximum Number of Versions
Specifies the maximum number of versions that will be listed in the version table. By default the number of versions is
unlimited (0).
Replace Old Version
Specifies to replace the old version when a new version is generated.
Permission tab
Specifies permissions of roles/users/groups to the catalog. This tab is available when the catalog is in the Public Reports
folder.
Enable Setting Permissions
Enables the setting of permissions.
Available
Lists the roles/users/groups to which you can assign permissions.
●
●
●
Role
If checked, all roles will be displayed in the Available box for you to assign permissions.
User
If checked, all users will be displayed in the Available box for you to assign permissions.
Group
If checked, all groups will be displayed in the Available box for you to assign permissions.
Adds the selected roles, users or groups to the Selected box.
Removes the selected roles, users or groups from the Selected box.
Selected
Displays the roles, users and groups to which the permissions will be assigned.
●
●
●
●
●
●
●
Visible
Specifies whether to give the selected role/user/group the Visible permission.
Read
Specifies whether to give the selected role/user/group the Read permission.
Write
Specifies whether to give the selected role/user/group the Write permission.
Delete
Specifies whether to give the selected role/user/group the Delete permission.
Execute
Specifies whether to give the selected role/user/group the Execute permission.
Schedule
Specifies whether to give the selected role/user/group the Schedule permission.
Grant
Specifies whether to give the selected role/user/group the Grant permission.
Properties dialog - folder
You can set the properties of a selected folder in its Properties dialog according to your requirements.
The Properties dialog is divided into the following two tabs:
●
General
●
Permission
OK
Retains the settings and submits the task to server.
Reset
Discards your modifications and restores the dialog to its default status.
Cancel
Cancels any settings and closes the dialog.
Help
Displays this help document.
General tab
Specifies the general properties of the folder.
Resource Path
Shows the resource path.
Resource Node Name
Specifies the name for the folder.
Resource Type
Shows the type of the resource.
Resource Description
Specifies description of the folder.
Resource Real Path
Specifies the real path of the folder.
Map Shared Disk
This option works together with the Resource Real Path option. It is available for folder type only, and is useful in a
clustered environment.
If this option is not selected, when you publish a scheduled report set on a clustered server to disk, and choose to save it
in this folder, the result will first be saved to the local computer's file system, and then copied to the real path folder by
the admin server. In which case, the specified real path folder must be accessible by the admin server.
If this option is selected, you should ensure that the specified real path folder exists in a shared disk which can be
accessed by all servers in the cluster, and that the real path folder in all clustered servers points to the same place. When
you publish a scheduled report set on a clustered server to disk, and choose to save the result in this folder, it will be
directly saved to the shared disk's real path folder. In this way, server performance is enhanced.
Enable Resources from Real Paths
Specifies whether or not to enable getting resources from the folder real path. Once checked, it is required that you
specify a real path in the Resource Real Path field.
Note: This option can only be checked when the Enable Resources from Real Paths option in the Advanced tab of the
Configuration dialog on the JReport Administration page has also been checked.
Last Modified
Shows the last time the folder was modified.
Enable Linked Catalog
Enables to link the folder with a catalog.
If you have specified a linked catalog for the folder, then the report sets and sub folders resided in the folder can inherit
the linked catalog from the folder once their Enable Linked Catalog property is enabled.
If this option is unchecked, the report sets and sub folders resided in the folder cannot inherit linked catalog.
●
Use Specified
Links the folder with a catalog in the server resource tree.
❍
●
Select Another Catalog
Specifies another catalog in the Select Another Catalog dialog.
Use Inherited
Links the folder with the linked catalog inherited from its parent folder or from the server level if the folder is My Reports
or Public Reports. Note that if the parent level does not enable linked catalog, you are not allowed to check this option.
Apply Archive Policy
Applies an archive policy to resource versions in the folder.
●
Archive as New Version
Specifies to use multiple versions for the resources. Available only for versions in the resource tree.
❍
Maximum Number of Versions
Specifies the maximum version amount that will be listed in the version table. By default the version amount is
unlimited.
●
Replace Old Version
Specifies to replace the old version when a new version is generated.
Permission tab
Specifies permissions of roles/users/groups to the folder. This tab is available when the folder is in the Public Reports
folder.
Enable Setting Permissions
Enables the setting of permissions.
Available
Lists the roles/users/groups to which you can assign permissions.
●
●
●
Role
If checked, all roles will be displayed in the Available box for you to assign permissions.
User
If checked, all users will be displayed in the Available box for you to assign permissions.
Group
If checked, all groups will be displayed in the Available box for you to assign permissions.
Adds the selected role(s), user(s) or group(s) to the Selected box.
Removes the selected role(s), user(s) or group(s) from the Selected box.
Selected
Displays the role(s), user(s) and group(s) to which the permissions will be assigned.
●
●
●
●
●
●
●
Visible
Specifies whether to give the selected role/user/group the Visible permission.
Read
Specifies whether to give the selected role/user/group the Read permission.
Write
Specifies whether to give the selected role/user/group the Write permission.
Delete
Specifies whether to give the selected role/user/group the Delete permission.
Execute
Specifies whether to give the selected role/user/group the Execute permission.
Schedule
Specifies whether to give the selected role/user/group the Schedule permission.
Grant
Specifies whether to give the selected role/user/group the Grant permission.
Properties dialog - report set
You can set the properties of a specified report set in its Properties dialog according to your requirements.
The Properties dialog is divided into the following two tabs:
●
General
●
Permission
OK
Retains the settings and submits the task to server.
Reset
Discards your modifications and restores the dialog to its default status.
Cancel
Cancels any settings and closes the dialog.
Help
Displays this help document.
General tab
Specifies the general properties of the report set.
Resource Path
Shows the resource path.
Resource Node Name
Specifies the name for the report set.
Resource Type
Shows the type of the resource.
Resource Description
Specifies the description for the report set.
Enable Linked Catalog
Enables to link the report set with a catalog. If you have linked a report set with a catalog, then even if the report set and
the catalog are not in the same directory, it also can be run with the catalog.
When you background run, advanced run or schedule the report set, the linked catalog is applied instead of the catalog
that is resided in the parent folder and originally used to run the report set. For Advanced Run and Schedule, you can
change the catalog to apply another one using the Select Another Catalog option in the General tab of the corresponding
dialog.
●
Use Specified
Links the report set with a catalog in the server resource tree.
❍
●
Select Another Catalog
Specifies another catalog in the Select Another Catalog dialog.
Use Inherited
Links the report set with the linked catalog inherited from its parent folder. Note that if the parent folder does not enable
linked catalog, you are not allowed to check this option.
Apply Archive Policy
Applies an archive policy to the report set versions.
●
Archive as New Version
Specifies whether to use multiple versions for the report set. Available only for versions in the resource tree.
❍
●
Maximum Number of Versions
Specifies the maximum version amount that will be listed in the version table. By default the version amount is
unlimited.
Replace Old Version
Specifies to replace the old version when a new version is generated.
Permission tab
Specifies permissions of roles/users/groups to the report set. This tab is available when the report set is in the Public
Reports folder.
Enable Setting Permissions
Enables the setting of permissions.
Available
Lists the roles/users/groups to which you can assign permissions.
●
●
●
Role
If checked, all roles will be displayed in the Available box for you to assign permissions.
User
If checked, all users will be displayed in the Available box for you to assign permissions.
Group
If checked, all groups will be displayed in the Available box for you to assign permissions.
Adds the selected role(s), user(s) or group(s) to the Selected box.
Removes the selected role(s), user(s) or group(s) from the Selected box.
Selected
Displays the role(s), user(s) and group(s) to which the permissions will be assigned.
●
●
●
Visible
Specifies whether to give the selected role/user/group the Visible permission.
Read
Specifies whether to give the selected role/user/group the Read permission.
Write
Specifies whether to give the selected role/user/group the Write permission.
●
●
●
●
Delete
Specifies whether to give the selected role/user/group the Delete permission.
Execute
Specifies whether to give the selected role/user/group the Execute permission.
Schedule
Specifies whether to give the selected role/user/group the Schedule permission.
Grant
Specifies whether to give the selected role/user/group the Grant permission.
Properties dialog - result
You can set the properties of a specified result in its Properties dialog according to your requirements.
The Properties dialog is divided into the following two tabs:
●
General
●
Permission
OK
Retains the settings and submits the task to server.
Reset
Discards your modifications and restores the dialog to its default status.
Cancel
Cancels any settings and closes the dialog.
Help
Displays this help document.
General tab
Specifies the general properties of the result.
Resource Path
Shows the resource path.
Resource Node Name
Specifies the name for the result.
Resource Type
Shows the type of the resource.
Resource Description
Specifies the description of the result.
Apply Archive Policy
Applies an archive policy to the result versions.
●
Archive as New Version
Specifies whether to use multiple versions for the result. Available only for versions in the resource tree.
❍
●
Maximum Number of Versions
Specifies the maximum number of versions that will be listed in the version table. By default the number of versions is
unlimited (0).
Replace Old Version
Specifies to replace the old version when a new version is generated.
Permission tab
Specifies permissions of roles/users/groups to the result. This tab is available when the result is in the Public Reports folder.
Enable Setting Permissions
Enables the setting of permissions.
Available
Lists the roles/users/groups to which you can assign permissions.
●
●
●
Role
If checked, all roles will be displayed in the Available box for you to assign permissions.
User
If checked, all users will be displayed in the Available box for you to assign permissions.
Group
If checked, all groups will be displayed in the Available box for you to assign permissions.
Adds the selected roles, users or groups to the Selected box.
Removes the selected roles, users or groups from the Selected box.
Selected
Displays the roles, users and groups to which the permissions will be assigned.
●
●
●
●
●
Visible
Specifies whether to give the selected role/user/group the Visible permission.
Read
Specifies whether to give the selected role/user/group the Read permission.
Write
Specifies whether to give the selected role/user/group the Write permission
Delete
Specifies whether to give the selected role/user/group the Delete permission.
Grant
Specifies whether to give the selected role/user/group the Grant permission.
Publish to Local Server dialog
The Publish to Local Server dialog guides you through the process of publishing resources to JReport Enterprise Server locally.
Publish Local Resource to
Shows where the resource will be published to.
Resource Type
Specifies the type of the resource.
From Folder/From File
Specifies where to get the resource. Click the Browse button to specify the location.
Resource Node Name
Specifies the name of the resource. This name is required and is used as the display name of the resource in the server
resource tree.
Resource Description
Specifies the description of the resource (if necessary).
Resource Real Path
Specifies the real path of the folder. This option is available for folder type only.
Map Shared Disk
This option works together with the Resource Real Path option. It is available for folder type only, and is useful in a cluster
environment.
If this option is not selected, when you publish a scheduled report set on a clustered server to disk, and choose to save it in
this folder, the result will first be saved to the local computer's file system, and then copied to the real path folder by the
admin server. In which case, the specified real path folder must be accessible by the admin server.
If this option is selected, you should ensure that the specified real path folder exists in a shared disk which can be accessed by
all servers in the cluster, and that the real path folder in all clustered servers point to the same place. When you publish a
scheduled report set on a clustered server to disk, and choose to save the result in this folder, it will be directly saved to the
shared disk's real path folder. In this way, server performance is enhanced.
Enable Resources from Real Paths
Specifies whether or not to enable getting resources from the folder real paths. This option is available for folder type only.
Once checked, it is required that you specify a real path in the Resource Real Path field.
Note: This option can only be checked when the Enable Resources from Real Paths option in the Advanced tab of the
Configuration dialog on the JReport Administration page has also been checked.
Automatically Convert Old Report Schemas
Specifies whether or not JReport Enterprise Server converts JReport reports of earlier versions into current version JReport
report sets when publishing the earlier version reports.
Apply Archive Policy
Applies an archive policy to the report set result version. After you have checked this option, the following settings are
available:
●
Archive as New Version
Specifies whether to use multiple versions for the selected resource. Available only for the resources in the resource tree.
❍
●
Maximum Number of Versions
Specifies the maximum version amount that will be listed in the version table. By default the version amount is unlimited.
Replace Old Version
Specifies to replace the old version when the new version is generated.
Set Permission
Available only when the resources are to be published to the Public Reports folder. Click the link to set user permissions to the
resources.
Font Directory
Specifies the font directory of the resource. Click the Browse button to specify the directory. Note that only the font used by
the specified resource can be deployed.
Style Directory
Specifies the style directory of the resource. Click the Browse button to specify the directory.
Advanced Publish
Specifies to publish resources in an advanced way.
OK
Retains the settings and submits the task to server.
Cancel
Cancels the operations.
Help
Displays this help document.
Publish to Remote Server dialog
The Publish to Remote Server dialog guides you through publishing resources to JReport Enterprise Server remotely.
Publish Remote Resource to
Shows where the resource will be published.
From Zipped File
Specifies where to get the resource. Click the Browse button to specify the location.
The option Publish files and folders in the zipped file to /SampleReports without creating a folder with the name of the zipped
file is to specify whether to publish files and folders in the zipped file to /SampleReports without creating a folder with the
name of the zipped file. However, If you specify to publish files and folders in the zipped file to "/My Reports" without creating
a folder with the name of the zipped file, this option will not appear.
Resource Node Name
Specifies the name of the resource node. This name is required and is used as the display name of the resource node in the
server resource tree.
Resource Description
Specifies the description of the resource (if necessary).
Resource Real Path
Specifies the real path of the folder. This option is available for folder type only.
Map Shared Disk
This option works together with the Resource Real Path option. It is available for folder type only, and is useful in a cluster
environment.
If this option is not selected, when you publish a scheduled report set on a clustered server to disk, and choose to save it in
this folder, the result will first be saved to the local computer's file system, and then copied to the real path folder by the
admin server. In which case, the specified real path folder must be accessible by the admin server.
If this option is selected, you should ensure that the specified real path folder exists in a shared disk which can be accessed by
all servers in the cluster, and that the real path folder in all clustered servers point to the same place. When you publish a
scheduled report set on a clustered server to disk, and choose to save the result in this folder, it will be directly saved to the
shared disk's real path folder. In this way, server performance is enhanced.
Enable Resources from Real Paths
Specifies whether or not to enable getting resources from the folder real paths. This option is available for folder type only.
Once checked, it is required that you specify a real path in the Resource Real Path field.
Note: This option can only be checked when the Enable Resources from Real Paths option in the Advanced tab of the
Configuration dialog on the JReport Administration page has also been checked.
Automatically Convert Old Report Schemas
Specifies whether or not JReport Enterprise Server converts JReport reports of earlier versions into current version JReport
report sets when publishing the earlier version reports.
Apply Archive Policy
Applies an archive policy to the report set result version. After you have checked this option, the following settings are
available:
●
Archive as New Version
Specifies whether to use multiple versions for the selected resource. Available only for the resources in the resource tree.
❍
●
Maximum Number of Versions
Specifies the maximum version amount that will be listed in the version table. By default the version amount is unlimited.
Replace Old Version
Specifies to replace the old version when a new version is generated.
Set Permission
Available only when the resources are to be published to the Public Reports folder. Click the link to set user permissions to the
resources.
Advanced Publish
Specifies to publish resources in an advanced way.
OK
Retains the settings and submits the task to server.
Cancel
Cancels operations.
Help
Displays this help document.
Schedule dialog
JReport Enterprise Server allows you to schedule a report set to run at a specific time and publish the
report set result to different formats. To access the Schedule dialog, on the JReport Console > Reports
page, select the report set row, then click Run > Schedule on the task bar of the Reports page (or
right-click in the row and select Schedule from the shortcut menu).
This dialog contains five tabs as listed below. Set the settings in each tab according to your
requirements.
●
General tab
●
Publish tab
●
Conditions tab
●
Notification tab
●
Duration tab
Back
Goes back to the left tab.
Next
Goes to the right tab.
Finish
Applies the settings.
Cancel
Closes the dialog and discards any changes.
Help
Displays this help document.
Related topics:
●
Scheduling report sets with dialog
General tab
Before you can schedule a task, you first need to configure the settings in this tab.
Schedule Name
Specifies the name for the currently scheduled task.
Priority
Specifies a priority level to the report running task. The priority levels are from 1 to 10 in ascending order of lowest priority to highest
priority. This property is available to administrators. By default this property is ignored unless server.properties is modified to set queue.
policy not equal to 0.
Enter Parameters section
Specifies the reports and parameter values.
Select Reports
Specifies the report(s) you schedule to run. You can select multiple normal reports at a time.
Select Bursting Reports
This option is available when there are bursting reports in the current report set. Select the bursting report you schedule to run. You can
select only one bursting report at a time.
Once you choose to schedule to run a bursting report, you should at least either complete Bursting Configuration for the report or select
Non-bursting result in order to submit the task.
Bursting Configuration
●
Select Schema
Specifies the schema you want to apply to the selected bursting report. You can select multiple schemas to apply to the report.
Non-bursting Result
If checked, the bursting definition will be removed from the report and the result will be generated based on whole data without data
splitting.
Parameters
Specifies values of the parameters applied in the selected reports. If the reports have no parameter, "No Parameter Needed" will be
displayed here.
You may specify parameter values in the following ways:
●
●
●
●
●
In the parameter value combo boxes input the values manually or select them from the drop-down lists.
Click the button
, which is available when the parameter's Allow Multiple Values was set to true while it was created in JReport
Designer, to specify multiple values in the Enter Values dialog.
If the parameter is of DateTime type, click the calendar button
to set a DateTime value with calendar.
If the parameter is of Date, DateTime, or Time type, check the checkbox ahead of the button
dynamic date or time parameter value with expression in the Expression dialog.
and then click the button to specify a
Click the Use Previously Saved Auto Complete Parameters link, which is available when Enable Saving Parameter Values is checked
in the Profile > Customize Server Preferences > Advanced tab, to select a previously saved parameter value list to apply. You can view
the parameter values of the available lists or delete the unwanted list in the prompted dialog as required.
Save Current Parameters in Auto Complete List
Specifies to save the parameter values set for the specified report for reuse next time. The parameter values will then be saved as a whole
marked as a list, and you need to provide a name for the list in the prompted dialog as required. This link is available when Enable Saving
Parameter Values is checked in the Profile > Customize Server Preferences > Advanced tab.
If multiple reports are selected, the parameter values specified for all of the reports are saved as a list. The next time only when these very
reports are selected, can the list be available for apply when you click the Use Previously Saved Auto Complete Parameters link.
In addition, the parameter value lists saved for the selected reports are limited. The maximum number is controlled by the option
Maximum Number of Auto Complete Parameters List in the Profile > Customize Server Preferences > Advanced tab. By default it is 3.
When the number of the saved parameter value lists reaches the maximum number, if you want to save another parameter list, it will
overwrite the oldest list.
Report Set Info section
Specifies the report set information.
Report Set
Lists information about the report set.
Catalog
Lists the catalog information.
Select Another Catalog
Specifies another catalog for the report set in the Select Another Catalog dialog.
Report Set Version
Specifies the report set version when you schedule a task. The default version is always the latest version.
Catalog Version
Specifies the catalog version when you schedule a task. The default version is always the latest version.
Advanced section
Configures some advanced settings.
Enable Style Group
When this option is disabled as default, use the style group properties of the selected reports for corresponding exporting formats that are
pre-defined in JReport designer to do the schedule. These pre-defined style group properties for exporting formats take effect when
publishing to version/disk/e-mail/FTP.
When this option is enabled, you are allowed to apply a style group to all the selected reports in the report set for all export formats. This
setting will cancel all the style group properties of the selected reports for all export formats that are pre-defined in JReport Designer and
replace them all with the value specified here.
When the None item on the top of the Style Group drop-down list is selected, no style will be applied when exporting these reports to any
format.
Enable Converting Encoding
Specifies to enable the conversion of encoding. From the Before Converting and After Converting drop-down lists, select encodings as
required.
Encoding
Specifies the encoding of the report set from the drop-down list.
Catalog DataSource in Data Source 1
●
●
Use the default DB user and password defined in catalog
Specifies to use the default DB user and password defined in the catalog.
Use the DB user
Specifies another DB user and password in the catalog instead of the default one.
Add TaskListener to be Invoked
Enables you to call the Java application before/after viewing or when scheduling the report set.
With Load Balancer, prefer a server to run the task
Enables you to directly specify a server in a cluster to perform a scheduled task or an advanced-run task instead of using load balancing.
This option is available only when there are more than one active clustered servers in a cluster environment and when the Identify Server
Preference option in the Customize Server Preferences tab of Profile dialog is selected.
Enable Auto Recover Task
Specifies to enable the task to be auto recovered.
●
●
●
Maximum Retry Times
Specifies the maximum number of times in which to retry running the task in order to recover it.
Retry Interval
Specifies the interval between retries.
Recreate All Results
Specifies whether to recreate all or just the failed results when you published the task to multiple formats.
Publish tab
The Publish tab allows you to specify the type of the task. There are two main tasks to publish your
report sets: Default Task and User Task. By default, Default task is used to publish the report sets. To
use the User Task, click the User Task link in the Default Task page.
Default Task
If you select Default Task to publish your report sets with, when specifying your task type, you can
choose from the following six sub tasks:
●
●
●
●
●
●
To Version
Publishes the report set result to the versioning system.
To Disk
Publishes the report set result to the file system.
To E-mail
Publishes the report set result to e-mail.
To Printer
Publishes the report set result to a printer.
To Fax
Publishes the report set result to fax.
To FTP
Publishes the report set result to an FTP site.
Note: If you are scheduling a bursting report, the Publish tab will change according to the bursting
setting made in the General tab of the Schedule dialog. For details about the change, see Scheduling a
task containing a bursting report.
User Task
If you select User Task to publish your report sets, you can implement a customized task with schedule
properties.
●
●
●
●
●
User Task Class Name
Specifies the class name for the user task.
Display Name
Specifies the display name for the user task.
User Task Properties
Specifies user task properties to define tasks.
Import User Task Properties from file
Imports a user task from a properties file.
Upload Properties
Uploads the properties to JReport Enterprise Server. The properties will be listed in the User Task
Properties area.
To Version
This tab is for you to specify settings for publishing report set results to the versioning system.
Publish to Versioning System
Specifies to publish the report set result to the versioning system. You can publish the report set result to the following formats:
●
JReport Result
Publishes the report set to a JReport result file.
❍
❍
●
Zip Result
Specifies to compress the result to reduce the disk size and I/O; however, it uses more CPU resources.
Precision Level
Specifies the precision level with which to publish the report set result. Note that changing the default value may cause
abnormalities in report layout.
DHTML
Publishes the report set to a DHTML result file (RSD file) that can be viewed in a JReport Web window. Some reports cannot be
published to version in the DHTML Result format, such as self-contained (CLX) reports, multi-level nested master and subreports,
reports containing data objects, and reports developed from a dynamic query or hierarchical data source (HDS).
An RSD file is a middle result for DHTML that can preserve data and the working status of the DHTML report and can be shared with
others. Based on the RSD file, you can rebuild a DHTML report to analyze data and to export to other formats. An RSD file is a
standalone working file so all the useful information is added into it, such as catalog, report template, NLS, data, parameters and
security. The security information of an RSD file is the user of the generator that creates it. When different users open the same RSD,
they will get the same result based on the same security configuration. You cannot refresh a report viewed from an RSD file to
refetch data from the database. When the system rebuilds a report according to the RSD file, it will only load data from the RSD file.
When opening a report RSD, you cannot go back to the actions which the RSD generator took before generating the RSD file but can
take actions based on the current RSD resources.
❍
❍
●
●
●
●
●
●
●
Zip Result
Specifies to compress the result. The compressed file's suffix will still be .rsd, it's size will be smaller which reduces IO and disk
usage; however, it uses more CPU resources.
Precision Level
Specifies the precision level with which to publish the report set result. Note that changing the default value may cause
abnormalities in report layout.
HTML
Publishes the report set result to the versioning system in HTML format.
PDF
Publishes the report set result to the versioning system in PDF format.
Excel
Publishes the report set result to the versioning system in Excel format.
Text
Publishes the report set result to the versioning system in Text format.
RTF
Publishes the report set result to the versioning system in RTF format.
XML
Publishes the report set result to the versioning system in XML format.
PostScript
Publishes the report set result to the versioning system in PostScript format.
Archive Location
Specifies the location for the saved report set result version.
●
●
●
Built-in Version Folder
Specifies to save the report set result version to the built-in version folder.
My Reports Folder
Specifies to save the report set result version to the My Reports folder.
Public Reports Folder
Specifies to save the report set result version to the Public Reports folder.
Apply Archive Policy
Applies an archive policy to the report set result version.
●
●
Archive as New Version
Specifies whether to use multiple versions for the specified resource. Available only for resources in the resource tree. The Maximum
Number of Versions option specifies the maximum version number that will be listed in the version table. By default number of
versions is unlimited. When the number of versions is reached, the new version will replace the oldest version in the resource tree.
Replace Old Version
Specifies to replace the old version when a new version is generated.
Result Auto-delete
Specifies the deleted date of the result. Set the result to be automatically deleted within one hundred years. If the time you specify
exceeds one hundred years, JReport Enterprise Server will keep the report set result forever.
●
●
Result Expires in N Days
Specifies a period after which the report set result will be automatically deleted.
Result Expires After
Specifies a certain day on which the report set result will be automatically deleted.
Set Permissions
Available only when the Archive Location is specified to be Public Reports Folder. Click the link to set user permissions to the specified
reports in the report set.
To Disk
This tab is for you to specify settings for publishing report set results to the file system.
Publish to Disk
Specifies to publish the report set result to the file system.
You can publish the report set result to the following nine formats. For each format, you can decide whether to publish the
results to the server resource tree or to the server disk path. Then you need to type in the blank location field root of the
resource tree or disk path as shown in the examples below:
Example for server resource tree: /SampleReports/report1.rst
Example for server disk path: C:\temp\report1.rst
●
●
●
●
●
●
●
●
JReport Result
Publishes the report set to a JReport result file (RST file).
DHTML
Publishes the report set to a DHTML result file (RSD file) that can be viewed in a JReport Web window.
HTML
Publishes the report set result to the file system in HTML format.
PDF
Publishes the report set result to the file system in PDF format.
Excel
Publishes the report set result to the file system in Excel format.
Text
Publishes the report set result to the file system in Text format.
RTF
Publishes the report set result to the file system in RTF format.
XML
Publishes the report set result to the file system in XML format.
●
PostScript
Publishes the report set result to the file system in PostScript format.
Notes:
●
●
For the JReport Result and DHTML formats, you need only provide one file path because all selected reports in the report set
will be output into one file. For other formats, you need specify a file path for each selected report.
The files with the extension of .rsd should be opened with JReport Web and those with the extension of .rst should be
opened by JReport Viewer or Applet.
To E-mail
This tab is for you to specify settings for publishing the report set results to e-mail.
Mail To
Lists the e-mail addresses you have sent mail to.
New
Creates a new e-mail.
●
From
Specifies your e-mail address.
Note: If you do not specify the address, the e-mail address in the Export > E-mail tab of the Configuration dialog on
the JReport Administration page will be used as the default address.
●
●
●
●
●
●
●
●
To
Specifies the address you want to send the e-mail to.
Cc
Specifies the address you want to copy to.
Bcc
Specifies the address you want to secretly copy to.
Subject
Specifies the subject of the e-mail.
Comments
Specifies the contents of the e-mail or comments to the contents.
Encoding
Specifies the encoding of the e-mail.
Compress Attachment as Java Archive
Specifies whether to compress the mail attachment as Java Archive.
SMTP Logon Information
Specifies the SMTP logon information.
❍
❍
❍
Account Name
Specifies the account name.
Password
Specifies the password of the account.
E-mail Address
Specifies the e-mail address of the account.
Note: This option can be enabled only when the option Server Requires Authentication is checked in the Export > Email tab of the Configuration dialog on the JReport Administration page.
●
●
E-mail Result in HTML E-mail Format
Sends the report set result via e-mail to the specified address in HTML format. The report set result will be shown in
HTML format in the mail body.
E-mail Result in Plain Text E-mail Format
Sends the report set result via e-mail to the specified address in plain text format. The report set result will be shown in
plain text format in the mail body with no other information such as color, images and so on. See details about settings of
this format.
Notes:
❍
❍
●
The two formats, E-mail Result in HTML E-mail Format and E-mail Result in Plain Text Format, cannot be support
concurrently.
If you choose to send the mail in E-mail Result in HTML E-mail Format, the comments that you input for the mail
will be overwritten by the report set result.
Attachment in JReport Result Format
Sends the report set result via e-mail to the specified address with a JReport result file as attachment.
❍
❍
File Name
Specifies the name for the attachment file.
Zip Result
Specifies to compress the result and its size would be smaller.
❍
●
●
Precision Level
Specifies the precision level with which to publish the report set result. Note that changing the default value may cause
abnormalities in report layout.
Attachment in HTML Format
Sends the report set result via e-mail to the specified address with an HTML file as attachment.
Attachment in PDF Format
Sends the report set result via e-mail to the specified address with a PDF file as attachment.
Note: If the Split PDF options is checked in the JReport Administration > Configuration page (Configuration >
Export > E-mail > Split PDF), the TOC and Sign options are disabled here.
●
●
●
●
●
●
●
Attachment in Excel Format
Sends the report set result via e-mail to the specified address with an Excel file as attachment.
Attachment in Text Format
Sends the report set result via e-mail to the specified address with a Text file as attachment.
Attachment in RTF Format
Sends the report set result via e-mail to the specified address with a RTF file as attachment.
Attachment in XML Format
Sends the report set result via e-mail to the specified address with an XML file as attachment.
Attachment in PostScript Format
Sends the report set result via e-mail to the specified address with a PostScript file as attachment.
OK
Retains the settings and adds the e-mail address into the Mail To list.
Cancel
Cancels operations.
Edit
Edits the specified e-mail in the Mail To list.
Delete
Deletes the specified e-mail in the Mail To list.
To Printer
This tab is for you to specify settings for publishing report set results to a printer.
Publish to Printer
Specifies to publish the report set result to a printer.
Select Print Method
Specifies the JDK version.
When JDK1.4 is selected in the Select Print Method option, the following options will be available.
Paper Size
Specifies the paper size.
Print Range
Specifies the pages to be printed.
Copies
Specifies the number of copies you want to print. The number of copies will be applied to all specified pages.
Print to File
Prints the document to a file instead of a printer. This kind of files can only be opened and printed by serial port printer on
Windows via DOS command.
●
File Name
Specifies the name of the file to which you print. If no path is provided in the file name, the file will be saved to the working
directory of the server.
Job Attributes
Specifies the properties of the print task.
●
●
●
Priority
Specifies the print priority for this task.
Job Name
Specifies the name of the print task.
User Name
Specifies the name of the user.
Orientation
Specifies the orientation for the printed reports.
●
●
●
●
Landscape
Prints your reports in a Landscape orientation.
Portrait
Prints your reports in a Standard letter orientation.
Reverse Landscape
Prints your reports in a Reverse Landscape orientation.
Reverse Portrait
Prints your reports in a Reverse Portrait orientation.
Color Appearance
Specifies to print the reports in Monochrome or in Color.
Print Quality
Specifies the print quality. It can be Draft, Normal, or High.
Print Sides
Specifies the print sides for the printed reports.
●
●
●
One Side
Imposes each consecutive print-stream page upon the same side of consecutive media sheets.
Duplex
Imposes each consecutive pair of print-stream pages upon the front and back sides of consecutive media sheets, such that
the orientation of each pair of print-stream pages on the medium is correct for the reader as if for binding on the long edge.
Tumble
Imposes each consecutive pair of print-stream pages upon front and back sides of consecutive media sheets, such that the
orientation of each pair of print-stream pages on the medium is correct for the reader as if for binding on the short edge.
Sheet collate
Specifies the printing order for printing multiple-page reports.
●
●
Collated
If selected, when you print two copies of a three-page report, the page order is 1, 2, 3; 1, 2, 3.
Uncollated
If selected, when you print two copies of a three-page report, the page order is 1, 1; 2, 2; 3, 3.
Margins
Specifies the paper margins for the printed reports (MM or Inch).
Media Tray
First select a printer, and then from the drop-down list, specify the media tray.
Printer
Specifies the name with the path of the printer. You can type it in the box or select it from the drop-down list.
Notes:
●
●
●
JReport Enterprise Server cannot obtain information on which options are supported and which are not from your printer
and reflect it on this tab. You should configure the setting according to your printer carefully.
When your server runs under JDK 1.4 or earlier version, there may be a mistake about field width calculation. In which
case, the preview result may be partly invisible. To avoid this, change to JDK 1.4 or later version.
When there is no printer available (connected to the server), and you schedule to publish a report set result to printer, the
server may crash or throw an exception.
To Fax
This tab is for you to specify settings for publishing report set results to fax.
Note that before you can fax the report set result, you must have your modem configured, otherwise a warning message will
be displayed.
Publish to Fax
Specifies to publish the report set result to fax.
Quality
Specifies the quality of the fax: Best, Normal, and Fast.
Include Cover Sheet
Specifies to send a cover sheet with the fax.
The following items are displayed on the fax cover sheet.
To
Specifies the name of the recipient.
From
Specifies the name of the sender.
Company
Specifies the name of the company.
Date
Specifies the date on which the fax is to be sent. You can specify the date by clicking the calendar button
.
Fax Number
Specifies the fax number of the recipient.
Phone Number
Specifies the phone number of the sender.
Re
Specifies the subject of the fax.
Comments
Specifies the comments of the fax.
Urgent
Specifies whether the fax is urgent or not.
For Review
Specifies that the recipient only needs to view the fax.
Please Comment
Specifies that the recipient is required to comment on the content of the fax.
Please Reply
Indicates that a reply is required for the fax.
To FTP
This tab is for you to specify settings for sending report set results to an FTP site. Note that in order to use the Publish to FTP
feature, your JDK version must be 1.5 or later.
FTP To
Lists the FTP sites you send report set results to.
New
Creates a new FTP site.
●
●
FTP Site Name
A user-defined name of the FTP site. It is optional.
Host Address
The domain name or IP address of the FTP site. It cannot be null.
●
●
●
●
●
●
●
Port
The port of the FTP server. It is optional, and by default 21 is used for Standard FTP and Explicit FTPS, 22 SCP and SFTP,
and 990 for Implicit FTPS.
User Name
The user name is valid to the authentication of the FTP server that can access the FTP site. If not specified, "anonymous" will
be used as the user name by default.
Password
The password is valid to the authentication of the FTP server that enables the user name to access the FTP site.
Account
The account of the FTP user if there exists.
Folder Location
The location where to put the report set result files on the FTP server. If not specified, the root path "/" of the FTP server will
be used by default.
Handler Class
A customized FTP-client handler class can be used instead of the one provided in JReport. You should specify a fully-qualified
class name that is package name plus class name, for example, test.DemoJakartaFTPHandler.
Protocol Type
Specifies the protocol type used for publising the report results to FTP.
❍
❍
❍
❍
❍
●
FTP (Standard File Transfer Protocol)
Files are transferred in a non-secure (plain text) style.
SFTP using SSH2 (Secure Shell)
SFTP (Secure FTP) is a component of Secure Shell and is supported by most Unix servers running SSH2. Ask your server
administrator about availability.
SCP (Secure Copy)
This is a means of securely transferring computer files between a local and a remote host or between two remote hosts,
using the Secure Shell (SSH) protocol. If this type is selected, you will not be able to create folder to the FTP server.
FTP with TLS/SSL (Explicit)
Explicit connection type of FTP security with TLS/SSL.
FTP with TLS/SSL (Implicit)
Implicit connection type of TP security with TLS/SSL.
Formats
Specifies in which formats to send the report set result file to the FTP site. You can specify one or more formats. For each
format, you need to specify a name for the result file.
❍
JReport Result
Sends the report set result in a JReport result file to the specified FTP site.
■
■
❍
❍
❍
❍
❍
❍
Zip Result
Specifies to compress the result and its size would be smaller.
Precision Level
Specifies the precision level with which to publish the report set result. Note that changing the default value may cause
abnormalities in report layout.
HTML
Sends the report set result in an HTML file to the specified FTP site.
PDF
Sends the report set result in a PDF file to the specified FTP site.
Excel
Sends the report set result in an Excel file to the specified FTP site.
Text
Sends the report set result in a Text file to the specified FTP site.
RTF
Sends the report set result in a RTF file to the specified FTP site.
XML
Sends the report set result in an XML file to the specified FTP site.
❍
●
●
●
PostScript
Sends the report set result in a PostScript file to the specified FTP site.
Check Connection
Checks whether to be able to connect to the specified FTP location with the specified user account.
OK
Retains the settings and adds the FTP site into the FTP To list.
Cancel
Cancels the creation of the new FTP site.
Edit
Edits the specified FTP site in the FTP To list.
Delete
Deletes the specified FTP site from the FTP To list.
Conditions tab
The Conditions tab allows you to specify the conditions for the publishing tasks. It contains the following two sub tabs:
●
Time tab
●
Trigger tab
Time tab
The Time tab allows you to set settings for specifying the time for when a task is to be performed.
Time Zone
Specifies the time zone.
Time Type
Specifies the time type of the task.
●
●
Run this task immediately
Performs the task as soon as you submit it.
Run this task at
Specifies the time for when the task is to be performed on a repeated basis.
❍
Date
Specifies the date for when the task will be run. You can specify the date by clicking the calendar button
❍
❍
Time
Specifies the time for when the task will be run.
Run missed task upon Server restart
.
Specifies to run missed tasks when you restart the server.
●
Run this task periodically
Specifies the time for when the task is to be performed on a repeated basis.
❍
Duration
■
■
❍
■
■
Daily
Performs the task every one day, two days, etc., or every weekday (from Monday to Friday).
Weekly
Performs the task every one week, two weeks, etc., and on Sunday, Monday, Tuesday, etc.
Monthly
Performs the task every one month, two months, etc., on the first day, second day, etc., or on the first Sunday,
Monday, etc., of the specified month.
Time
Specifies the exact time for when a task is to be performed on a selected day.
■
■
■
❍
Run until
Specifies the end date and time of the period during which the task is to be performed on a repeated basis.
Date
■
❍
Run after
Specifies the start date and time of the period during which the task is to be performed on a repeated basis.
At
Specifies a certain time for when to perform a task on a selected day.
Hourly
Performs the task every one hour, two hours, etc., at a certain minute on a selected day.
Minutely
Performs the task every one minute, tw