Package org.efs.openreports.services.info

Examples of org.efs.openreports.services.info.ReportInfo


    return reportOutput;
  }   
   
  public ReportInfo getReportInfo(String reportName)
  {
    ReportInfo reportInfo = null;
   
    try
    {
      Report report = reportProvider.getReport(reportName);
      if (report != null)
View Full Code Here


public class Converter
{
  public static ReportInfo convertToReportInfo(Report report)
  {   
    ReportInfo reportInfo = new ReportInfo()
    reportInfo.setId(report.getId());
    reportInfo.setName(report.getName());
    reportInfo.setDescription(report.getDescription());
    reportInfo.setCsvExportEnabled(report.isCsvExportEnabled());
    reportInfo.setExcelExportEnabled(report.isExcelExportEnabled());
    reportInfo.setHtmlExportEnabled(report.isHtmlExportEnabled());
    reportInfo.setPdfExportEnabled(report.isPdfExportEnabled());
    reportInfo.setRtfExportEnabled(report.isRtfExportEnabled());
    reportInfo.setTextExportEnabled(report.isTextExportEnabled());
    reportInfo.setXlsExportEnabled(report.isXlsExportEnabled());
    reportInfo.setHidden(report.isHidden());
   
    if (report.isJXLSReport())
    {
      reportInfo.setDefaultExportType(ExportType.XLS);
    }
    else if (report.isHtmlExportEnabled() || report.isQueryReport() || report.isChartReport())
    {
      reportInfo.setDefaultExportType(ExportType.HTML);
    }
    else
    {
      reportInfo.setDefaultExportType(ExportType.PDF);
    }
   
    if (report.getParameters() != null && report.getParameters().size() > 0)
    {
      ArrayList<ReportParameterMap> reportParameters = new ArrayList<ReportParameterMap>(report.getParameters());
     
      ParameterInfo[] parameters = new ParameterInfo[reportParameters.size()];
      for (int x = 0; x < reportParameters.size(); x++)
      {
        ReportParameterMap reportParameter = (ReportParameterMap) reportParameters.get(x);
       
        ParameterInfo parameter = new ParameterInfo();
        parameter.setId(reportParameter.getReportParameter().getId());
        parameter.setName(reportParameter.getReportParameter().getName());
        parameter.setDescription(reportParameter.getReportParameter().getDescription());
       
        parameters[x] = parameter;
      }
     
      reportInfo.setParameters(parameters);
    }
             
    return reportInfo;
  }
View Full Code Here

TOP

Related Classes of org.efs.openreports.services.info.ReportInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.