• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JasperReports with GWT

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,

I try to allow a GWT user to generate dynamically a PDF File using some data and a .jasper file. I tried to do this on my
servlet, and then let the user download the generated PDF, but my servlet isn't allowed to load and save files. So I
decided to generate the PDF at client side.

Now I've got the problem to get the Jasper file to the client. Should the client download it and then work with it and if
yes how could I do this?

Or is there a possibility to get a binary file to the client from scratch?

Thanks in advance Jimmy
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I would also like to know its answer ,although I have used jasper report in spring I have not done using GWT
 
Timmy Blue
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi abani,

I found a solution to get the PDF as byte stream to the client. I defined a webservice which returned
a byte array that represents the PDF. You can do this by calling



By this means I was indeed able to get the PDF as stream, but found no way to display this out of GWT.
(Be sure to get the jasper-File in the root of your classes-Folder!!! So you can load it)

I found a ploy to save data on the file system of your server. Create manually a file on the server
in your classes-folder. Now you can load it in the servlet using new File() and change its content.
You are however only able to save a limited amount of files.

After doing so you can load the pdf by calling a servlet in GWT with Window.open(...).
This Servlet has to read the file and return it as type "application/pdf".

I'm sorry that I found no easier solution.

Bye Jimmy
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm new to the boards, as well as GWT. I'm planning to build a Java EE application using EJB and Web Services with a GWT front end. My application needs to build reports from a data source, and was wondering if there are any report builders that work hand in hand with GWT. I see you have gone into it in detail, but I just need to know if this is possible before deciding to start learning GWT.

I looked at it briefly and had difficulty going from one page to another, basically needing to crowd all my controls on the default GWT home page, if I may. So that is where I am at with regards to GWT.

So kindly let me know if this is possible before I start learning GWT as I have a short deadline to meet. If there are some frameworks such as smartGWT that can handle this, please let me know as well. Surprisingly, I have had much luck searching for information on Google.

Best regards.
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Timmy,
Can you show the webservice detail code.
 
Alex Pato
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At the moment, no. In fact, I have just decided on what operating system I should use for my server. It may take time, but I wanted to know whether it was possible to develop reports, generated from a data source, that is triggered using a GWT application. Otherwise, I may just end up using Swing.

One more thing I wanted to ask ... and as I have very little to no experience with GWT, please bare with me. Regarding the performance of a production system, in comparison to a server that would just supply data via web services to swing applications on various user computers, how would you rate GWT? I know there will be more load on the server. The one I'm working on has a Pentium Dual Core E5800 processor with 4GB of RAM, which should be serving say a maximum of 40-50 users at a time. Which would you recommend from a performance perspective?

Best Regards.
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic