程序包 | 说明 |
---|---|
com.fr.io.importer | |
com.fr.report.write |
这个包中定义了支持报表注释和报表数据校验的接口和类, 在填报系统中常常用到这个包.
|
com.fr.schedule.extension.report.job.execute | |
com.fr.write.main |
限定符和类型 | 方法和说明 |
---|---|
void |
ExcelReportImporter.importExcel2Book(WriteWorkBook book,
FineBook source,
TemplateWorkBook template,
java.util.Map<java.lang.String,java.lang.Object> map4Execute)
step 1:找到可能会有不定行扩展的扩展块,最多一个
how :直接找是数据列的格子。
|
void |
ExcelReportImporter.importExcel2Book(WriteWorkBook book,
FineBook source,
TemplateWorkBook template,
java.util.Map<java.lang.String,java.lang.Object> map4Execute,
boolean checkWidget)
把引入的excel生成的模板整合到原始的填报页面中
Excel导入的例子:
TableDataSource source = TemplateWorkBookIO.readTemplateWorkBook(FRContext.getCommonOperator(), "1.cpt");
TemplateWorkBook template = new WorkBook(); //excel文件数据生成的模板
ResultWorkBook book = ((WorkBook) source).execute(new HashMap(), new WriteActor());
ExcelReportImporter.importExcel2Book((WriteWorkBook)book, source, template, new HashMap());
|
限定符和类型 | 方法和说明 |
---|---|
static void |
SubmitHelper.submit(WriteWorkBook resultBook,
TemplateWorkBook templateBook,
java.util.Map extraInfo)
carl:表单提交
加载报表1.cpt计算并提交所有sheet:
FRContext.setCurrentEnv(new LocalEnv("c:/Program Files/FineReport_7.1/WebReport/WEB-INF"));
ModuleContext.startModule(EngineModule.class.getName());
WorkBook workbook = (WorkBook) TemplateWorkBookIO.readTemplateWorkBook(FRContext.getCommonOperator(), "1.cpt");
Map paraMap = ReportWebUtils.dealWithReportParameters(workbook, new HashMap());
ReportUtils.submit((WriteWorkBook) resultWorkBook, workbook, paraMap);
|
static void |
SubmitHelper.submit(WriteWorkBook resultBook,
TemplateWorkBook templateBook,
java.util.Map extraInfo,
int reportIndex,
boolean isAllSheet)
单个sheet提交的时候调用这个,isAllSheet应该是false
加载报表1.cpt计算并提交第一个sheet:
FRContext.setCurrentEnv(new LocalEnv("c:/Program Files/FineReport_7.1/WebReport/WEB-INF"));
ModuleContext.startModule(EngineModule.class.getName());
WorkBook workbook = (WorkBook) TemplateWorkBookIO.readTemplateWorkBook(FRContext.getCommonOperator(), "1.cpt");
Map paraMap = ReportWebUtils.dealWithReportParameters(workbook, new HashMap());
ReportUtils.submit((WriteWorkBook) resultWorkBook, workbook, paraMap, 0, false);
|
static void |
SubmitHelper.submit(WriteWorkBook resultBook,
TemplateWorkBook templateBook,
java.util.Map extraInfo,
int reportIndex,
boolean isAllSheet,
java.util.Map allSheetConnMap)
单sheet提交和多sheet提交都会走这里
|
限定符和类型 | 方法和说明 |
---|---|
WriteWorkBook |
ExecuteWritePlusJob.getWriteWorkBook(TemplateWorkBook wbTpl,
java.util.Map<java.lang.String,java.lang.Object> parameterMap) |
WriteWorkBook |
ExecuteWriteJob.getWriteWorkBook(TemplateWorkBook wbTpl,
java.util.Map<java.lang.String,java.lang.Object> parameterMap) |
限定符和类型 | 类和说明 |
---|---|
class |
WriteRWorkBook |