Jump to content

Jasper Viewer questions


assaf.frank

Recommended Posts

Hi,

 

I have several questions and will be glad if some/all can be answerd :

 

1. Is the Jasper Viewer only Swing based or is there an DHTML/Javascript viewer that can be incorperated into a J2EE application based on JSP/Struts ?

2. Can a viewer component of Jasper be incorporated into our application so we can achieve a single installation for application + report viewer ?

3. Does this viewer include the export capabilities (Word,PDF,Excel) ?

 

4. Non DB Datasources – I would like to base the reports on a non DB dataSource – would like my java classes to fetch the data and see some Java object in the HTTP Session (or pass to report in any other way) -> this object should be the basis for the report. Is this possible ?

 

5. RTL (right to left) direction – are there any open issues regarding rtl support (does the export formats support the rtl direction as well).

 

6. Can I use the open source edition for the above or do I need to purchase a professional edition? (how to I get the Jasper Studio for building the reports?)

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

see answers inline:

 

1. Is the Jasper Viewer only Swing based or is there an DHTML/Javascript viewer that can be incorperated into a J2EE application based on JSP/Struts ?

 

The viewer (JasperViewer) is a subclass of a JFrame and thus Swing based (see http://jasperreports.sourceforge.net/api/net/sf/jasperreports/view/JasperViewer.html). As such you cannot use it to preview it in a J2EE application. You should either make it an applet (I think it is in one of the examples) or you probably need to export it to pdf, so it can be previewed in your explorer.

 

2. Can a viewer component of Jasper be incorporated into our application so we can achieve a single installation for application + report viewer ?

 

yes, very easily. As mentioned the viewer is a JFrame which you can open in your application. Even better, you can use the JRViewer, which is a subclass of JPanel, to nicely embed a viewer into your application (htmlhttp://jasperreports.sourceforge.net/api/net/sf/jasperreports/view/JRViewer.html).

 

3. Does this viewer include the export capabilities (Word,PDF,Excel) ?

 

I think the viewer is for previewing only. It is very easy to export a report in the format pdf, excel, xml, rtf (see Faq and examples). Again, since the viewer is a panel it is easy to integrate the export to whatever in the viewer.

 

4. Non DB Datasources – I would like to base the reports on a non DB dataSource – would like my java classes to fetch the data and see some Java object in the HTTP Session (or pass to report in any other way) -> this object should be the basis for the report. Is this possible ?

 

yes, I think that is one of the strengths of jasperreports. You can create your own datasource as a java class an print whatever you want to print. In our application we even build up the report at runtime using the classes of JasperReports (instead of the xml layout). Note, to visually create a report design, use IReports.

 

5. RTL (right to left) direction – are there any open issues regarding rtl support (does the export formats support the rtl direction as well).

 

Don't know about this one. I suppose it uses the same techniques as java does.

 

6. Can I use the open source edition for the above or do I need to purchase a professional edition? (how to I get the Jasper Studio for building the reports?)

 

Yes the open source edition provides all the required capabilities. Someone from the Jaspersoft team can probably better elaborate on the professional edition.

 

kind regards,

Christiaan

Link to comment
Share on other sites

Thanks Christiaan ,

 

The first point you wrote is quite problematic.. You are saying that anyone who wishes to run reports must have java installed on their computer.. this is a problem when selling software as a service (Saas).

 

Are you certain about this point ? (I'v been told there is an AJAX viewer)

 

Thanks

Link to comment
Share on other sites

Hi Assaf,

 

"You are saying that anyone who wishes to run reports must have java installed on their computer"

 

Did I? I was just talking about the viewer you were talking about. As mentioned, in order to preview a report in the webbrowser you will probably need to export your report to pdf or html (which can be done without the viewer executed on the server) so it can be displayed in the browser. Anyway, Jasperreports is certainly used in J2EE applications. I am just not one of them, so may be someone else should respond on how they handle previewing a report. I am not aware of any Ajax viewer though.

 

kind regards,

Christiaan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...