Jump to content
Changes to the Jaspersoft community edition download ×
  • How to remove the hyphen from the Scheduler Sequential File Name


    ghudson_1

    Issue Description [toc on_off::hide=1]

    Scheduler output typically has a filename which contains a hyphen. A pattern like MM-dd-yyyy results in a filename like Postcall_report-07-26-2016, but a customer would like to remove the hyphen so that the output is like Postcall_reportMM-dd-yyyy

    Resolution

    Within the downloadable source code there is a customization that can be made.  In class 6.1srcJasperReports-Server-6.1.0-srcjasperserverjasperserver-api-implenginesrcmainjavacomjaspersoftjasperserverapiengineschedulingquartzReportExecutionJob.java  there is a getBaseFileName() which makes use of a static variable, below which can be modified to another character or an empty string : 

    public static final String REPOSITORY_FILENAME_SEQUENCE_SEPARATOR = "-";
    
    

    This class was found mostly with find-in-files tools, searching within the deployed WAR as well as the source-code, using display labels from the UI, the .properties containing the display labels, the .jsp or .htm files containing input name values, and the .java files containing references to this input name value.


    Ref. Case 00070262


    User Feedback

    Recommended Comments

    Hi,

    I don't have the file ReportExecutionJob.java. Also, my filepath is different. I have /opt/jasperreports-server-cp-4.0.0/samples/java-webapp-sample/jasperserver-ws-sample-jar/src/main/java/com/jaspersoft/jasperserver/sample. Under the sample directory, I have WSClient.java, ReportExecutionHyperlinkProducer.java, ImageServerlet.java, and ContentResourceDataServlet.java.

    How do I go about and remove the hyphen from the filename when adding a timestamp.

    Link to comment
    Share on other sites

    Hi!

    I have the same problem. I want to delete the hyphen between report name and date, but I don't know where ReportExecutionJob.java file is. 

    Have you find a solution?

    Thanks!

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...