Unable to save a report in CSV format in web client

Hi,

There seems to be an issue when saving a report of type csv when running on web client.
I initially save the report on the server machine as follows,

plugins.jasperPluginRMI.jasperReport(database_name,report_template,_localSavePath,_saveAsType,_params);

[attachment=1]image1.jpg[/attachment]

then i dowload it using,

application.showURL(_serverURL+_filename+“.”+_saveAsType,“_self”);

The issue is When I try to save as csv (_saveAsType = ‘csv’), instead of getting the popup to save the file , it opens in a browser window displaying the report in csv. The browser window gets filled with csv context.

[attachment=0]image2.jpg[/attachment]

This only happens for csv types. For other types such as xls, the file gets downloaded properly

Can anyone help me out? Thanks in advance

Regards,
Hareendra

i guess the browser sees it as a normal text file and just opens it in the browser.

in servoy 5.1 you can do plugins.file.writeTXTFile(file,text_data) that should open up a file save dialog.