Running DataVision
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.
Can I run DataVision from JSP?
Yes. See Running DataVision
from JSP in the User's Manual.
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.)
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.)
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
}
Why does DataVision hang when I try to use the Table Linker dialog?
That's because the join dialog has 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
except in a few places. That's one of the places. I hope to be able to
redesign DataVision to avoid this (for example, only ask for table names
first then only get column names one table at a time).
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.
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.
Why don't I see borders?
Only the LaTeX layout engine implements border and line output. For a table
of layout engines and their implemented features, see Supported Features.
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.
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
fixed-pitch.
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
[--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
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
L-medium-r-normal--0-0-0-0-p-0-urw-fontspecific
``and I changed it to:
s050000l.pfb -URW-Standard Symbols
L-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
``Then I quit X, stopped and restarted xfs and restarted X, and it
worked.''