See It...
Sample Reports, Charts & Dashboards
Request a Demo
Try It...
Free 45 Day Evaluation Download
Free Dashboards at
  
EspressReport Tech Support FAQ

Installation Issues

  1. Does Oracle 9iAS, IBM AS400, RS6000 and other models work with EspressReport and its servlets? Does it connects to DB2?
  2. After I used the EspressReport pure Java installer to install EspressReport on a Mac, ReportDesigner runs but with incorrect behavior in its GUI, how do I fix that?

Running EspressReport

  1. When we tried using EspressReport and connect to MSSQL version 7.0 it gives java.sql.SQLException: Failed to retrieve data. null?
  2. When we tried using EspressReport and connect to oracle version 8.i it gives java.sql.SQLException: Failed to connect to database.
  3. Does EspressReport trucate long text line?
  4. How to reduce table height with Report API?
  5. How to change background and Font of selected cell(s)?
  6. If there are more columns than the size of the applet in a frame, where do the remaining columns go?
  7. Can report be generated without using EspressManager?
  8. How to use .rpt file as a report template in Report Designer?
  9. How to change the file location of a chart inside a report?
  10. I get an "Out of Memory" Error
  11. How to get a handle to a cell in the report?
  12. Why doesn't PDF output stream appear in Internet Explorer browser?
  13. How do I set-up a JDBC connection to my database?
  14. How do I cut, copy, and paste into the "Enter SQL Statements..." window?
  15. Why is my scheduled reports running an hour late?
  16. Why does ERES freeze when using Java 1.6 with MS SQL Server 2000.

Solaris / Linux / Unix Issues

  1. After X11R6 (Xvfb) started, EspressReport still gives "quadbase/chart/C-string not found error"
  2. How do I configure my servlet container to use java 1.4+ headless mode?

Features and Enhancements

  1. Does EspressReport support stored procedures?

After X11R6 (Xvfb) started, EspressReport still gives "quadbase/chart/C-string not found error:

After I started X, or Xvfb, I still have the problem and the culprit was the environment variable. I did not set my DISPLAY environment variable, since I always use telnet. You may want to include the hint on DISPLAY environment variable, since when you mention EspressChart could not find X, it is not very clear to non-admin people to trouble shoot. I got the hint from our admin support about DISPLAY property. DISPLAY can be set to simply ":1.0" or "127.0.0.1:1.0" or "A.B.C.D:1.0" where "A.B.C.D" is the machine's IP address. In Apache/Jserver, one line should be added to the jser.properties file when Apache and Jserver are started the same time. wrapper.env=DISPLAY=localhost:0.0.

How do I configure my servlet container to use java 1.4+ headless mode?

For Tomcat, you need to modify the catalina.sh file in the bin directory. In that file, simply add a line that declares (if it is not yet declared) the JAVA_OPTS variable and set its value to be:

JAVA_OPTS=-Djava.awt.headless=true

For other servlet containers, locate the file that starts the java process and add in the argument: -Djava.awt.headless=true so that the resulting command to invoke the java process for the servlet container would be something like this:

java -Djava.awt.headless=true servletContainerClass

Does Oracle 9iAS, IBM AS400, RS6000 and other models work with EspressReport and its servlets? Does it connect to DB2?"

EspressReport was successfully tested with Web Sphere server. A graphic card or Xvfb is required on AS400 for the EspressReport-associated servlets to run. You need to install EspressReport with java for the DB2 database connection to work. Oracle 9iAS Application Server requires CLASSPATH settings in XML files for the servlets to work.

When we tried using EspressReport and connect to MSSQL version 7.0 it gives java.sql.SQLException: Failed to retrieve data null.

Please edit espressmanager.bat and change -DBBuffer:5 to -DBBuffer:0 in order to retrieve null data from MSSQL.

How to reduce table height with Report API?

ReportTable table = report.getTable();
table.setHeight(0.2); //reduce table height to 0.2 inch

How to change background and Font of selected cell(s)?

Please use cell script with sample codes in espressreport\help\manual\Programming_API.html

If there are more columns than the size of the applet in a frame, where do the remaining columns go?

They are in the next section of the applet in the frame. You may right-click mouse to reach the next section.

Can report be generated without using EspressManager?

Please use the following API to generate report without using EspressManager.

QbReport.setEspressManagerUsed(false);

How to use .rpt file as a report template in Report Designer?

Please create a new report and specifying the data source. When you get to the main Report Designer window (i.e., the place where you actually design the report), go to File -> Apply Template and specify the .rpt file. This should then apply the look and feel of your existing .rpt file onto the newly created report. The same sequence can be used in API.

How to change the file location of a chart inside a report? Three options are available.

  1. Copying the template directory to the working directory of the .class file
  2. Using the API to create the charts
  3. Use the API to change the location of the chart in the Report. You can get a handle to the cell containing the chart and edit it to change the located from a relative file location to an absolute file location (not recommended) or a URL location (recommended).

Does EspressReport support stored procedures?

You may specify a stored procedure in the query such as "EXEC store" or "EXEC store 'P1', 'P2' where P1, P2 are parameters into store for MSSQL and setup store on the database server. Similar stored procedure works for Oracle database where the query becomes "call store (P1, P2)".

How to get the handle to a cell in a report?

To access the objects using the API, you get a handle to the section and then get the cells in that section and access the appropriate cell. For instance, let us say you have a image object and a label object in the page header. To access these elements, you would

QbReport report = new QbReport(..., ...);

ReportCell[] pageHeaderData = report.getPageHeader(); // Gets both cells
ReportCell imageObject = pageHeaderData[0];
ReportCell labelObject = pageHeaderData[1];

// Then you can modify the objects as necessary.

Does EspressReport trucate long text line?

You may either create a template with the width and height set (assuming you know what the maximum size of the strings will be) and you can then apply the template onto the report object created. Or expand the cell height and width by the following API lines:

report.getTable().getHeader().setHeight(1); // Set Height to one inch
report.getTable().getHeader().setWidth(7); // Set Width to seven inch

When we tried using EspressReport and connect to oracle version 8.i it gives java.sql.SQLException: Failed to connect to database.

If you're running without EspressManager, make sure that the Oracle driver (classes12.zip) is in the classpath. If you're running with EspressManager, edit the EspressManager batch file, and add the Oracle driver to the "-classpath" argument.

I get an "Out of Memory" Error

This indicates that either the Report Designer or EspressManager has run out of memory. To increase the memory for either component, modify batch files generated by the installation and add the following argument -Xmx64M before the "-classpath" argument.

The "64M" portion increases the heap size of the Java process to 64 megabytes. You can allot more or less memory as your system allows.

When running Report Designer, you can set the number of records to be retrieved in the Preview window, by selecting the 'Set Preview Display Row' option in the Data menu.  By default, the entire result set is retrieved when previewing a report which can cause the Designer to run out of memory.

When deploying reports with large data sets, you can use memory optimized exporting to prevent memory errors on the server.  Memory optimized exporting will retrieve only a set number of records from the database at a time, rather than pulling the whole result set into memory.  For more on this feature, please see the exporting section of the Programming Guide in the EspressReport User's Guide.

Why doesn't PDF output stream appear in Internet Explorer browser?

There are a number of errors that can occur when trying to display a PDF output stream from a servlet in Internet Explorer.  The most common problem is that the user will get a blank page even though the PDF output is correct.  This error can be overcome by setting the content length as well as content type for the output stream.

The following code snippet illustrates how to set the content length for an output stream:

....
....
ByteArrayOutputStream reportBytes = new ByteArrayOutputStream();

report.export(QbReport.PDF, reportBytes); // where report is an object of type QbReport

response.setContentType("application/pdf"); // where response is the HttpServletResponse
response.setContentLength(reportBytes.size());

OutputStream toClient = response.getOutputStream();
reportBytes.writeTo(toClient);
toClient.flush();

How do I set-up a JDBC connection to my database? Below are a collection of URL and Driver for common database connection and drivers. For difficulty in connection, please java TestDB (use class file in bridgeTest directory) to return more error messages for adjustment.

Hsql (Hypersonic sql) database server (EspressReport example database datasource)
Hsql JDBC Driver (in-process or standalone mode)
jdbc classes: hsqldb.jar under $espressreport_install_dir$/help/examples/DataSources/database/hsqldb.jar
database url (relative path): hsqldb:help/examples/DataSources/database/woodview
database url (absolute path | windows): hsqldb:C:/espress-report/help/examples/DataSources/database/woodview
database url (absolute path | unix): hsqldb:/usr/espress-report/help/examples/DataSources/database/woodview
jdbc driver: org.hsqldb.jdbcDriver

Hsql JDBC Driver (server mode)
jdbc classes: hsqldb.jar under $espressreport_install_dir$/help/examples/DataSources/database/hsqldb.jar
database url (1 db on 1 machine): jdbc:hsqldb:hsql://machineName
database url (> 1 db on 1 machine): jdbc:hsqldb:hsql://machineName:port
jdbc driver: org.hsqldb.jdbcDriver

documentation: frame | no frame

IBM's DB2 v8
JDBC Type 2 driver implementation: the legacy/CLI JDBC driver
jdbc driver: COM.ibm.db2.jdbc.net.DB2Driver | COM.ibm.db2.jdbc.app.DB2Driver
jdbc classes: db2java.zip
database url: jdbc:db2://machine/database | jdbc:db2:database
download: http://www-306.ibm.com/software/data/db2/udb/ad/v8/java/ or find it in $(db2-install)/java/db2java.zip

Universal JDBC driver
jdbc driver: com.ibm.db2.jcc.DB2Driver
jdbc classes: db2jcc.jar, jd2jcc_license_cu.jar (license)
database url: jdbc:db2://host:port/database (ex. jdbc:db2://server1:50000/phonedb)
download: http://www.ibm.com or find it in $(db2-install)/java/db2jcc.jar and jd2jcc_license_cu.jar

