<= Previous | Next => | Table of Contents DataVision FAQ

3 Running DataVision

3.1 Can I run DataVision as a Web application?

What do you mean by "Web application"? If you are asking, "can I run DataVision from a Java application that happens to have a Web component?", then the answer is yes. See Incorporating DataVision Into a Java Application in the User's Manual for instructions. See also the answer to the question Can DataVision read data from anywhere else?.

You can always run a report from within your application, save the output of a layout engine to a file, and serve the file to the user (the HTML layout engine may be particularly useful). This is also necessary if you want to run a report from a Servlet or JSP page. See Running DataVision from JSP for details.

You could run report files retrieved from a server and display the HTML results directly without too much effort by modifying or replacing either the HTML or Swing layout engine (but see the previous paragraph).

If your reports had parameters, you would have to ask the user for the parameter values first (say, via a Web form), store the values in a temporary parameter XML file, then feed that file to the report object. See How do I ask the user for parameters?.

To modify DataVision to work as an applet would take a bit of reworking. All file access (report XML files, parameter files, and layout engine output) would have to be modified to fit in the sandbox security model or be eliminated. Using the report design aspects of DataVision would be nigh impossible, as they assume a multi-window GUI.

3.2 Can I run DataVision from JSP?

Yes. See Running DataVision from JSP in the User's Manual.

3.3 Can I run DataVision from a Java application?

Yes. See Incorporating DataVision Into a Java Application in the User's Manual. (The former contents of this section were a copy of that section. There's no sense in maintaining duplicate information.)

3.4 How do I ask the user for parameters?

See Asking for Parameter Values in the User's Manual. (The former contents of this section were a copy of that section. There's no sense in maintaining duplicate information.)

3.5 Why doesn't my embedded report code do anything?

The Report.run method runs the report in a new, separate thread. The Report.runReport method runs the report in the same thread from which it is called. (All run does is create a new thread and tell it to run runReport.) If you have written code like this:

public static void main(String[] args) {
    Report report = new Report();
    // ...
    report.run();           // WRONG; new thread can't run

then the report will quit immediately because you have not waited for the newly spawned thread to finish running the report. If you want to wait for the report to finish, use runReport like this:

public static void main(String[] args) {
    Report report = new Report();
    // ...
    report.runReport();     // CORRECT; waits until finished

3.6 Why does DataVision hang when I try to use the Table Linker dialog?

In older versions of DataVision (before 0.7.10), the Table Linker, Sort By, and Group By dialogs had to retrieve the list of all database tables and columns. If you have a large database, this can take a long, long time.

DataVision was changed to avoid having to ask for all tables and columns. Instead, in these dialogs it only displays the columns from tables actually used in the report. If a table doesn't appear in one of those dialogs, it's probably because that table is not yet used elsewhere in the report.

Advice for versions older than 0.7.10: As a workaround, you can create a separate database schema (in the same physical instance) that contains aliases to only the tables from the original schema that you need in your report. That way, DataVision will only have to read the tables in the new, smaller schema.

3.7 Why won't it stop asking for a password?

If DataVision keeps asking you for your password over and over again, that is because it was not able to connect to the database sucessfully. Your password could be correct but the connection info string could be wrong.

Hitting "Cancel" will stop the insanity. If no other reports are already open, DataVision will quit.

The way this works will change in the future: you will be shown the error messages and will be able to open the database connection info dialog from the login dialog.

3.8 Why don't I see borders?

Not all layout engines implement borders or line output.For a table of layout engines and their implemented features, see Supported Features.

3.9 Why is DataVision trying to connect to the X DISPLAY?

Some of the layout engines such as Swing and PDF use Java Font objects. In order to answer some questions about fonts (for example, what is this font's descent), the code needs a FontMetrics object. To get a FontMetrics object, you need a graphics context, which DataVision gets by creating an AWT Panel object. That's probably what is trying to connect to the display.

3.10 What do ClassNotFoundException and "no suitable driver found" mean?

You will see error messages on the command line when you try to run DataVision with an incorrect class path. For example, if you see an exception error message like

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

with your driver class name instead of oracle.jdbc.driver.OracleDriver, that means that you have not added your JDBC driver jar file to your class path. Please read the Datavision User's Manual, especially Setting the Java Class Path.

If you see the message "no suitable driver found", then most likely the class path is correct but your connection info string is incorrect. See your JDBC driver's documentation for the correct format of the connection info string.

3.11 Font error messages

On Mac OS X systems running Java 1.4.1, when DataVision opens the designer window you may see error messages like this (long lines are wrapped here):

2003-07-08 22:14:47.805 java[12191] Font GB18030Bitmap:
    in _readBasicMetricsForSize, claims 0 max advance but is
2003-07-08 22:14:47.913 java[12191] Warning: Font
    LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!

These error messages seem to be harmless.

On some Linux systems (for example, Red Hat 7.x), when you start DataVision a whole slew of identical error messages are generated that look something like this:

Font specified in font.properties not found

These error messages are harmless. There is at least one way to get rid of them: edit the file $JAVA_HOME/jre/lib/font.properties and replace all occurrences of "-adobe-" with "-urw". Note that you may need the proper privileges to edit this file.

Tom Van Overbeke (tom.van.overbeke@pandora.be) describes another way to get rid of the messages: "I checked all the fonts.dir available on my system, there were a dozen of them. then I grepped through all of them to check for "standard symbols l", and i found the entry in the file /usr/share/fonts/default/Type1/fonts.dir. The entry was:

s050000l.pfb -URW-Standard Symbols

"and I changed it to:

s050000l.pfb -URW-Standard Symbols

"Then I quit X, stopped and restarted xfs and restarted X, and it worked."

<= Previous | Next => | Table of Contents Valid XHTML 1.0! Valid CSS! DataVision FAQ