Browse Source

分页预览

pull/1/head
richie 5 years ago
parent
commit
bf311cc96c
  1. 2
      src/main/java/com/fanruan/api/cal/FormulaKit.java
  2. 26
      src/main/java/com/fanruan/api/report/page/PageKit.java

2
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);
}
}

26
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<PaperSettingProvider> list = ReportUtils.getPaperSettingListFromWorkBook(rb);
return list == null ? new PaperSettingProvider[0] : list.toArray(new PaperSettingProvider[0]);
}
}
Loading…
Cancel
Save