Jasper Plugin

Provide custom report name for Content-disposition, attachment; filename

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

Currently the JasperController uses the name of the report for the Content-disposition filename. On many occasions my requirements dictate that the downloaded report needs a specific format for the name (username, date, id, etc). Currently to meet my requirements I have to duplicate the logic in JasperController. It would be nice to have the option for custom filename in the main controller. I am attaching a patch file from svn diff with the change. Basically I am reusing the "name" attribute in the params if it isn't null. If it is null, then I fall back to current behavior.

Activity

Hide
Aaron Oathout added a comment -

I suppose I could commit this fix, but since I'm not the author I wanted to provide the patch and make sure it doesn't have any side-effects that I haven't seen

Show
Aaron Oathout added a comment - I suppose I could commit this fix, but since I'm not the author I wanted to provide the patch and make sure it doesn't have any side-effects that I haven't seen
Hide
Sebastian Hohns added a comment -

Thanks. I didn't notice this myself because i store my metadata in the db and use
a different generateResponse which takes the filename from the database.
There will be a release including the fix shortly, just waiting for another issue to clear up.

Show
Sebastian Hohns added a comment - Thanks. I didn't notice this myself because i store my metadata in the db and use a different generateResponse which takes the filename from the database. There will be a release including the fix shortly, just waiting for another issue to clear up.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: