Defect #334
Direct Excel file export stopped working with 3.2.0
0%
Description
I have several routines that directly save a text or xls file. After moving to 3.2.0 the file is not created anymore: no errors, simply the file is not created.
Switching back to the old version everything works again.
A sample method using this option is:
function exportRowsJasper()
{
var ds = databaseManager.getDataSetByQuery('sintpro_mods','SELECT standard_code FROM lf_languages WHERE lf_code = ?',[globals.data_language],1)
var _locale = _ds.getValue(1,1)
var _file = plugins.file.showFileSaveDialog('export'+codpre+'.xls')
plugins.jasperPluginRMI.runReport(globals.sintpro_db_name,'lf_offerlines_exp1.jasper',_file,'xls',{codpre: codpre, lang: globals.data_language},_locale);
globals.resetLocale(); //in the rest of the prints this method is called onHide.
}
Files
History
Updated by Andrei Costache almost 14 years ago
- Status changed from New to In Progress
- Assignee set to Andrei Costache
Hi,
We tried, but were not able to reproduce the issue.
Could you please attach a sample report + solution in which you encounter this issue?
Regards,
Andrei
Updated by Riccardo Albieri almost 14 years ago
- File jasper_support.zip jasper_support.zip added
Here it is: sample report and solution (please import the sample data).
Sample solution usage:
go to offerlines_tab_list form
click EXPORT JASPER button
With the new version of the plugin the file is not created. With the old one everything works.
Servoy version: 5.2.8 - build 1016
Mac OS X v 10.6.8
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
Updated by Riccardo Albieri almost 14 years ago
Hi, Andrei
any update on this issue? We'd really to move to the new version and this export problem is forcing us to stick to the old one... (I hate iReport 3.7.1) ;)
Updated by Andrei Costache over 13 years ago
Riccardo, are you still experiencing this?
We were not able to reproduce.
And no errors in any logs?
Could you please do a "try catch" around the place the code is at?
Have you tried with a clean plugin install (that is not updating an older servoy_jasperreports plugin folder), as maybe the needed libraries are mixed up or not in sync.
Updated by Riccardo Albieri over 13 years ago
- File jasper_report.png jasper_report.png added
Yes: I still have the problem, even after updating Apple Java to last release (1.6.0_26).
A try-catch block doesn't catch any exception, changing the code from:
plugins.jasperPluginRMI.runReport(globals.sintpro_db_name, 'lf_offerlines_exp1.jasper', _file, 'xls', { codpre: codpre, lang: globals.data_language }, _locale);
(perfectly working with 3.1.0 but NOT working under 3.2.0) to
plugins.jasperPluginRMI.runReport(globals.sintpro_db_name, 'lf_offerlines_exp1.jasper', _file, OUTPUT_FORMAT.XLS, { codpre: codpre, lang: globals.data_language }, _locale);
or OUTPUT_FORMAT.XLS_1_SHEET or OUTPUT_FORMAT.EXCEL
But none of them is working.
I tried to save in TEXT format and the procedure works, so it's something related to Excel export.
Even changing the output to VIEW and saving the report manually to Excel I have a problem: in this case I get the file, but it's empty (see attach).
I remember I had the same problem with an older version of the plugin, about 1 year ago, when we moved to 4.1 to 5.2: I'll try to find the thread.
Updated by Riccardo Albieri over 13 years ago
Small update: I decided to upload the new plugin to our test server and the export works.
So, in short:
5.2.9 developer, Mac OS X: export not working
5.2.9 server (Win) -> client (Mac OS X): export working
Updated by Riccardo Albieri over 13 years ago
- File win_java_console_log.txt win_java_console_log.txt added
Another little update: I started Servoy Server from my install and tried to export the xls file from a Win client.
Even in this case the export doesn't work, but now I get some error in the java console (see attach).
Hope it helps
Updated by Andrei Costache over 13 years ago
- Status changed from In Progress to Closed
We found the problem and fixed it. This is due to a lib problem between Servoy 5.2 and this version of our plugin.
The workaround is to upgrade the jakarta-poi library in Servoy 5.2 with the same library from a Servoy 6.0 (which you can download from our website).
Moreover, we addressed this problem and it is fixed in the next public release of Servoy 5.2.
Regards,
Andrei