KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > common > ExternalJasperDefinition


1 package com.calipso.reportgenerator.common;
2
3 import net.sf.jasperreports.engine.design.JasperDesign;
4 import net.sf.jasperreports.engine.JRException;
5 import net.sf.jasperreports.engine.JasperManager;
6 import net.sf.jasperreports.engine.JasperCompileManager;
7 import net.sf.jasperreports.engine.xml.JRXmlLoader;
8
9 /**
10  *
11  */

12 public class ExternalJasperDefinition implements IJasperDefinition {
13   private JasperDesign jasperDesign;
14   public JasperDesign getJasperDefinition(boolean isLandscape) throws JRException {
15     return jasperDesign;
16   }
17
18   public ExternalJasperDefinition(String JavaDoc externalDefinitionFile) throws InfoException {
19     try {
20       System.out.println("LayoutDesign_FileName:"+ externalDefinitionFile);
21       jasperDesign = JRXmlLoader.load(externalDefinitionFile);
22     } catch (JRException e) {
23       throw new InfoException(LanguageTraslator.traslate("257"));
24     }
25   }
26
27 }
28
Popular Tags