Search code examples
jasperserver

Output in txt format in JasperReports Server


I'm using JasperReports Server 6.4.2. And in "Output Options" tab of "New Schedule" windows I have such list of output formats:

enter image description here

And I would like to add here .txt format. I uncommented the following line in \JasperReports Server\apache-tomcat\webapps\jasperserver\WEB-INF\flows\viewReportBeans.xml file:

<!--
<entry key="txt" value-ref="txtExporterConfiguration"/>
 -->

and uncommented the lines:

<!-- 
        <bean class="com.jaspersoft.jasperserver.war.dto.ByteEnum">
            <property name="code">
                <util:constant static-field="com.jaspersoft.jasperserver.api.engine.scheduling.domain.ReportJob.OUTPUT_FORMAT_TXT"/>
            </property>
            <property name="labelMessage">
                <value>report.output.txt.label</value>
            </property>
        </bean>
-->

in \JasperReports Server\apache-tomcat\webapps\jasperserver\WEB-INF\flows\reportJobBeans.xml file, but these actions didn't make any visual effect, the "Text only" format didn't appear on the "Formats" form. How to add this format on the form?

I found also the similar question on the official jasper site, but, unfortunately, without answer... It seems the matter is in 6.x version.


Solution

  • At last I found instruction how to do this. The steps that I lacked: editing \JasperReports Server\apache-tomcat\webapps\jasperserver\scripts\scheduler\view\editor\outputTabView.js file and disabling "javascript.optimize" property in WEB-INF\js.config.properties file. After these actions "TXT" checkbox eventually appeared on the form:

    enter image description here