【仅供内部供应商使用,不提供对外解答和培训】

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
themeEclipse
firstline1
titleExcelExportAppProvider.java
linenumberstrue
package com.fr.report.fun;

import com.fr.io.collection.ExportCollection;
import com.fr.io.exporter.AppExporter;
import com.fr.io.exporter.ExcelExportType;
import com.fr.stable.fun.mark.Mutable;
import com.fr.stable.web.SessionProvider;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by richie on 16/1/19.
 * Excel导出细分接口
 */
public interface ExcelExportAppProvider extends Mutable {

    String MARK_STRING = "ExcelExportAppProvider";

    int CURRENT_LEVEL = 1;


    /**
     * extype的值
     *
     * @return Excel导出的具体方式
     */
    String exportType();

    /**
     * 大数据量Excel导出时的操作方式
     *
     * @param req            HTTP请求
     * @param res            HTTP响应
     * @param sessionIDInfor 报表的会话信息
     * @param fileName       文件名
     * @param type           导出类型
     * @return 操作方式
     */
    ExportCollection newLargeDataExportCollection(HttpServletRequest req, HttpServletResponse res,
                                                  SessionProvider sessionIDInfor,
                                                  String fileName, ExcelExportType type);

    /**
     * 导出器
     *
     * @param collection     操作方式
     * @param exportType     导出类型
     * @param sessionIDInfor 报表的会话信息
     * @return Excel导出器
     */
    AppExporter<Boolean> newAppExporter(ExportCollection collection, ExcelExportType exportType, SessionProvider sessionIDInfor);
}

ExportCollection介绍

四、支持版本

产品线

版本

支持情况

备注

FR8.0支持
FR9.0支持
FR10.0支持
BI3.6支持不支持BI的仪表板
BI4.0支持不支持BI的仪表板
BI5.1支持不支持BI的仪表板
BI5.1.2支持不支持BI的仪表板
BI5.1.3支持不支持BI的仪表板

五、插件注册

Code Block
languagexml
themeEclipse
firstline1
titleplugin.xml
linenumberstrue
<extra-report>
        <ExcelExportAppProvider class="your class name"/>
</extra-report>

...

该接口一共3个接口方法,其中必须实现的方法只有exportType。用于指定该接口需要处理的excel导出细分类型。细分类型可以是产品已有的(产品已有的类型见下表),也可以是自己新定义的。如果是返回产品已有的类型,则代表覆盖产品本身的excel细分导处类型。

类型参数标志备注
分页ExportConstants.TYPE_PAGE
原样ExportConstants.TYPE_SIMPLE
分页分sheetExportConstants.TYPE_PAGETOSHETT
大数据ExportConstants.TYPE_LARGEDATA_PAGE

newLargeDataExportCollection接口是专用于大数据量导出excel细分类型的接口。其他产品已有excel导出细分类型和自定义的类型则不用实现这个接口。

...

com.fr.form.stable.FormExportProcessor

com.fr.report.fun.CommentExcelProcessor


九、开源案例

免责声明:所有文档中的开源示例,均为开发者自行开发并提供。仅用于参考和学习使用,开发者和官方均无义务对开源案例所涉及的所有成果进行教学和指导。若作为商用一切后果责任由使用者自行承担。

...