Uploaded image for project: 'Reporting Module'
  1. Reporting Module
  2. REPORT-649

Allow customization of output filename

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Reporting 0.9.2
    • Component/s: Report Renderers
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      Currently, when you generate a report, the renderer classes determine the output filename in a hardcoded way.

      Our Mirebalais users want generated reports to have filenames with a particular format, which depends on the report, and includes parameter values in a stardard way, something like:

      • mirebalais.hospitalizationsdataexport.startdate.enddate.dateofexport.time
      • mirebalais.patientsdataexport.startdate.enddate.dateofexport.time
      • mirebalais.usersandprovidersdateexport.dateofexport.time

      We should allow reports to have a design property that lets you give a filename template (and lets you substitute in things like parameter values, the current date+/-time, etc.

      Our specific use case is to support this for the CSV and XLS report renderers. It should be implemented in a utility or base class so it can be reused elsewhere too.

      (The PIH ticket for this is http://tickets.pih-emr.org/browse/UHM-1161 .)

      Dev Notes for compatibility

      As a result of this ticket, the first arguments of ReportRenderer.getFilename() and ReportRenderer.getRenderedContentType() were changed from ReportDefinition to ReportRequest, and we removed the second argument (since this is accessible through the ReportRequest). The signatures are now:

      public String getFilename(ReportRequest request);
      public String getRenderedContentType(ReportRequest request);
      

      If you have any modules with custom report renderers, and you want them to run on the latest versions of Reporting, you need to change your method signature, as well as the required version of the reporting module.

      If you have a custom report running page, you will need to change the calls you make to getFilename() and getRenderedContentType().

        Attachments

          Activity

            People

            Assignee:
            darius Darius Jazayeri [X] (Inactive)
            Reporter:
            darius Darius Jazayeri [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours
                1d 4h