public class SubReportBuilder extends Object
Constructor and Description |
---|
SubReportBuilder() |
Modifier and Type | Method and Description |
---|---|
SubReportBuilder |
addParameter(SubreportParameter sp) |
SubReportBuilder |
addParameterFieldType(String propertyName,
String paramName) |
Subreport |
build() |
SubReportBuilder |
setDataSource(int origin,
int type,
String expression)
Indicates from where to get the data source.
|
SubReportBuilder |
setDataSource(int origin,
String expression)
like addDataSource(int origin, int type, String expression) but the type will be of the
JRDataSource |
SubReportBuilder |
setDataSource(String expression)
like addDataSource(int origin, String expression) but the origin will be from a Parameter
|
SubReportBuilder |
setDynamicReport(DynamicReport dynamicReport,
LayoutManager layoutManager) |
SubReportBuilder |
setFitToParentPrintableArea(boolean fitparent)
When true, and id the subreport is dynamic, it's page size and margins will match with the parent report
|
SubReportBuilder |
setParameterMapPath(String path)
defines the KEY in the parent report parameters map where to get the subreport parameters map.
|
SubReportBuilder |
setParameterMapPath(String path,
int origin) |
SubReportBuilder |
setPathToReport(String path) |
SubReportBuilder |
setReport(net.sf.jasperreports.engine.JasperReport jasperReport) |
SubReportBuilder |
setSplitAllowed(boolean splitAllowed)
If false, and the report doesn't fit in the space given until end of page, it will be pushed to the next
page.
|
SubReportBuilder |
setStartInNewPage(boolean startInNewPage) |
SubReportBuilder |
setUserParentReportParameterMap(boolean useParent) |
public Subreport build() throws DJBuilderException
DJBuilderException
public SubReportBuilder setDataSource(int origin, int type, String expression)
origin
- Must be one of these constans located in DJConstants intefacetype
- tell if the datasource is a Collection, an Array, a ResultSet or whatever.DJConstants
of the like DATA_SOURCE_TYPE_...expression
- is -depending on the origin- te path to the datasourceJRDataSource
or any of the followingpublic SubReportBuilder setDataSource(int origin, String expression)
JRDataSource
origin
- expression
- public SubReportBuilder setDataSource(String expression)
origin
- expression
- public SubReportBuilder setReport(net.sf.jasperreports.engine.JasperReport jasperReport)
public SubReportBuilder setDynamicReport(DynamicReport dynamicReport, LayoutManager layoutManager)
public SubReportBuilder setPathToReport(String path)
public SubReportBuilder setStartInNewPage(boolean startInNewPage)
public SubReportBuilder addParameter(SubreportParameter sp)
public SubReportBuilder addParameterFieldType(String propertyName, String paramName)
public SubReportBuilder setFitToParentPrintableArea(boolean fitparent)
fitparent
- public SubReportBuilder setSplitAllowed(boolean splitAllowed)
splitAllowed
- public SubReportBuilder setParameterMapPath(String path)
path
- where to get the parameter map for the subrerpot.public SubReportBuilder setParameterMapPath(String path, int origin)
path
- where to get the parameter map for the subrerpotorigin
- where the paramters map comes from: DJConstants.SUBREPORT_PARAMETER_MAP_ORIGIN_PARAMETER or DJConstants.SUBREPORT_PARAMETER_MAP_ORIGIN_FIELDpublic SubReportBuilder setUserParentReportParameterMap(boolean useParent)
Copyright © 2006–2015 FDV Solutions. All rights reserved.