[Logo] SpagoWorld Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
[Groups] Back to home page  [Moderation Log] Moderation Log   [Register] Register /  [Login] Login 
File Name Format Configuration  XML
Forum Index » Technical Help - SpagoBI Server - CORE
Author Message
deniswmc.spw

SpagoBI friend

Joined: 13/10/2011 06:42:30
Messages: 62
Offline

Dear all,

Is there any configuration for the file name format of the exported report?

Case 1 - Manually Exported Report
The default file name is report.xls when the parameter of outputType is set to be xls; while it is JasperReportServlet.pdf when the parameter of outputType is set to be pdf.

Is there any way to change the default file name? when the parameter of outputType is set to be pdf.

Case 2 - Automatically Exported Report
The default file name is Name of Report_DDMMYYYY when the report is schedulely exported and attached in the E-mail.
Is there any way to make part of the file name depending on the selected criteria, i.e. parameter?

Thank you.

This message was edited 2 times. Last update was at 10/05/2012 09:34:45

aghedin

SpagoBI hero
[Avatar]

Joined: 14/07/2010 09:25:00
Messages: 465
Offline

Hi,
I’m sorry.. Now the name of the exported file is not configurable.
If you need it we can tell you where to act in the code to develop this improvement..
The first point is an error, the behaviour should be the same between all the export format.

Alberto Ghedin

~~~ sis felix ~~~
deniswmc.spw

SpagoBI friend

Joined: 13/10/2011 06:42:30
Messages: 62
Offline

Dear aghedin,

Thank you for the quick reply.

Yes. Could you please let me know where to develop this improvement?

Regarding "The first point is an error, the behaviour should be the same between all the export format.", what does the error refer to?

Thank you.
aghedin

SpagoBI hero
[Avatar]

Joined: 14/07/2010 09:25:00
Messages: 465
Offline

Hi,
First of all, you should download the java sources from http://forge.ow2.org/project/showfiles.php?group_id=204 .
You will find the instruction for the compilation in the compressed folder.
After that you should open the project SpagoBIJasperReport.
The class that manage the name of the file is it.eng.spagobi.engines.jasperreport.JasperReportServlet
after line 130 (more or less).
You should change those lines to customize the name of the exported file.
For the pdf, you have a different name of the file, because the file is opened by the browser. If you want a customized name you should add this information in the header of the response.

Alberto Ghedin

~~~ sis felix ~~~
deniswmc.spw

SpagoBI friend

Joined: 13/10/2011 06:42:30
Messages: 62
Offline

Dear aghedin,

Thank you so much.
I got it and I find the following code what you recommended.
response.setHeader("Content-Disposition", "filename=\"report." + outputType + "\";");

Thank you.

This message was edited 2 times. Last update was at 23/05/2012 13:41:12

deniswmc.spw

SpagoBI friend

Joined: 13/10/2011 06:42:30
Messages: 62
Offline

Dear aghedin,

Thank you for the last suggestion.

In addition, is there any way to predefine the saving path for the exported reports?
Thank you.
omehacker.spw

Newby

Joined: 12/10/2017 13:46:24
Messages: 11
Offline

So Many Fun here.This is My most favorite card game also.Millions of the people playing through this website hearts card game online and get the help,advantages and newer Features to Play Hearts card game free of cost and online.Thanks to make this available for the players.
 
Forum Index » Technical Help - SpagoBI Server - CORE
Go to:   
Powered by JForum 2.1.9 © JForum Team