MS SQL Server 2000
JDBC Drivers from Microsoft
jdbc classes: msbase.jar, mssqlserver.jar, msutil.jar
database url: jdbc:microsoft:sqlserver://host:port
jdbc driver: com.microsoft.jdbc.sqlserver.SQLServerDriver

JSQLConnect from JDBC Drivers from Microsoft
jdbc classes: msbase.jar, mssqlserver.jar, msutil.jar
database url: jdbc:microsoft:sqlserver://host:port
jdbc driver: com.microsoft.jdbc.sqlserver.SQLServerDriver
download: Net Direct

MS SQL Server 2005
JDBC Driver from Microsoft
jdbc class: sqljdbc.jar
database url: jdbc:sqlserver://host:port
jdbc driver: com.microsoft.sqlserver.jdbc.SQLServerDriver

Link:
MS SQL Server 2005 JDBC Driver Download
http://msdn.microsoft.com/en-us/data/aa937724.aspx

MySql

MySQL Connector/J from MySql (www.mysql.com)
jdbc classes: mysql-connector-java-2.0.14-bin.jar (download from www.mysql.com)
dtabase url: jdbc:mysql://host/database
jdbc driver: com.mysql.jdbc.Driver

OpenBase
JDBC Driver from OpenBase
jdbc classes: OpenBaseJDBC.jar (download from www.openbase.com)
dtabase url: jdbc:openbase://host/database
jdbc driver: com.openbase.jdbc.ObDriver

Oracle (Oracle 8i)
JDBC Thin Driver
database url: jdbc:oracle:thin:@host:port:sid
jdbc driver: oracle.jdbc.driver.OracleDriver
jdbc classes: classes12.zip (download from www.oracle.com)

OCI Driver
database url: jdbc:oracle:oci8:@{your-tns-name}
jdbc driver : oracle.jdbc.driver.OracleDriver
jdbc classes: classes12.zip(download from www.oracle.com)

Links:
Oracle8i JDBC Developer's Guide and Reference
http://download-west.oracle.com/docs/cd/A87860_01/doc/java.817/a83724/toc.htm

Oracle JDBC Driver download
http://otn.oracle.com/software/tech/java/sqlj_jdbc/index.html

Sybase
JConn2 driver from Sybase
jdbc classes: jconnect2.jar
database url: jdbc:sybase:Tds:host:port
jdbc driver: com.sybase.jdbc2.SybDriver

After I used the EspressReport pure Java installer to install EspressReport on a Mac, ReportDesigner runs but with incorrect behavior in its GUI, how do I fix that?

This is due to known defects in the Mac Java VM 1.4. To solve this problem, simply use a Mac Java VM 1.3 to run EspressManager and ReportDesigner. Simply modify the espressmanager.sh and reportdesigner.sh files. You will need to do the same change to them before you run them. Edit the .sh files. On the line that starts with: JAVA_EXECUTABLE=$JAVA_EXECUTABLE$.

Replace $JAVA_EXECUTABLE$ with the path to your java executable on your MacOS, for example change the line to:

JAVA_EXECUTABLE=/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/home/bin/java

Then restart your EspressManager and ReportDesigner.

How do I cut, copy, and paste into the "Enter SQL Statements..." window?

When the Report Designer is running as an Applet, java applet security prevents Report Designer from accessing the system's clipboard.  Therefore, even though cut, copy, and paste works within the Applet, it cannot obtain data from an external source.  This becomes a problem when the user wants to copy and paste long SQL queries from a text file into the Designer.  The way to solve this problem is to set the java applet security policy so that the Designer is granted permission to access the System clipboard. To do so, go to your JRE security directory (if you have multiple versions, use the one set up for your browser), on Windows this is typically located in the C:\Program Files\Java\j2re*\lib\security\. Open the "java.policy" file, scroll to the bottom, and add the following lines:

grant codeBase "http://<IP_Address>:<Port>/-" { permission java.security.AllPermission; };

Where <IP_Address> and <Port> designates the IP address and port of the machine running the applet, for example:

grant codeBase "http://192.168.0.1:8080/-" {...

After you have set your security policy, restart your browsers and go back into Report Designer, you will now be able to copy and paste from the system clipboard.

Why is my scheduled reports running an hour early/late?

When the United States moved Daylight Saving Time (DST) to its new date, certain older JRE versions will not be able retrieve the correct time from the system.  As a result, when you schedule a report to run at a specific time, it will run an hour later during the three weeks after DST has gone into effect and an hour earlier for the three weeks before DST is set to end.  For more information, please see the Sun Article discussing this issue.

Here are the options you have to fixing the scheduler problem:

  • Update your JDK/JRE to the latest build
  • Use the update program (TZupdater) from the Sun Article above
  • Turn off automatically adjust for Daylight Saving Time in your OS and change the clock manually

Why does ERES freeze when using Java 1.6 and MS SQL Server 2000?

The MS SQL Server 2000 JDBC Drivers have compatibility issues with Java 1.6. To solve this issue, use the MS SQL Server 2005 JDBC Drivers instead.