Jump to content

iReport as an applet


ktrinad

Recommended Posts

By: Jeffrey S. Hair - jshair

iReport as an applet

2003-12-15 12:48

I need to provide the ability for users to modify the layout of reports from a web application.

 

So, can iReport be loaded as an applet? Or is there another tool that can be loaded as an applet to provide editing capabilities?

 

Thanx,

jsh

 

 

 

 

By: Zihong Lu - zihong

RE: iReport as an applet

2003-12-17 14:44

I ran into the same situation. My current approach is to use Java Web Start (JAWS), instead of the applet. JAWS will allow users download once and start it from their local machine.

 

I assume your next question would be: can iReport be loaded and run in JAWS. The answer is yes it will run to a certain degree, not automatically.

 

 

 

 

By: Jeffrey S. Hair - jshair

RE: iReport as an applet

2003-12-22 14:46

Nice idea. I know of JAWS but I have not had the chance/opportunity to work with it as of yet.

 

To what 'certain degree' does it run? Is there some iReport functionality that does not work? Or are you saying that there's some configuring that is required for it to run via JAWS?

 

Thanx for giving me a direction in which to investigate and possibly proceed.

 

Thanx,

jsh

 

 

 

 

By: Zihong Lu - zihong

RE: iReport as an applet

2003-12-27 09:22

For some reason the jasperreports does not use the same system environment settings as ireport uses, thus, you can start ireport inside the JAWS, but the jasperreports will not work as expected, you cannot compile templates. To solve the problem, you have to make the jasperreports work inside JAWS.

 

Assuming you have put the correct jar files in the JAWS, then, the key to make jasperreports work is to assign correct system environment path java.class.path in the ireport source code, IReportCompiler.java. There is another problem: you need tools.jar for jasperreports. The file tools.jar is about 5 MB, too big for downloading in a unreliable network. To solve both problems, I took a different approach, replace the line:

 

JasperCompileManager.compileReportToFile(srcFileName, fileName);

 

with

 

JasperDesign jasperDesign =

JasperManager.loadXmlDesign(srcFileName);

dori.jasper.engine.design.JRBshCompiler theCompiler=

new dori.jasper.engine.design.JRBshCompiler();

JasperReport result =

theCompiler.compileReport(jasperDesign);

JRSaver.saveObject(result, fileName);

 

Ie, use Bean Shell compiler, instead of java compiler. This way, I don't need to set the system path specially. With this change, you can compile the templates. No big file to download. However, you still cannot preview the filled reports. I have not got a chance to fix this part.

 

 

-Zihong

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...