From bf311cc96c99b6210da4c65bf86827717b79a235 Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 16 Aug 2019 13:34:45 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=88=86=E9=A1=B5=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/cal/FormulaKit.java | 2 +- .../com/fanruan/api/report/page/PageKit.java | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/fanruan/api/report/page/PageKit.java diff --git a/src/main/java/com/fanruan/api/cal/FormulaKit.java b/src/main/java/com/fanruan/api/cal/FormulaKit.java index fe86a9d..16ac7f1 100644 --- a/src/main/java/com/fanruan/api/cal/FormulaKit.java +++ b/src/main/java/com/fanruan/api/cal/FormulaKit.java @@ -45,7 +45,7 @@ public class FormulaKit { * @param content 公式的内容 * @return 公式对象 */ - public static FormulaProvider createFormula(Object content) { + public static FormulaProvider newFormula(Object content) { return BaseFormula.createFormulaBuilder().build(content); } } diff --git a/src/main/java/com/fanruan/api/report/page/PageKit.java b/src/main/java/com/fanruan/api/report/page/PageKit.java new file mode 100644 index 0000000..447b4c2 --- /dev/null +++ b/src/main/java/com/fanruan/api/report/page/PageKit.java @@ -0,0 +1,26 @@ +package com.fanruan.api.report.page; + +import com.fr.main.workbook.ResultWorkBook; +import com.fr.page.PaperSettingProvider; +import com.fr.report.core.ReportUtils; + +import java.util.List; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-16 + * 分页预览相关工具类 + */ +public class PageKit { + + /** + * 获取报表的打印纸张设置信息 + * @param rb 结果报表 + * @return 打印纸张设置信息集合 + */ + public static PaperSettingProvider[] getPaperSettingListFromWorkBook(ResultWorkBook rb) { + List list = ReportUtils.getPaperSettingListFromWorkBook(rb); + return list == null ? new PaperSettingProvider[0] : list.toArray(new PaperSettingProvider[0]); + } +}