public class DJServletHelper extends Object
Constructor and Description |
---|
DJServletHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
exportToHtml(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String imageServletUrl,
DynamicReport dynamicReport,
LayoutManager layoutManager,
net.sf.jasperreports.engine.JRDataSource ds,
Map parameters,
Map exporterParams)
Generates the report as HTML and setups everything for a clean response (serving images as well).
|
static void |
exportToHtml(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String imageServletUrl,
net.sf.jasperreports.engine.JasperPrint jasperPrint,
Map exporterParams) |
static InputStream |
exportToHtml(javax.servlet.http.HttpServletRequest request,
String imageServletUrl,
DynamicReport dynamicReport,
LayoutManager layoutManager,
net.sf.jasperreports.engine.JRDataSource ds,
Map parameters,
Map exporterParams) |
static InputStream |
exportToHtml(javax.servlet.http.HttpServletRequest request,
String imageServletUrl,
net.sf.jasperreports.engine.JasperPrint jasperPrint,
Map exporterParams) |
static void |
setPageTreshold(int treshold)
Sets the number of pages to keep the report in memory, if the report surpases such limit, a file will
be used.
|
public static void setPageTreshold(int treshold)
treshold
- public static void exportToHtml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String imageServletUrl, DynamicReport dynamicReport, LayoutManager layoutManager, net.sf.jasperreports.engine.JRDataSource ds, Map parameters, Map exporterParams) throws net.sf.jasperreports.engine.JRException, IOException
<servlet>
<servlet-name>image</servlet-name>
<servlet-class>net.sf.jasperreports.j2ee.servlets.ImageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>image</servlet-name>
<url-pattern>/reports/image</url-pattern>
</servlet-mapping>
request
- response
- imageServletUrl
- the URI to reach net.sf.jasperreports.j2ee.servlets.ImageServlet servlet (in example it would be "reports/image")dynamicReport
- layoutManager
- ds
- parameters
- Parameters for the DynamicReportexporterParams
- Extra parameters for JasperReport's HTML exporter (HTMLJRHtmlExporter)net.sf.jasperreports.engine.JRException
IOException
public static void exportToHtml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String imageServletUrl, net.sf.jasperreports.engine.JasperPrint jasperPrint, Map exporterParams) throws net.sf.jasperreports.engine.JRException, IOException
net.sf.jasperreports.engine.JRException
IOException
public static InputStream exportToHtml(javax.servlet.http.HttpServletRequest request, String imageServletUrl, DynamicReport dynamicReport, LayoutManager layoutManager, net.sf.jasperreports.engine.JRDataSource ds, Map parameters, Map exporterParams) throws net.sf.jasperreports.engine.JRException, IOException
net.sf.jasperreports.engine.JRException
IOException
public static InputStream exportToHtml(javax.servlet.http.HttpServletRequest request, String imageServletUrl, net.sf.jasperreports.engine.JasperPrint jasperPrint, Map exporterParams) throws net.sf.jasperreports.engine.JRException, IOException
net.sf.jasperreports.engine.JRException
IOException
Copyright © 2006–2015 FDV Solutions. All rights reserved.