Created
March 25, 2015 14:56
-
-
Save ivanursul/d951ce3f0224055ec91e to your computer and use it in GitHub Desktop.
CustomReportDocxExporter.java for www.ivanursul.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.jasper.exporter; | |
| import java.util.Map; | |
| import net.sf.jasperreports.engine.JRException; | |
| import net.sf.jasperreports.engine.export.ooxml.JRDocxExporter; | |
| import org.springframework.webflow.execution.RequestContext; | |
| import com.jaspersoft.jasperserver.api.common.domain.ExecutionContext; | |
| import com.jaspersoft.jasperserver.war.action.ReportDocxExporter; | |
| @SuppressWarnings({"unchecked", "rawtypes"}) | |
| public class CustomReportDocxExporter extends ReportDocxExporter { | |
| @Override | |
| public void export(final RequestContext context, final ExecutionContext executionContext, final String reportUnitURI, final Map baseParameters) throws JRException { | |
| JRDocxExporter exporter = new CustomDocXExporter(getJasperReportsContext()); | |
| exporter.setParameters(baseParameters); | |
| exporter.exportReport(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment