本文整理匯總了Java中net.sf.jasperreports.engine.JasperReport.getCompileData方法的典型用法代碼示例。如果您正苦於以下問題:Java JasperReport.getCompileData方法的具體用法?Java JasperReport.getCompileData怎麽用?Java JasperReport.getCompileData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.sf.jasperreports.engine.JasperReport
的用法示例。
在下文中一共展示了JasperReport.getCompileData方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadEvaluator
import net.sf.jasperreports.engine.JasperReport; //導入方法依賴的package包/類
@Override
public JREvaluator loadEvaluator(JasperReport jasperReport, JRDataset dataset) throws JRException
{
JRReportCompileData reportCompileData = (JRReportCompileData) jasperReport.getCompileData();
String unitName = reportCompileData.getUnitName(jasperReport, dataset);
Serializable compileData = reportCompileData.getDatasetCompileData(dataset);
return loadEvaluator(compileData, unitName);
}
示例2: createTableReportCompileData
import net.sf.jasperreports.engine.JasperReport; //導入方法依賴的package包/類
protected JRReportCompileData createTableReportCompileData(
JasperReport parentReport, JRDataset reportSubdataset)
throws JRException
{
Serializable reportCompileDataObj = parentReport.getCompileData();
if (!(reportCompileDataObj instanceof JRReportCompileData))
{
throw
new JRRuntimeException(
EXCEPTION_MESSAGE_KEY_UNSUPPORTED_REPORT_DATA_TYPE,
new Object[]{reportCompileDataObj.getClass().getName()}
);
}
JRReportCompileData reportCompileData = (JRReportCompileData) reportCompileDataObj;
Serializable datasetCompileData = reportCompileData.getDatasetCompileData(
reportSubdataset);
TableReportCompileData tableReportCompileData = new TableReportCompileData(
parentReport);
tableReportCompileData.setMainDatasetCompileData(datasetCompileData);
JRDataset[] datasets = parentReport.getDatasets();
if (datasets != null)
{
for (JRDataset dataset : datasets)
{
Serializable compileData = reportCompileData.getDatasetCompileData(dataset);
tableReportCompileData.setDatasetCompileData(dataset, compileData);
}
}
tableReportCompileData.copyCrosstabCompileData(reportCompileData);
return tableReportCompileData;
}