JasperReport viewer will not open

I have created some reports in iReport 3.7.1. I have a folder for the .jrxml files and an other one for the compiled .jasper files and set the correct direction path in the plugin settings (for developer: http://localhost:8080/servoy-admin). The Preview in iReport is working well, but my simple functions in Servoy will not work. I made a global- and a formfunction:

function gm_generateReport(reportFileName,outputFormat,vParms) {
	// TODO Auto-generated method stub
	var vServerName = currentcontroller.getServerName();
	try {
		application.updateUI();
		plugins.jasperPluginRMI.runReport(vServerName,reportFileName ,null,outputFormat,vParms);
	}
	catch(jasperPluginException){
		msg = "ERROR: Exception from Plugin: ";
		if(jasperPluginException == undefined){
			msg += "exception is undefined";
		}
		else if(jasperPluginException.message == undefined){
			msg += "exception message is undefined";
		}
		else {
			msg += "message: <" + jasperPluginException.message + ">";
		}
		application.output(msg);
	}
}
function m_btn_report(event) {
	// TODO Auto-generated method stub
	var reportFileName = "88_order_diagnose.jasper";
	var outputFormat = "viewer";
	var vParms = new java.util.HashMap();
	vParms.put("order_id", forms.orders_diagnosis_tab.uid_order);
	vParms.put("SUBREPORT_DIR",plugins.jasperPluginRMI.reportDirectory);
	globals.gm_generateReport(reportFileName,outputFormat,vParms);
}

The Viewer will not open for solutions on Mac OS X 10.6.2 and/or Win 7 pro and I get no error message in the Debug-Console.

Servoy 5.1
Sybase 11
Newest Plugin and servoy_jasperreports.jar.jnlp-settings

Do anybody have an idea?

Is the compiled jasper report directory the same as the report directory passed as a parameter? (You said they were in different directories).

I have modified my solution by storing the reports in only one direction (“/Reports” on Mac). In the globale function I added some “application.output” for controlling the event parameter like:

application.output("Server-Name: " + vServerName);
application.output("Plugin-Vers.: " + plugins.jasperPluginRMI.pluginVersion);
application.output("Report-Dir: " + plugins.jasperPluginRMI.reportDirectory);
application.output("Report-Name: " + reportFileName);
application.output("Output: " + outputFormat);

The result is:

Server-Name: customer_db
Plugin-Vers.: 3.0.1a1
Report-Dir: /Reports
Report-Name: 88_order_diagnose.jasper
Output: view

Does all is looking correct? The viewer is still not opening the report.

The plugin version in your printout is 3.0.1.a1 - try using the previous (i.e. 3.0.0 not an alpha 1).

The next idea is to ask if these reports work on another client OS such as win xp? I suspect not.

You are using iReport 3.7.1 but the servoy jasper reports plugin is designed for 3.6.0

You might have an issue with the libraries required are not found.

To use a later version of jasper reports with the plugin you have to ensure that the jnlp file finds those updated jar files and downloads them to the client.

Take a look at the google code (Google Code Archive - Long-term storage for Google Code Project Hosting.)for some advice.

Also take a look at the install file that comes with the plugin on how to update the jar file.

Lastly, my web page might also help: http://www.prospect-saas.biz/jasper_upgrade.html

Thank you Thomas for your excellent information, but the report still won’t open in the viewer or print.
I have deinstalled iReport 3.7.1 and installed the previous version 3.6.2. Than I have installed the basic_servoy_jasperreports_plugin_v3.0.0 into the servoy 5.1/application_server/plugins direction. After that I made all neccessary updates and modifications as discriped on your jasper_upgrade site.
Last but not least does I have created a new report in iReport 3.6.2, modified the function code, checked the direction path… without success.
The whole issue is verry frustrating. I try to get it work since three days… I hate JasperReport… and I hate the servoy_jasperreports plugin.

Sorry to hear about your frustration, this should be straight forward.
I can always try your report on my system if it possible (win xp not mac).
I deal with this plugin every day and occasionally I have issues.

I assume that it is not working from the client side? Does it work on the developer?

On the client side you could add some code to check if the report is able to be found on the server using the directories you get from the plugin for the report (you have specified the report directory in the Admin pages I assume?)

If the report cannot be found that would indicated some issue.

Cheers,
Tom

The jasperreport_plugin does not work on client and developer side on my mac and also not on my windows 7 environment.
Today I made a complete clean install on win 7/32 bit of iReport 3.6.2 and Servoy 5.1. Next I copied the

  • servoy_jasperreports folder
  • servoy_jasperreports.jar
  • servoy_jasperreports.jar.jnlp
    into the <Servoy/application_server/plugins> direction. Next I replaced the jar file
  • jasperreports-3.6.0.jar to jasperreports-3.6.2.jar from ireport/modules/ext
    Than I edited the servoy_jasperreports.jar.jnlp file.
    In Servoy/application_server/plugins/pdf_output direction I replaced the jar file
  • itext.jar to iText-2.1.0.jar
    The other jar files versions identical in the ireport and servoy direction.
    In the servoy-admin Plugin Settings I set the jasperPluginRMI directory.jasper.report: C:\Reports (the direction to my .jrxml + .jasper reports).
    Next I have created a new report in iReport 3.6.2 (the reports from 3.7.1 are also working, but i thought it’s better to make a new one). The report is working perfect in iReport 3.6.2 Preview… but nothing by executing my function in Servoy without any error message.

I could manage it to run on my MacBook and Mac OS X with iReport 3.7.1! I made exactly the installation/configuration steps as described in the previous topic.
Now I will try it once more on the Windows 7 side…

… two hours later: no success. Could it be a specific Windows 7 problem?

Next I will try it on Win XP, but this takes time (no installation).

Hello ,

At my Windows 7 PC the Jasper viewer is also not visible in the task bar but when I move the mouse over the (Servoy) application icon in the task bar I see the Jasper viewer in the little window above the icon. And that window I can select with the mouse.

This behaviour is for me not an improvement. I would like the Jasper viewer to be maximized at start up or client adjustable / persistent.

Regards,

Hi Lambert,
could you please post what kind of iReport version you have running on your win 7 PC and how is your servoy_jasperreport_plugin configuration (the .jar files in the plugin folder)?

Now I made a new Win XP pro SP3, Java 1.6_17, iReport 3.6.2 and Servoy 5.1 installation on a PC, but no Jasper viewer and no print dialog!

Hi Thomas,

Jasper-xml created with I-report 3.6.0

application_server\plugins\servoy_jasperreports\ :

commons-beanutils-1.8.0.jar
commons-digester-1.7.jar
commons-logging-1.0.4.jar
iText-2.1.0.jar
jasperreports-3.6.0.jar
jdt-compiler-3.1.1.jar
poi-3.2-FINAL-20081019.jar

jasper-file created through servoy plugin.

servoy_jasperreports.jar.jnlp :

<?xml version="1.0;" encoding="UTF-8;" ?> Servoy Client Plugins Servoy and Others

Regards,

Hi Lambert,
I guess you are using the servoy_jasperreport_plugin version 3.0.0, or? Do you have tried a newer version of iReport? E.g.:

  • iReport 3.6.2 or 3.7.x
  • commons-beanutils-1.8.2.jar
  • jasperreports-3.6.2.jar or jasperreports-3.7.1.jar

Any experiances with that?

Hi Thomas,

Yes, we’re working with 3.0.0. No experience with newer stuff.

Since some time our policy is to wait some time for upgrading plugins.

We can’t afford the loss of developer time in bug/jar dependencies investigation due to the upgrade…

Good luck,

lwjwillemsen:
We can’t afford the loss of developer time in bug/jar dependencies investigation due to the upgrade…

I agree with you. I started brand new with JasperReports and I couldn’t read anything that I should take an old version of iReport and the Plugin files… but they also won’t work.
For me it’s a nightmare…

Thomas,
you have the report showing in the viewer on the MAC? That is good - it means that there may have been a typo in the jnlp settings perhaps?

For the Windows 7 problem - Lambert’s experience seems to be a clue that the viewer is actually there (that is why there is no errors) so perhaps you could search for the window in Win 7 and try to open. This would confirm that the viewer window is being hidden somehow.

Thomas Parry:
you have the report showing in the viewer on the MAC? That is good - it means that there may have been a typo in the jnlp settings perhaps?

The viewer comes only by starting the client from developer. I have a mac server with the identical settings there, but no viewer on the mac client while starting from the mac app server!
Why is that working in developer on my MacBook, but not on the Mac Server and Win 7/Win XP PC?

<?xml version="1.0;" encoding="UTF-8;" ?>
<jnlp spec="1.0+" codebase="%%serverURL%%" href="/servoy-client/plugins/servoy_jasperreports.jar.jnlp">
	<information>
		<title>Servoy Client Plugins</title>
		<vendor>Servoy and Others</vendor>
	</information>
	<resources> 
		<jar href="/plugins/servoy_jasperreports.jar" download="eager"/>
		<jar href="/lib/commons-collections.jar" download="lazy" part="commons-collections" version="%%version%%"/>
			<package name="org.apache.commons.collections.*" part="commons-collections" recursive="true"/>
		<jar href="/lib/commons-logging.jar" download="lazy" part="commons-logging" version="%%version%%"/>
			<package name="org.apache.commons.logging.*" part="commons-logging" recursive="true"/>
		<jar href="/plugins/servoy_jasperreports/jasperreports-3.7.1.jar" download="eager"/>
		<jar href="/plugins/servoy_jasperreports/commons-beanutils-1.8.2.jar" download="lazy" part="commons-beanutils" version="1.8.2"/> 
			<package name="org.apache.commons.beanutils.*" part="commons-beanutils" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/commons-digester-1.7.jar" download="lazy" part="commons-digester" version="1.7"/> 
			<package name="org.apache.commons.digester.*" part="commons-digester" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/groovy-all-1.5.5.jar" download="lazy" part="groovy" version="1.5.5"/> 
			<package name="org.codehaus.groovy.*" part="groovy" recursive="true"/> 
			<package name="groovy.*" part="groovy" recursive="true"/> 
			<package name="groovyjarjarantlr.*" part="groovy" recursive="true"/> 
			<package name="groovyjarjarasm.asm.*" part="groovy" recursive="true"/> 
			<package name="groovyjarjarcommonscli.*" part="groovy" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/iText-2.1.0.jar" download="lazy" part="itext" version="2.1.0"/> 
			<package name="com.lowagie.*" part="itext" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/jcommon-1.0.15.jar" download="lazy" part="jcommon" version="1.0.15"/> 
			<package name="com.keypoint.*" part="jcommon" recursive="true"/> 
			<package name="org.jfree.*" part="jcommon" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/jdt-compiler-3.1.1.jar" download="lazy" part="jdt-compiler" version="3.1.1"/> 
			<package name="org.eclipse.jdt.*" part="jdt-compiler" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/jfreechart-1.0.12.jar" download="lazy" part="jfreechart" version="1.0.12"/> 
			<package name="org.free.*" part="jfreechart" recursive="true"/> 
		<jar href="/plugins/servoy_jasperreports/poi-3.2-FINAL-20081019.jar" download="lazy" part="poi" version="3.2"/> 
			<package name="org.apache.poi.*" part="poi" recursive="true"/> 
	</resources> 
	<component-desc></component-desc> 
</jnlp>

IS your report using Groovy as the language or Java?
Just an idea: switching to java may be a solution if the Groovy language is not some how supported on the server or on win 7?

Have you tried to access the report file that is on the server when running the client? Perhaps the file is not reachable ?
The plugin has a method that will return all the report files on the server. Get that and dump to the console. If empty that means the report directory is not correct on the server (or you have no permission).

Good news Tom! I got the JasperViewer working on Mac and Win 7 in developer mode. Don’t ask me what the key for solving the issue was. I made a lot of changes e.g. back to iReport 3.7.1, the appropriate plugin jar files and jnlp settings, new Reports directory and so on. Anyway, it’s working and I’m happy for that.

Thomas Parry:
IS your report using Groovy as the language or Java?
Just an idea: switching to java may be a solution if the Groovy language is not some how supported on the server or on win 7?

I’m on java in iReport. I will leave the groovy jar file in the plugin folder because with that it is working. No more experiments.

Thomas Parry:
Have you tried to access the report file that is on the server when running the client? Perhaps the file is not reachable ?
The plugin has a method that will return all the report files on the server. Get that and dump to the console. If empty that means the report directory is not correct on the server (or you have no permission).

I will configure the App. server on weekend and try to run the jasper plugin also there.

Many thanks for your help!

I have now configured my Mac Server as a Servoy App Server. I took the well working servoy_jasperreports plugin files and folder from my MacBook in to the /Servoy/application_server/plugins direction on the Server (and of course made a restart). For having an info what the function is doing I get a dialog about my application.output() settings (server_name, report_filename, reports_directory, errors, …).
In the smart client the dialog always displays the plugin-vers. 3.0.1a1 while executing the function, but on the Server is definitely installed the 3.0.0 vers. from 10/30/2009! The alpha-plugin is created at 02/23/2010.
Very curious, or?

The JasperViewer is now working on the Servoy App. Server! The key to get it run was the plugin error dialog I was made, because there was only small things to fix, like wrong direction path, missing a subreport file and so on. It would be very helpfull for a JasperReport beginner to have a manual from Servoy about those basic issues.
I’m still have a different return of the plugin version I have installed, but it works.