HI,
I know what is the problem
If you have a subreport in a main report, when you call from Servoy, it seeks the subreport in the original path.
Why it´s works on developer.
You can probe to create the same path in your client and put the report and subreport inside, then works fine.
I think there is a problem with the plugin, should read the path form server not the original path
Bye.
JuanMartin:
HI,
I know what is the problem
If you have a subreport in a main report, when you call from Servoy, it seeks the subreport in the original path.
Why it´s works on developer.
You can probe to create the same path in your client and put the report and subreport inside, then works fine.
I think there is a problem with the plugin, should read the path form server not the original path
hi, Juan Martin
Not exactly: I have a dozen of reports with subreports in my production environment. The problem is related to using subreport with Servoy foundsets.
In all other cases it works fine (of course you need to set the subreport_dir to “./”).
In the case of Servoy foundset based reports it doesn’t work, even if I set the path hardcoded (the only way, obviously not applicable, is to replicate the path, including the reports, in the client machine.
Not exactly: I have a dozen of reports with subreports in my production environment. The problem is related to using subreport with Servoy foundsets.
In all other cases it works fine (of course you need to set the subreport_dir to “./”).
To exactly what I mean.
I think there is a problem with the plugin.
If you send a foundset from Servoy to jasper with subreport, it dosent work on client machine because it seek the subreport in your local machine (in client ) not in Server machine (Servoy server reports path).
If you copy in the same path in client machine the report and sureport, then it works fine.
Therefore I think that is a bug in the jasperreport plugin
Bye
HI all:
I put a trick we use for subreports print in smart client. Apparently the problem is that the plugin are looking for the subreport on the client machine; so we unloaded it and indicate the full path to the plugin.
// --- Create temp file.
var tmpFile = plugins.file.createTempFile(fileName, ext);
// --- Load report from the server.
plugins.file.writeFile(tmpFile, plugins.jasperPluginRMI.readFileFromReportsDir(fileName+ext));
Example calling to plugin:
var param = new java.util.HashMap();
param.put("MY_SUBREPORT_PATH", tmpFile.getAbsolutePath());
plugins.jasperPluginRMI.runReport(myFoundset,myReport,false,'view',param);
In iReport:
1.- We create a parameter named “MY_SUB_REPORT_PATH”.
2.- For the subreport properties, substitute the subreport name ($P{SUBREPORT_DIR]+“subreport.jasper”) for $P{MY_SUBREPORT_PATH}
So is working properly and I close the sesion, the temp files are automatically deleted.
I hope this helps, greetings.
Clever trick.
But how do you replicate a path like C:\Program Files\Servoy\Jasper Reports\myreport.jasper on a Mac client? ![Wink :wink:]()
EDIT: sorry, I didn’t read with proper attention: you use temp file, so it should work cross-platform. Thanks, Adelo.
Nice trick! But IMHO the issue should be just fixed, that’s a too much of a workaround, Hopefully Rick’s case will be addressed with the usual Servoy promptness.
I dont doubt the promptness of Servoy, but for me it was a big problem and I needed an urgent solution.
Obviously if you do not hurry it’s best to wait for the Servoy solution ![Wink ;-)]()
Best regards.
This issue has been fixed and the fix will be available in the next release of the plugin (it is already available, in the plugin’s code).
Regards,
Andrei
Hi Andre
Great news for a great plugin.
All my clients prefer the rendering accuracy and feature set of Jasper Reports over standard print preview in Servoy. Much more powerful and the ability to use foundsets makes it much easier to develop for.
Will the new plugin be able to use the latest version of iReport?
rodneysieb:
Hi Andre
Great news for a great plugin.
All my clients prefer the rendering accuracy and feature set of Jasper Reports over standard print preview in Servoy. Much more powerful and the ability to use foundsets makes it much easier to develop for.
Will the new plugin be able to use the latest version of iReport?
It will be usable (compatible) with iReport version 4.0.0.
Regards,
Andrei