⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reportscriptlet.java

📁 一个很有特点的地图平台,可以以动画方试展现电子地图,有拉近,拉远,滑动功能,最主要的是它是一个地图维护台,处理地图到数据库的数据导入
💻 JAVA
字号:
package mapcenter.test;

import java.util.*;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.data.*;

public class reportScriptlet extends JRAbstractScriptlet {

  public void beforeReportInit() throws JRScriptletException{}
  public void afterReportInit() throws JRScriptletException{}
  public void beforePageInit() throws JRScriptletException{}
  public void afterPageInit() throws JRScriptletException{}
  public void beforeColumnInit() throws JRScriptletException{}
  public void afterColumnInit() throws JRScriptletException{}
  public void beforeGroupInit(String string) throws JRScriptletException{}
  public void afterGroupInit(String string) throws JRScriptletException{}
  public void beforeDetailEval() throws JRScriptletException{}
    public void afterDetailEval() throws JRScriptletException {
       System.out.println("afterDetailEval...");
       List subList = (List)getFieldValue("subList");
       JRDataSource jr = new JRBeanCollectionDataSource(subList);
       /**
        *该值是在父报表中定义的一个变量Variables,
        *类型为net.sf.jasperreports.engine.JRDataSource
         *(需要手动填写Class Type)
        **/
         setVariableValue("other", jr);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -