package com.zt.plat.module.qms.framework.gridreport.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.zt.plat.module.qms.framework.gridreport.GridReport;
import gridreport.jni.Report;

@Configuration
public class GridReportConfig {

    /** gridreport服务器安装地址，详见锐浪报表帮助文档，Java报表服务器开发起步-web报表服务器（JAVA） **/
    @Value("${zzjc.report.gridreport.server.path:/usr/local/grsvr6}")
    private String gridReportPath;
    
    /** 文档输出目录 **/
    @Value("${zzjc.report.gridreport.file.out-path:/appdata/data/pdf}")
    private String gridReportOutPath;
    
    @Bean
    public GridReport gridReport() {
        //初始化报表模块路径
        Report.ConfigModulePath(gridReportPath);
        return new GridReport(gridReportOutPath);
    }
}
