Link to home
Start Free TrialLog in
Avatar of Shaun Wingrin
Shaun WingrinFlag for South Africa

asked on

Crystal Reports Equivalent for Linux(Redhat/Ubuntu) needed.

Any ideas?
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Avatar of Mike McCracken
Mike McCracken

Your Crystal link is for Crystal Reports Server which is not the same as Crystal Reports.  As far as I know it doesn't install a report creation capability.

mlmcc
Avatar of Shaun Wingrin

ASKER

This link: http://freshmeat.net/search/?q=crystal+report§ion=projects&Go.x=0&Go.y=0
Only has tools that have not had updates in years...
I've been using JasperReports. It's made in Java, so is Linux compatible. There are many tools (free and not free, open and not open) that you can use with jasper reports, for instance iReports.
Sounds G8. I tried downloading the free ones  -but can't seem to find the link - simply get an option for a trial of the entire pack. Can you send me links to the free ones please?
ASKER CERTIFIED SOLUTION
Avatar of ombli
ombli
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Tx. I've downloaded iReports. How do I isntall it it in Gnome?
iReport team is not packaging for any concrete Desktop Manager or Linux Distribution, so just uncompress it and run it (the executables are in the "bin" folder). No installation is needed

If you develop with NetBeans, it can be added as a plugin to it.
Help. Can't run it....

[root@localhost bin]# ls
document.ico  ireport  ireport.exe  ireport_w.exe
[root@localhost bin]# ./ireport.exe
-bash: ./ireport.exe: cannot execute binary file
[root@localhost bin]# ./ireport_w.exe
-bash: ./ireport_w.exe: cannot execute binary file
[root@localhost bin]#
What version of Java is needed?
j2re-1.4.2-11.0.rh9.rf.i586.rpm  ?
Ey, don't run windows executables :). Try in bin directory: ./ireport (without .exe).
Regarding Java version, I don't know about the last version of iReport, but maybe you need version 1.5 or higher.

There are nice tutorials for the first executions here:
http://jasperforge.org//website/ireportwebsite/IR%20Website/ir_documentation.html?header=project&target=ireport
Tx.
Can you tell me what java complents I would need -the full sdk?
Can I install with yum?
It's required 1.5 at least. Which version of RedHat are you using?
CentOS 5.4
Try with yum: sun-jre-1.6.0-03.i386.rpm

If it is not found, try direclty from Java:
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jre-6u17-oth-JPR@CDS-CDS_Developer

(you don't need to register)

and then to install (change Xs by the version of your file)

chmod a+x jre-6XXX-linux-i586-rpm.bin
./jre-6XXX-linux-i586-rpm.bin
I ran yum install jre

Installing     : java-1.6.0-openjdk                                                                                                                     1/1

Installed:
  java-1.6.0-openjdk.i386 1:1.6.0.0-1.7.b09.el5

But It still won't run...?
Run this commands from a new terminal and tell me the output:

'whereis java'

and

'echo $PATH'

[root@localhost src]# whereis java
java: /bin/java /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz
[root@localhost src]#


[root@localhost src]# echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/NX/bin:/etc/asterisk/:/root/bin
[root@localhost src]#
Try this first:

Moreover: in the bin directory of iReport, type: 'chmod 755 *'

and launch iReport again by typing './ireport'

If still doen't work, give me the output of 'java -version'
[root@localhost bin]# java -version
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
[root@localhost bin]#

Sorry, its being giving this error all along, but I only figured out how to paste it now for you.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.<clinit>(Unknown Source)
        at java.awt.Component.<clinit>(Unknown Source)
        at org.netbeans.Main.main(Main.java:65)
[root@localhost bin]#
I would like to install jave with yum as I believe its easier to keep it up to date then....
Well, it seems to be a problem with the java version. You've got already installed JRE 1.4.2_06 and this is too old for the tool.

On the other side, you installed the "open" version of the Jave Development Kit (which includes too a JRE (Java  Run Environment)). However, your path is still pointing to the old version.

The new version of the Java executable you've installed is probably in /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/ or similar (maybe just changing some number of the version).

Try executing this (adjust version numbers if needed)

JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH
./ireport




Tx, but still getting an error below. It looks like correct jave being used:
[root@localhost keys]# java -version
java version "1.6.0"
OpenJDK  Runtime Environment (build 1.6.0-b09)
OpenJDK Server VM (build 1.6.0-b09, mixed mode)
[root@localhost keys]# whereis java
java: /bin/java /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz
[root@localhost keys]# which java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
__________________
ERROR:
[root@localhost bin]# ./ireport
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.<clinit>(Unknown Source)
        at java.awt.Component.<clinit>(Unknown Source)
        at org.netbeans.Main.main(Main.java:65)
Are you in a 32 or 64 bits system?
32Bit.
[root@localhost bin]# cat /proc/version
Linux version 2.6.18-164.10.1.el5 (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Jan 7 20:00:41 EST 2010
[root@localhost bin]# uname -a
Linux localhost 2.6.18-164.10.1.el5 #1 SMP Thu Jan 7 20:00:41 EST 2010 i686 i686 i386 GNU/Linux
A quick search in Google gives me this:

Try to install with yum: libXp-X.X.X-X.i386.rpm (you can determine the exact version with 'yum whatprovides /usr/lib/libXp.so.6')

Tx. Still not.Error below: Installed:
[root@localhost src]# rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:libXp                  ########################################### [100%]

[root@localhost bin]# yum whatprovides /usr/lib/libXp.so.6
Importing additional filelist information
addons/filelists                                                                                                                       |  194 B     00:00
base/filelists_db                                                                                                                      | 3.3 MB     00:24
extras/filelists                                                                                                                       | 151 kB     00:01
extras                                                                                                                                                325/325
rpmforge/filelists                                                                                                                     | 3.4 MB     00:48
rpmforge                                                                                                                                          10995/10995
updates/filelists_db                                                                                                                   | 1.9 MB     00:13
libXp-1.0.0-8.1.el5.i386 : X.Org X11 libXp runtime library
Repo        : base
Matched from:
Filename    : /usr/lib/libXp.so.6




[root@localhost src]# cd /etc/iReport-3.7.0/bin
[root@localhost bin]# ./ireport
./../platform9/lib/nbexec: WARNING: environment variable DISPLAY is not set
Exception in thread "main" java.lang.NoClassDefFoundError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
        at sun.awt.motif.MToolkit.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at java.awt.Toolkit$2.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Unknown Source)
        at javax.swing.ImageIcon.<init>(Unknown Source)
        at javax.swing.LookAndFeel$1.createValue(Unknown Source)
        at javax.swing.UIDefaults.getFromHashtable(Unknown Source)
        at javax.swing.UIDefaults.get(Unknown Source)
        at javax.swing.MultiUIDefaults.get(Unknown Source)
        at javax.swing.UIDefaults.getIcon(Unknown Source)
        at javax.swing.UIManager.getIcon(Unknown Source)
        at javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(Unknown Source)
        at javax.swing.plaf.basic.BasicOptionPaneUI.getIcon(Unknown Source)
        at javax.swing.plaf.basic.BasicOptionPaneUI.createMessageArea(Unknown Source)
        at javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(Unknown Source)
        at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(Unknown Source)
        at javax.swing.JComponent.setUI(Unknown Source)
        at javax.swing.JOptionPane.setUI(Unknown Source)
        at javax.swing.JOptionPane.updateUI(Unknown Source)
        at javax.swing.JOptionPane.<init>(Unknown Source)
        at javax.swing.JOptionPane.showOptionDialog(Unknown Source)
        at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
        at javax.swing.JOptionPane.showMessageDialog(Unknown Source)
        at org.netbeans.Main.main(Main.java:65)
[root@localhost bin]#
OMG!

It shouldn't be so difficult ;)

Try: 'export DISPLAY=:0.0'

I tried this:[root@localhost bin]# java -classpath . ireport
 and this is the error:
Exception in thread "main" java.lang.NoClassDefFoundError: ireport
Caused by: java.lang.ClassNotFoundException: ireport
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)


This link seems to solve the problem for Ubuntu, but how do I load this for CentOS?
http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=4180
You can't launch the application like that, so the last error is totally normal. I'm focused in the previous one. However, I can't open your link about Ubuntu
Its as you say a version issue. When I run it sais v4! How can I get to this version jre-1.6.0-openjdk, below?
[root@localhost src]# cd /usr/lib/jvm
[root@localhost jvm]# ls
java        java-1.4.2-gcj          java-1.6.0-openjdk-1.6.0.0  jre        jre-1.4.2-gcj  jre-1.6.0-openjdk  jre-openjdk
java-1.4.2  java-1.4.2-gcj-1.4.2.0  java-gcj                    jre-1.4.2  jre-1.6.0      jre-gcj
[root@localhost jvm]#

[root@localhost bin]# echo $PATH
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/NX/bin:/etc/asterisk/:/root/bin


[root@localhost src]# rpm -ivh jre-6u17-linux-i586.rpm
Preparing...                ########################################### [100%]
        package jre-1.6.0_17-fcs.i586 is already installed
[root@localhost src]# locate jre-1.6.0_17-fcs.
[root@localhost src]# locate jre-1.6.0_17-fcs
[root@localhost src]# which java
/usr/bin/java
[root@localhost src]# java -version
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
[root@localhost src]# ls
a2billing                            asterix                                                    linux-2.4
A2Billing_1.3.2.tar.gz               iperf-2.0.4                                                mc-4.6.0-2.i386.rpm
apcupsd-3.14.3-1.el5.rf.i386.rpm     iperf-2.0.4.tar.gz                                         redhat
apt-0.5.15cnc6-3.0.rh8.dag.i386.rpm  jre-6u17-linux-i586.rpm                                    rpmforge-release-0.3.6-1.rh9.rf.i386.rpm
astbill-0.9.22.tar.bz2               jre-6u17-linux-i586-rpm.bin                                tcptrack-1.1.5-1.1.el3.rf.i386.rpm
asterisk-1.4.21.2                    kernel-module-ibmasm-2.02-0_2.4.20_30.9.rh90.dag.i686.rpm  tcptrack-1.1.5-1.2.rh9.rf.i386.rpm
asterisk-1.4-current.tar.gz          kernels                                                    VirtualBox-3.1-3.1.2_56127_rhel5-1.i386.rpm
asterisk-addons-1.4.1                libpcap-0.9.6                                              zaptel-1.4.11
asterisk-addons-1.4.1.tar.gz         libpcap-0.9.6.tar                                          zaptel-1.4-current.tar.gz
asterisk-gui                         libXp-1.0.0-8.1.el5.i386.rpm
[root@localhost src]# yum update jre
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: www.ftp.saix.net
 * base: www.ftp.saix.net
 * extras: www.ftp.saix.net
 * rpmforge: apt.sw.be
 * updates: www.ftp.saix.net
Setting up Update Process
Error: No Package Matching jre
[root@localhost src]# yum install jre
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: www.ftp.saix.net
 * base: www.ftp.saix.net
 * extras: www.ftp.saix.net
 * rpmforge: apt.sw.be
 * updates: www.ftp.saix.net
Setting up Install Process
Package 1:java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5.i386 already installed and latest version
Nothing to do
[root@localhost src]#
BTW, I launched the windows version in the mean time:
1. How can I format a date field to display the date in format e.g. Nov 09 ?
2. If I compile the report will it run on the CentOS machine?

Tx Shaun
Please ignore above as this is the current status:
[root@localhost bin]# which java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
However, It still is using Java 4 ?!
I think there are too many versions of java installed in your computer and that's becoming us crazy.

If you don't have any previous dependency for any other project, I would remove jre 1.4 and openJdk 1.6 and will try to install ONLY jre1.6 (not the open version, just the Sun official one that you can get from their webpage in RPM format).

Then I will restart and try again.
Ok. I've done an extensive search and can't find info on how to reove the old version...please help.
I solved it. yum erase jre
Its working! Thanks!
Now that I've made a report and can preview it, how do I run it outside of iReports e.g. from a webpage or else a command line?
Can you please explain the command:
export DISPLAY=:0.0