public class JasperReportService extends Object implements ReportService
JasperReportService class.
Constructor and Description |
---|
JasperReportService() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
apply(List<ParameterFilter> parameterFilters,
net.sf.jasperreports.engine.JRParameter reportParm) |
static String |
evaluateToString(net.sf.jasperreports.engine.JasperReport report,
net.sf.jasperreports.engine.JRExpression expression) |
List<ReportFormat> |
getFormats(String reportId)
This method provides a list of formats supported by the report
|
protected List<ParameterFilter> |
getParameterFilters() |
ReportParameters |
getParameters(String reportId)
This method retrieves the runtime parameters taken by the report
|
void |
render(String reportId,
String location,
ReportFormat format,
OutputStream outputStream)
This method renders the report into a given output stream.
|
String |
run(Map<String,Object> reportParms,
String reportId)
This method runs the report
|
void |
runAndRender(Map<String,Object> reportParms,
String reportId,
ReportFormat format,
OutputStream outputStream)
This method runs the report and renders in into the given output stream
with no intermediate steps
|
void |
setGlobalReportRepository(GlobalReportRepository globalReportRepository) |
public List<ReportFormat> getFormats(String reportId)
getFormats
in interface ReportService
reportId
- reportId as defined in database-reports.xmlpublic ReportParameters getParameters(String reportId) throws ReportException
getParameters
in interface ReportService
reportId
- a String
object.ReportException
public void render(String reportId, String location, ReportFormat format, OutputStream outputStream) throws ReportException
render
in interface ReportService
reportId
- reportId as defined in database-reports.xmllocation
- location of the report on diskformat
- format to render the reportoutputStream
- stream to render the resulting reportReportException
- if any.public String run(Map<String,Object> reportParms, String reportId) throws ReportException
run
in interface ReportService
reportParms
- hashmap of parameters to be provided at runtimereportId
- reportId as defined in database-reports.xmlString
object.ReportException
- if any.public void runAndRender(Map<String,Object> reportParms, String reportId, ReportFormat format, OutputStream outputStream) throws ReportException
runAndRender
in interface ReportService
reportParms
- a HashMap
object.reportId
- reportId as defined in database-reports.xmlformat
- format to render the reportoutputStream
- stream to render the resulting reportReportException
- if any.public void setGlobalReportRepository(GlobalReportRepository globalReportRepository)
protected boolean apply(List<ParameterFilter> parameterFilters, net.sf.jasperreports.engine.JRParameter reportParm)
protected List<ParameterFilter> getParameterFilters()
public static String evaluateToString(net.sf.jasperreports.engine.JasperReport report, net.sf.jasperreports.engine.JRExpression expression)
Copyright © 2020. All rights reserved.