IDEMPIERE-748 error while print jasper report when using table component in ireport 4.6.0

IDEMPIERE-807 Jasper report not working when adding barcode
This commit is contained in:
Heng Sin Low 2013-04-01 16:27:24 +08:00
parent 6956b186a9
commit d2b454117c
27 changed files with 1128 additions and 144 deletions

View File

@ -231,13 +231,6 @@
version="2.7.1.v201005080400" version="2.7.1.v201005080400"
unpack="false"/> unpack="false"/>
<plugin
id="com.springsource.org.apache.xmlcommons"
download-size="0"
install-size="0"
version="1.3.4"
unpack="false"/>
<plugin <plugin
id="javax.xml" id="javax.xml"
download-size="0" download-size="0"

View File

@ -3,7 +3,7 @@
<booleanAttribute key="append.args" value="true"/> <booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.adempiere.base.ModelGeneratorApplication"/> <stringAttribute key="application" value="org.adempiere.base.ModelGeneratorApplication"/>
<booleanAttribute key="askclear" value="true"/> <booleanAttribute key="askclear" value="true"/>
<booleanAttribute key="automaticAdd" value="true"/> <booleanAttribute key="automaticAdd" value="false"/>
<booleanAttribute key="automaticValidate" value="false"/> <booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/> <stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/> <stringAttribute key="checked" value="[NONE]"/>
@ -12,7 +12,6 @@
<booleanAttribute key="clearwslog" value="false"/> <booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/model.generator"/> <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/model.generator"/>
<booleanAttribute key="default" value="false"/> <booleanAttribute key="default" value="false"/>
<stringAttribute key="deselected_workspace_plugins" value="com.trekglobal.ui.zk.theme,event.test,org.adempiere.base.callout,org.adempiere.base.process,org.adempiere.payment.processor,org.adempiere.pipo,org.adempiere.pipo.handlers,org.adempiere.replication,org.adempiere.replication.server,org.adempiere.report.jasper.swing,org.adempiere.report.jasper.webapp,org.adempiere.server,org.adempiere.tomcat.config,org.adempiere.ui.zk,org.adempiere.ui.zk.example,org.adempiere.webstore,org.adempiere.webstore.resource,org.adempiere.webstore.servlet,org.idempiere.fitnesse.fixture,org.idempiere.fitnesse.server,org.idempiere.hazelcast.service,org.idempiere.hazelcast.service.config,org.idempiere.ui.zk.selenium,org.idempiere.ui.zk.theme.flat,org.idempiere.webservices,org.zkoss.zk.library"/>
<booleanAttribute key="includeOptional" value="true"/> <booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-model.generator"/> <stringAttribute key="location" value="${workspace_loc}/../runtime-model.generator"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
@ -21,7 +20,7 @@
<stringAttribute key="pde.version" value="3.3"/> <stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.adempiere.server.server_product"/> <stringAttribute key="product" value="org.adempiere.server.server_product"/>
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet.ext.net@default:default,org.restlet@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/> <stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet.ext.net@default:default,org.restlet@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.adempiere.base@default:default,org.adempiere.eclipse.equinox.http.servlet@default:default,org.adempiere.eclipse.equinox.http.servletbridge@default:default,org.adempiere.eclipse.equinox.servletbridge@default:default,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.plugin.utils@default:default,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing@default:default,org.adempiere.ui@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default"/> <stringAttribute key="selected_workspace_plugins" value="org.adempiere.base@default:default,org.adempiere.eclipse.equinox.http.servlet@default:default,org.adempiere.eclipse.equinox.http.servletbridge@default:default,org.adempiere.eclipse.equinox.servletbridge@default:default,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.plugin.utils@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.idempiere.fitrecorder@default:default,org.w3c.dom.fragment@default:false"/>
<booleanAttribute key="show_selected_only" value="false"/> <booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/> <stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/> <booleanAttribute key="tracing" value="false"/>

View File

@ -164,8 +164,10 @@ public final class ProcessUtil {
} }
boolean success = false; boolean success = false;
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try try
{ {
Thread.currentThread().setContextClassLoader(process.getClass().getClassLoader());
process.setProcessUI(processMonitor); process.setProcessUI(processMonitor);
success = process.startProcess(ctx, pi, trx); success = process.startProcess(ctx, pi, trx);
if (success && trx != null && managedTrx) if (success && trx != null && managedTrx)
@ -190,6 +192,7 @@ public final class ProcessUtil {
trx.close(); trx.close();
trx = null; trx = null;
} }
Thread.currentThread().setContextClassLoader(cl);
} }
return success; return success;
} }

View File

@ -636,6 +636,9 @@ public final class Adempiere
if (!isClient) if (!isClient)
DB.updateMail(); DB.updateMail();
System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
return true; return true;
} // startupEnvironment } // startupEnvironment

View File

@ -104,49 +104,58 @@ public abstract class SvrProcess implements ProcessCall
if (localTrx) if (localTrx)
m_trx = Trx.get(Trx.createTrxName("SvrProcess"), true); m_trx = Trx.get(Trx.createTrxName("SvrProcess"), true);
// //
lock();
boolean success = false;
ClassLoader contextLoader = Thread.currentThread().getContextClassLoader(); ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
try ClassLoader processLoader = getClass().getClassLoader();
{ try {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); if (processLoader != contextLoader) {
m_ctx.put(PROCESS_INFO_CTX_KEY, m_pi); Thread.currentThread().setContextClassLoader(processLoader);
if (processUI != null)
m_ctx.put(PROCESS_UI_CTX_KEY, processUI);
success = process();
}
finally
{
m_ctx.remove(PROCESS_INFO_CTX_KEY);
m_ctx.remove(PROCESS_UI_CTX_KEY);
if (localTrx)
{
if (success)
{
try
{
m_trx.commit(true);
} catch (Exception e)
{
log.log(Level.SEVERE, "Commit failed.", e);
m_pi.addSummary("Commit Failed.");
m_pi.setError(true);
}
}
else
m_trx.rollback();
m_trx.close();
m_trx = null;
} }
lock();
unlock();
// outside transaction processing [ teo_sarca, 1646891 ] boolean success = false;
postProcess(!m_pi.isError());
try
{
m_ctx.put(PROCESS_INFO_CTX_KEY, m_pi);
if (processUI != null)
m_ctx.put(PROCESS_UI_CTX_KEY, processUI);
success = process();
}
finally
{
m_ctx.remove(PROCESS_INFO_CTX_KEY);
m_ctx.remove(PROCESS_UI_CTX_KEY);
if (localTrx)
{
if (success)
{
try
{
m_trx.commit(true);
} catch (Exception e)
{
log.log(Level.SEVERE, "Commit failed.", e);
m_pi.addSummary("Commit Failed.");
m_pi.setError(true);
}
}
else
m_trx.rollback();
m_trx.close();
m_trx = null;
}
Thread.currentThread().setContextClassLoader(contextLoader); unlock();
// outside transaction processing [ teo_sarca, 1646891 ]
postProcess(!m_pi.isError());
Thread.currentThread().setContextClassLoader(contextLoader);
}
} finally {
if (processLoader != contextLoader) {
Thread.currentThread().setContextClassLoader(contextLoader);
}
} }
return !m_pi.isError(); return !m_pi.isError();

View File

@ -102,7 +102,7 @@
unpack="false"/> unpack="false"/>
<plugin <plugin
id="com.springsource.org.apache.xmlcommons" id="javax.xml"
download-size="0" download-size="0"
install-size="0" install-size="0"
version="0.0.0" version="0.0.0"

View File

@ -32,4 +32,91 @@
install-size="0" install-size="0"
version="0.0.0"/> version="0.0.0"/>
<plugin
id="org.apache.batik.bridge"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.css"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.dom"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.dom.svg"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.ext.awt"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.extension"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.parser"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.util"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.batik.xml"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.w3c.css.sac"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.w3c.dom.smil"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.w3c.dom.svg"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.w3c.dom.fragment"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.apache.batik.util.gui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature> </feature>

View File

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry exported="true" kind="lib" path="lib/xalan.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.9.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/barcode4j-2.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.9.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jasperreports-fonts-4.6.0.jar"/> <classpathentry exported="true" kind="lib" path="lib/jasperreports-fonts-4.6.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.0.jar"/> <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commons-digester-2.1.jar"/> <classpathentry exported="true" kind="lib" path="lib/commons-digester-2.1.jar"/>

View File

@ -7,7 +7,11 @@ Bundle-ClassPath: lib/commons-beanutils-1.8.0.jar,
lib/commons-digester-2.1.jar, lib/commons-digester-2.1.jar,
lib/jasperreports-4.6.0.jar, lib/jasperreports-4.6.0.jar,
lib/jdt-compiler-3.1.1.jar, lib/jdt-compiler-3.1.1.jar,
lib/jasperreports-fonts-4.6.0.jar lib/jasperreports-fonts-4.6.0.jar,
lib/barcode4j-2.0.jar,
lib/jackson-core-asl-1.9.4.jar,
lib/jackson-mapper-asl-1.9.4.jar,
lib/xalan.jar
Export-Package: ., Export-Package: .,
net.sf.jasperreports.ant, net.sf.jasperreports.ant,
net.sf.jasperreports.charts, net.sf.jasperreports.charts,
@ -175,15 +179,124 @@ Import-Package: com.lowagie.text,
groovyjarjarasm.asm.signature, groovyjarjarasm.asm.signature,
groovyjarjarasm.asm.tree, groovyjarjarasm.asm.tree,
groovyjarjarcommonscli, groovyjarjarcommonscli,
org.apache.batik;version="17.0.0",
org.apache.batik.anim;version="1.7.0",
org.apache.batik.anim.timing;version="1.7.0",
org.apache.batik.anim.values;version="1.7.0",
org.apache.batik.bridge;version="1.7.0",
org.apache.batik.bridge.resources;version="1.7.0",
org.apache.batik.bridge.svg12;version="1.7.0",
org.apache.batik.css.dom;version="1.7.0",
org.apache.batik.css.engine;version="1.7.0",
org.apache.batik.css.engine.resources;version="1.7.0",
org.apache.batik.css.engine.sac;version="1.7.0",
org.apache.batik.css.engine.value;version="1.7.0",
org.apache.batik.css.engine.value.css2;version="1.7.0",
org.apache.batik.css.engine.value.resources;version="1.7.0",
org.apache.batik.css.engine.value.svg;version="1.7.0",
org.apache.batik.css.engine.value.svg12;version="1.7.0",
org.apache.batik.css.parser;version="1.7.0",
org.apache.batik.css.parser.resources;version="1.7.0",
org.apache.batik.dom;version="1.7.0",
org.apache.batik.dom.anim;version="1.7.0",
org.apache.batik.dom.events;version="1.7.0",
org.apache.batik.dom.resources;version="1.7.0",
org.apache.batik.dom.svg;version="1.7.0",
org.apache.batik.dom.svg.resources;version="1.7.0",
org.apache.batik.dom.svg12;version="1.7.0",
org.apache.batik.dom.traversal;version="1.7.0",
org.apache.batik.dom.util;version="1.7.0",
org.apache.batik.dom.xbl;version="1.7.0",
org.apache.batik.ext.awt;version="1.7.0",
org.apache.batik.ext.awt.color;version="1.7.0",
org.apache.batik.ext.awt.font;version="1.7.0",
org.apache.batik.ext.awt.g2d;version="1.7.0",
org.apache.batik.ext.awt.geom;version="1.7.0",
org.apache.batik.ext.awt.image;version="1.7.0",
org.apache.batik.ext.awt.image.codec;version="1.7.0",
org.apache.batik.ext.awt.image.codec.jpeg;version="1.7.0",
org.apache.batik.ext.awt.image.codec.png;version="1.7.0",
org.apache.batik.ext.awt.image.codec.tiff;version="1.7.0",
org.apache.batik.ext.awt.image.codec.util;version="1.7.0",
org.apache.batik.ext.awt.image.renderable;version="1.7.0",
org.apache.batik.ext.awt.image.rendered;version="1.7.0",
org.apache.batik.ext.awt.image.spi;version="1.7.0",
org.apache.batik.ext.awt.image.spi.resources;version="1.7.0",
org.apache.batik.ext.swing;version="1.7.0",
org.apache.batik.ext.swing.resources;version="1.7.0",
org.apache.batik.extension;version="1.7.0",
org.apache.batik.extension.svg;version="1.7.0",
org.apache.batik.gvt;version="1.7.0",
org.apache.batik.gvt.event;version="1.7.0",
org.apache.batik.gvt.filter;version="1.7.0",
org.apache.batik.gvt.flow;version="1.7.0",
org.apache.batik.gvt.font;version="1.7.0",
org.apache.batik.gvt.renderer;version="1.7.0",
org.apache.batik.gvt.svg12;version="1.7.0",
org.apache.batik.gvt.text;version="1.7.0",
org.apache.batik.i18n;version="1.7.0",
org.apache.batik.parser;version="1.7.0",
org.apache.batik.parser.resources;version="1.7.0",
org.apache.batik.parser.style.resources;version="1.7.0",
org.apache.batik.script;version="1.7.0",
org.apache.batik.script.rhino;version="1.7.0",
org.apache.batik.script.rhino.resources;version="1.7.0",
org.apache.batik.script.rhino.svg12;version="1.7.0",
org.apache.batik.util;version="1.7.0",
org.apache.batik.util.gui;version="1.7.0",
org.apache.batik.util.gui.resource;version="1.7.0",
org.apache.batik.util.gui.resources;version="1.7.0",
org.apache.batik.util.gui.resources.flags;version="1.7.0",
org.apache.batik.util.gui.xmleditor;version="1.7.0",
org.apache.batik.util.io;version="1.7.0",
org.apache.batik.util.io.resources;version="1.7.0",
org.apache.batik.util.resources;version="1.7.0",
org.apache.batik.xml;version="1.7.0",
org.apache.batik.xml.scanner.resources;version="1.7.0",
org.apache.commons.codec;version="1.3.0", org.apache.commons.codec;version="1.3.0",
org.apache.commons.codec.binary;version="1.3.0", org.apache.commons.codec.binary;version="1.3.0",
org.apache.commons.collections, org.apache.commons.collections,
org.apache.commons.logging;version="1.1.1", org.apache.commons.logging;version="1.1.1",
org.apache.commons.logging.impl;version="1.1.1", org.apache.commons.logging.impl;version="1.1.1",
org.apache.html.dom,
org.apache.poi.hssf.usermodel;version="3.7.0", org.apache.poi.hssf.usermodel;version="3.7.0",
org.apache.poi.hssf.util;version="3.7.0", org.apache.poi.hssf.util;version="3.7.0",
org.apache.poi.ss.usermodel;version="3.7.0", org.apache.poi.ss.usermodel;version="3.7.0",
org.apache.poi.ss.util;version="3.7.0", org.apache.poi.ss.util;version="3.7.0",
org.apache.xerces.dom;version="2.9.0",
org.apache.xerces.dom.events;version="2.9.0",
org.apache.xerces.dom3.as;version="2.9.0",
org.apache.xerces.impl;version="2.9.0",
org.apache.xerces.impl.dtd;version="2.9.0",
org.apache.xerces.impl.dtd.models;version="2.9.0",
org.apache.xerces.impl.dv;version="2.9.0",
org.apache.xerces.impl.dv.dtd;version="2.9.0",
org.apache.xerces.impl.dv.util;version="2.9.0",
org.apache.xerces.impl.dv.xs;version="2.9.0",
org.apache.xerces.impl.io;version="2.9.0",
org.apache.xerces.impl.msg;version="2.9.0",
org.apache.xerces.impl.validation;version="2.9.0",
org.apache.xerces.impl.xpath;version="2.9.0",
org.apache.xerces.impl.xpath.regex;version="2.9.0",
org.apache.xerces.impl.xs;version="2.9.0",
org.apache.xerces.impl.xs.identity;version="2.9.0",
org.apache.xerces.impl.xs.models;version="2.9.0",
org.apache.xerces.impl.xs.opti;version="2.9.0",
org.apache.xerces.impl.xs.traversers;version="2.9.0",
org.apache.xerces.impl.xs.util;version="2.9.0",
org.apache.xerces.jaxp;version="2.9.0",
org.apache.xerces.jaxp.datatype;version="2.9.0",
org.apache.xerces.jaxp.validation;version="2.9.0",
org.apache.xerces.parsers;version="2.9.0",
org.apache.xerces.util;version="2.9.0",
org.apache.xerces.xinclude;version="2.9.0",
org.apache.xerces.xni;version="2.9.0",
org.apache.xerces.xni.grammars;version="2.9.0",
org.apache.xerces.xni.parser;version="2.9.0",
org.apache.xerces.xpointer;version="2.9.0",
org.apache.xerces.xs;version="2.9.0",
org.apache.xerces.xs.datatypes;version="2.9.0",
org.apache.xml.serialize;version="2.9.0",
org.codehaus.groovy, org.codehaus.groovy,
org.codehaus.groovy.ant, org.codehaus.groovy.ant,
org.codehaus.groovy.antlr, org.codehaus.groovy.antlr,
@ -215,7 +328,23 @@ Import-Package: com.lowagie.text,
org.codehaus.groovy.tools.xml, org.codehaus.groovy.tools.xml,
org.codehaus.groovy.vmplugin, org.codehaus.groovy.vmplugin,
org.codehaus.groovy.vmplugin.v4, org.codehaus.groovy.vmplugin.v4,
org.codehaus.groovy.vmplugin.v5 org.codehaus.groovy.vmplugin.v5,
org.w3c.css.sac;version="1.3.0",
org.w3c.css.sac.helpers;version="1.3.0",
org.w3c.dom;version="3.0.0",
org.w3c.dom.bootstrap;version="3.0.0",
org.w3c.dom.css;version="2.0.0",
org.w3c.dom.events;version="3.0.0",
org.w3c.dom.html;version="2.9.0",
org.w3c.dom.ls;version="2.0.0",
org.w3c.dom.ranges;version="2.0.0",
org.w3c.dom.smil;version="1.0.0",
org.w3c.dom.stylesheets;version="2.0.0",
org.w3c.dom.svg;version="1.1.0",
org.w3c.dom.traversal;version="2.0.0",
org.w3c.dom.views;version="2.0.0",
org.w3c.dom.xpath;version="3.0.0",
org.w3c.tools.codec
DynamicImport-Package: * DynamicImport-Package: *

View File

@ -3,4 +3,8 @@ bin.includes = META-INF/,\
lib/commons-digester-2.1.jar,\ lib/commons-digester-2.1.jar,\
lib/jasperreports-4.6.0.jar,\ lib/jasperreports-4.6.0.jar,\
lib/jdt-compiler-3.1.1.jar,\ lib/jdt-compiler-3.1.1.jar,\
lib/jasperreports-fonts-4.6.0.jar lib/jasperreports-fonts-4.6.0.jar,\
lib/barcode4j-2.0.jar,\
lib/jackson-core-asl-1.9.4.jar,\
lib/jackson-mapper-asl-1.9.4.jar,\
lib/xalan.jar

View File

@ -3,6 +3,7 @@
*/ */
package org.compiere.report; package org.compiere.report;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.File; import java.io.File;
@ -19,6 +20,7 @@ import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JRExporterParameter;
import net.sf.jasperreports.engine.JasperExportManager; import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.export.JRXlsExporter; import net.sf.jasperreports.engine.export.JRXlsExporter;
import net.sf.jasperreports.view.JRViewer; import net.sf.jasperreports.view.JRViewer;
@ -85,6 +87,21 @@ public class JasperReportViewer extends JRViewer {
public String getFormat() { public String getFormat() {
return (String) comboBox.getSelectedItem(); return (String) comboBox.getSelectedItem();
} }
@Override
protected void paintPage(Graphics2D grx) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(JasperReport.class.getClassLoader());
super.paintPage(grx);
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
} }
class ExportListener implements ActionListener { class ExportListener implements ActionListener {

View File

@ -335,7 +335,7 @@ public class ReportStarter implements ProcessCall, ClientProcess
public boolean startProcess(Properties ctx, ProcessInfo pi, Trx trx) public boolean startProcess(Properties ctx, ProcessInfo pi, Trx trx)
{ {
ClassLoader cl1 = Thread.currentThread().getContextClassLoader(); ClassLoader cl1 = Thread.currentThread().getContextClassLoader();
ClassLoader cl2 = getClass().getClassLoader(); ClassLoader cl2 = JasperReport.class.getClassLoader();
try { try {
if (!cl1.equals(cl2)) { if (!cl1.equals(cl2)) {
Thread.currentThread().setContextClassLoader(cl2); Thread.currentThread().setContextClassLoader(cl2);
@ -464,7 +464,10 @@ public class ReportStarter implements ProcessCall, ClientProcess
newQuery.setText(newQueryText); newQuery.setText(newQueryText);
jasperDesign.setQuery(newQuery); jasperDesign.setQuery(newQuery);
JasperReport newJasperReport = JasperCompileManager.compileReport(jasperDesign); LocalJasperReportsContext context = new LocalJasperReportsContext(DefaultJasperReportsContext.getInstance());
context.setClassLoader(JasperReport.class.getClassLoader());
JasperCompileManager manager = JasperCompileManager.getInstance(context);
JasperReport newJasperReport = manager.compile(jasperDesign);
if (newJasperReport != null) if (newJasperReport != null)
{ {
data.jasperReport = newJasperReport; data.jasperReport = newJasperReport;
@ -1115,12 +1118,21 @@ public class ReportStarter implements ProcessCall, ClientProcess
params.put( name, pDate); params.put( name, pDate);
} }
} else if (pNum != null) { } else if (pNum != null) {
if (pNumTo!=null) { if (name.endsWith("_ID")) {
params.put( name+"1", pNum); if (pNumTo!=null) {
params.put( name+"2", pNumTo); params.put( name+"1", pNum.intValue());
} else { params.put( name+"2", pNumTo.intValue());
params.put( name, pNum); } else {
} params.put( name, pNum.intValue());
}
} else {
if (pNumTo!=null) {
params.put( name+"1", pNum);
params.put( name+"2", pNumTo);
} else {
params.put( name, pNum);
}
}
} }
// //
// Add parameter info - teo_sarca FR [ 2581145 ] // Add parameter info - teo_sarca FR [ 2581145 ]
@ -1166,7 +1178,10 @@ public class ReportStarter implements ProcessCall, ClientProcess
{ {
JasperReport compiledJasperReport = null; JasperReport compiledJasperReport = null;
try { try {
JasperCompileManager.compileReportToFile ( reportFile.getAbsolutePath(), jasperFile.getAbsolutePath() ); LocalJasperReportsContext context = new LocalJasperReportsContext(DefaultJasperReportsContext.getInstance());
context.setClassLoader(JasperReport.class.getClassLoader());
JasperCompileManager manager = JasperCompileManager.getInstance(context);
manager.compileToFile(reportFile.getAbsolutePath(), jasperFile.getAbsolutePath() );
jasperFile.setLastModified( reportFile.lastModified()); //Synchronize Dates jasperFile.setLastModified( reportFile.lastModified()); //Synchronize Dates
compiledJasperReport = (JasperReport)JRLoader.loadObject(jasperFile); compiledJasperReport = (JasperReport)JRLoader.loadObject(jasperFile);
} catch (JRException e) { } catch (JRException e) {

View File

@ -0,0 +1,599 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="order" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="db2efa48-138d-4614-b1c3-b68f8e669704">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="detail PO" uuid="70ac1f63-d6ec-4267-8ee5-c6516caaefba">
<parameter name="RECORD_ID" class="java.lang.Integer"/>
<queryString>
<![CDATA[SELECT l.ad_client_id, l.ad_org_id, l.c_order_id, l.description, l.qtyordered, c_uom.name AS uom, l.pricelist, l.priceactual AS unitprice, l.discount, l.linenetamt AS total, p.value AS itemcode, p.name AS itemname, p.sku AS itemno, p.name AS productname, c.name AS chargename, p.value AS product_code, l.linenetamt-(l.priceactual*l.qtyordered) AS vat
FROM c_orderline l
JOIN c_uom ON l.c_uom_id = c_uom.c_uom_id
LEFT JOIN m_product p ON l.m_product_id = p.m_product_id
LEFT JOIN c_charge c ON l.c_charge_id = c.c_charge_id
where l.c_order_id=$P{RECORD_ID}]]>
</queryString>
<field name="ad_client_id" class="java.math.BigDecimal"/>
<field name="ad_org_id" class="java.math.BigDecimal"/>
<field name="c_order_id" class="java.math.BigDecimal"/>
<field name="description" class="java.lang.String"/>
<field name="qtyordered" class="java.math.BigDecimal"/>
<field name="uom" class="java.lang.String"/>
<field name="pricelist" class="java.math.BigDecimal"/>
<field name="unitprice" class="java.math.BigDecimal"/>
<field name="discount" class="java.math.BigDecimal"/>
<field name="total" class="java.math.BigDecimal"/>
<field name="itemcode" class="java.lang.String"/>
<field name="itemname" class="java.lang.String"/>
<field name="itemno" class="java.math.BigDecimal"/>
<field name="productname" class="java.lang.String"/>
<field name="chargename" class="java.lang.String"/>
<field name="product_code" class="java.lang.String"/>
<field name="vat" class="java.math.BigDecimal"/>
</subDataset>
<parameter name="RECORD_ID" class="java.lang.Integer">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select c_order.ad_client_id, c_order.ad_org_id, c_order.c_order_id, ad_client.name AS clientname, ad_org.name AS org_name, c_order.documentno, c_order.dateordered, c_order.datepromised, c_order.c_currency_id, c_currency.iso_code, c_order.createdby, c_bpartner.value AS bp_code, c_bpartner.name AS bp_name, c_order.poreference, c_order.totallines, c_order.grandtotal
FROM c_order
JOIN ad_client ON c_order.ad_client_id = ad_client.ad_client_id
JOIN ad_org ON c_order.ad_org_id = ad_org.ad_org_id
JOIN c_currency ON c_order.c_currency_id = c_currency.c_currency_id
JOIN c_bpartner ON c_order.c_bpartner_id = c_bpartner.c_bpartner_id
where c_order.c_order_id=$P{RECORD_ID}]]>
</queryString>
<field name="ad_client_id" class="java.math.BigDecimal"/>
<field name="ad_org_id" class="java.math.BigDecimal"/>
<field name="clientname" class="java.lang.String"/>
<field name="org_name" class="java.lang.String"/>
<field name="c_order_id" class="java.math.BigDecimal"/>
<field name="documentno" class="java.lang.String"/>
<field name="dateordered" class="java.sql.Timestamp"/>
<field name="datepromised" class="java.sql.Timestamp"/>
<field name="c_currency_id" class="java.math.BigDecimal"/>
<field name="iso_code" class="java.lang.String"/>
<field name="createdby" class="java.lang.String"/>
<field name="bp_code" class="java.lang.String"/>
<field name="bp_name" class="java.lang.String"/>
<field name="poreference" class="java.lang.String"/>
<field name="totallines" class="java.math.BigDecimal"/>
<field name="grandtotal" class="java.math.BigDecimal"/>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="21" splitType="Stretch">
<staticText>
<reportElement uuid="b0c9ba47-c853-4d04-89db-c572790b5510" positionType="Float" mode="Transparent" x="0" y="0" width="555" height="20"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[PURCHASE ORDER]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="111" splitType="Stretch">
<staticText>
<reportElement uuid="0423b2a8-b9a8-4be9-af66-84df73a61cc2" x="169" y="21" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="68fd2c24-1b89-4f55-b404-29091f022afe" positionType="Float" mode="Transparent" x="86" y="46" width="85" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Organization]]></text>
</staticText>
<staticText>
<reportElement uuid="1ca82024-b1e7-4228-85e9-39f35c6b9ece" positionType="Float" mode="Transparent" x="86" y="58" width="83" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Date Ordered]]></text>
</staticText>
<staticText>
<reportElement uuid="0d11ce23-5298-473f-bd74-0947ab9d9690" positionType="Float" mode="Transparent" x="86" y="71" width="83" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Date Promised]]></text>
</staticText>
<staticText>
<reportElement uuid="8d5d4e50-5ded-4106-9fd2-51b804b1ed8d" positionType="Float" mode="Transparent" x="86" y="83" width="83" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Currency]]></text>
</staticText>
<staticText>
<reportElement uuid="1eb82c57-1435-4918-927c-9b9bbec5ab71" positionType="Float" mode="Transparent" x="329" y="21" width="85" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Order Reference]]></text>
</staticText>
<staticText>
<reportElement uuid="d91c14f6-b025-48cf-94aa-e0c54dae485e" positionType="Float" mode="Transparent" x="329" y="33" width="85" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Warehouse]]></text>
</staticText>
<staticText>
<reportElement uuid="ab25618d-a1e9-47dd-9c16-f47ff5e32305" positionType="Float" mode="Transparent" x="329" y="45" width="85" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Price List]]></text>
</staticText>
<staticText>
<reportElement uuid="e0ff362a-0768-4721-8d62-4689e0cb7ddd" positionType="Float" mode="Transparent" x="329" y="57" width="85" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Priority]]></text>
</staticText>
<staticText>
<reportElement uuid="a77e0601-7ae2-4755-827d-2cc12034bb28" x="169" y="46" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="2b997a86-a418-42eb-b3f7-3712f5e8d9f8" x="169" y="58" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="76b05aef-8336-44e7-bcf0-a361a1a0fd6e" x="169" y="70" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="4badd703-c9d3-4836-82ce-f88142fc5bf8" x="169" y="83" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="19d5b55a-529a-4fcc-ad8d-98f75782b15a" x="412" y="21" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="f0a76e09-7b1b-4bfd-9002-37736f8f72ab" x="412" y="34" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="66517778-508a-4022-bddd-909c50a4cf92" x="412" y="46" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="e0e356fe-d311-49c6-9318-7a3fa5ba73df" x="412" y="57" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="4c11c9fb-7651-463f-818f-b37c282d83ca" positionType="Float" mode="Transparent" x="86" y="21" width="83" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Document No]]></text>
</staticText>
<staticText>
<reportElement uuid="9488f721-aa65-4593-9bac-3b884af40bfa" positionType="Float" mode="Transparent" x="86" y="34" width="83" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Business Partner]]></text>
</staticText>
<staticText>
<reportElement uuid="3d9e68ae-dad2-4505-8b04-4f9db05d165e" x="169" y="34" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="c79b0bc7-f5e7-42f4-833c-7bf5ba61df97" positionType="Float" mode="Transparent" x="329" y="69" width="85" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Apporve]]></text>
</staticText>
<staticText>
<reportElement uuid="bf85e6e7-f66c-440d-8056-ee165e383fa7" positionType="Float" mode="Transparent" x="329" y="81" width="85" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Company Agent]]></text>
</staticText>
<staticText>
<reportElement uuid="be729c91-7084-4cac-9d88-d51d1a5ba1e5" x="412" y="69" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<staticText>
<reportElement uuid="93ca19fa-8cd0-4d84-9125-63dc36ed2c79" x="412" y="81" width="13" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[:]]></text>
</staticText>
<textField>
<reportElement uuid="5f148f2f-ae0b-4175-9e23-6310d80ec2de" x="182" y="21" width="100" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{documentno}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fcac223e-4e06-47da-a5f5-14908c6861ff" x="182" y="34" width="100" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{bp_name}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="628f7554-73b0-4a6c-a557-a8e0417ed309" x="182" y="46" width="100" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{org_name}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="5c247a23-bee7-4932-8247-6dcc4c7ad6e8" x="182" y="58" width="100" height="12"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{dateordered}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="260aa4ec-4487-4188-8a96-c72a99f299af" x="182" y="69" width="100" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{datepromised}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="baaaae47-8d96-4289-a66f-f6a64a7062c2" x="182" y="82" width="100" height="13"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{c_currency_id}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b195ddeb-7010-4d19-b689-b846a429f8ff" x="424" y="21" width="100" height="13"/>
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{poreference}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="21" splitType="Stretch">
<componentElement>
<reportElement uuid="29ac857a-e910-46bd-a735-ef60875a5e51" key="table" style="table" x="0" y="0" width="555" height="21"/>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="detail PO" uuid="2419b5b2-b2c2-42ab-bdb9-4d55ec2c9e7d">
<datasetParameter name="RECORD_ID">
<datasetParameterExpression><![CDATA[$P{RECORD_ID}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column uuid="61f31c32-255c-41c3-a159-c93370fe248c" width="32">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="2be463b4-b248-442e-8bb8-e864b2f77405" x="0" y="0" width="32" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[No.]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="aec6509c-41ea-4896-a21e-2eb109a36451" x="0" y="0" width="32" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[" "+$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="756b0f6e-a731-4372-83fa-b8c6b8bb5abc" width="120">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="66816585-0a0a-493a-a380-c8aa891750ee" x="0" y="0" width="120" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Product]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="0b96c812-ebc5-492c-a9a4-fcba4ef15aad" x="4" y="0" width="112" height="20"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{productname}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="8ecde6eb-3074-4a0f-ba80-b5d7cb63580d" width="45">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="4a8689cb-c6ec-4d12-9605-fe44cb19e9a2" x="0" y="0" width="45" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Qty]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="84ec447a-5fd3-468e-bbd0-5c23fe802570" x="0" y="0" width="41" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{qtyordered}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="ab45450b-6567-4c9a-bfb3-01e2b597cb16" width="53">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="20976b31-4b0f-44c3-ac96-4853b5394aa4" x="0" y="0" width="53" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[UOM]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement uuid="18864403-ec76-4b22-9da4-aea03282a4c8" x="0" y="0" width="53" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{uom}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="9b9eb66f-dd02-4107-92fe-163758632efd" width="62">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="c934259c-6670-47ea-84b1-19d5f827a038" x="0" y="0" width="62" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[List Price]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="0986eca7-c258-4f82-8d35-c1453b112a84" x="0" y="0" width="58" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{pricelist}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="c5a302ec-b76d-4b94-b442-b3c388e02637" width="54">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="d9f067a3-d955-46eb-bb2a-2ec64ca7b5cd" x="0" y="0" width="54" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Disc %]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="09f81e81-3ad0-4c97-8067-f41912c127e3" x="0" y="0" width="54" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{discount}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="1c71790a-2471-4249-bb3c-85dc480e2dda" width="60">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="a74f7336-05fe-4f66-930e-7e275cadaf08" x="0" y="0" width="60" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Unit Price]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="04f37ec5-1736-45de-9d25-421a424bced7" x="0" y="0" width="56" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{unitprice}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="a3554421-98c5-4ce9-8e96-72b015fa83ef" width="54">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="4654ffe8-bc71-45c9-b141-fc31451562f3" x="0" y="0" width="54" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Tax]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="69885232-c326-4626-bc17-22d920bba721" x="0" y="0" width="50" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{vat}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column uuid="bf1a77f2-c636-4fed-9bc0-230979dbf059" width="73">
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement uuid="1373137e-6dae-432d-a1b5-1c3d3f5b1a93" x="0" y="0" width="73" height="30"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Line Amount]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement uuid="f1027d70-5558-4d9b-9162-25630b832ab0" x="0" y="0" width="69" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<columnFooter>
<band height="5" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="23">
<textField>
<reportElement uuid="888f25cd-866c-42c1-913d-44a47a4f4439" x="437" y="0" width="80" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement uuid="6850a5a5-8611-42a5-87d4-c7183173d33c" x="517" y="0" width="40" height="20"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="81">
<staticText>
<reportElement uuid="7941b978-728f-41ab-bd83-741a99b613e2" positionType="Float" mode="Transparent" x="399" y="0" width="56" height="20"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Total]]></text>
</staticText>
<textField>
<reportElement uuid="7e97f801-f855-4cd5-9707-185e36642809" x="99" y="61" width="94" height="20"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{clientname}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="7f69f3cb-6b45-4a7c-9494-5b389b9c4e97" positionType="Float" mode="Transparent" x="33" y="61" width="66" height="20"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Created by :]]></text>
</staticText>
<staticText>
<reportElement uuid="7941b978-728f-41ab-bd83-741a99b613e2" positionType="Float" mode="Transparent" x="399" y="20" width="56" height="20"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[VAT]]></text>
</staticText>
<staticText>
<reportElement uuid="7941b978-728f-41ab-bd83-741a99b613e2" positionType="Float" mode="Transparent" x="399" y="40" width="56" height="20"/>
<textElement verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<text><![CDATA[Grand Total]]></text>
</staticText>
<line>
<reportElement uuid="772855b7-2c8b-4c08-8166-adc97305329e" x="399" y="39" width="150" height="1"/>
</line>
<line>
<reportElement uuid="772855b7-2c8b-4c08-8166-adc97305329e" x="399" y="41" width="150" height="1"/>
</line>
<textField>
<reportElement uuid="6280e14a-e301-4516-93c3-2531e8468204" x="455" y="0" width="94" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{totallines}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2c61166b-3b80-411f-8596-bc9ab63fc9ca" x="455" y="42" width="94" height="18"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{grandtotal}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1304afd4-bed0-4a6c-afc8-0f08bf0df3eb" x="455" y="19" width="94" height="20"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{grandtotal}-$F{totallines}]]></textFieldExpression>
</textField>
</band>
</summary>
</jasperReport>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="barcode" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[Select m_product_id from m_product where m_product_id=129]]>
</queryString>
<field name="m_product_id" class="java.math.BigDecimal"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="107" splitType="Stretch">
<componentElement>
<reportElement x="63" y="32" width="85" height="50"/>
<jr:Codabar xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" textPosition="bottom">
<jr:codeExpression><![CDATA[$F{m_product_id}]]></jr:codeExpression>
</jr:Codabar>
</componentElement>
</band>
</columnHeader>
<detail>
<band height="125" splitType="Stretch"/>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,13 +16,13 @@
<stringAttribute key="location" value="${workspace_loc}/../runtime-swingclient.product"/> <stringAttribute key="location" value="${workspace_loc}/../runtime-swingclient.product"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal&#10;-Dsun.awt.disablegrab=true"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal&#10;-Dsun.awt.disablegrab=true -Dosgi.compatibility.bootdelegation=true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/> <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
<stringAttribute key="pde.version" value="3.3"/> <stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.adempiere.ui.swing.client_product"/> <stringAttribute key="product" value="org.adempiere.ui.swing.client_product"/>
<stringAttribute key="productFile" value="/org.adempiere.ui.swing-feature/swingclient.product"/> <stringAttribute key="productFile" value="/org.adempiere.ui.swing-feature/swingclient.product"/>
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,com.springsource.org.apache.xmlcommons@default:default,com.springsource.slf4j.api@default:default,com.springsource.slf4j.jcl@default:false,com.springsource.slf4j.nop@default:false,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@3:true,org.eclipse.equinox.event@3:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@3:true,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet*2.1.0.v20130114-0123@default:true,org.restlet.ext.net*2.1.0.v20130114-0123@default:true,org.restlet.ext.servlet*2.1.0.v20130114-0123@default:default,org.restlet.ext.ssl@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/> <stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,com.springsource.org.apache.xmlcommons@default:default,com.springsource.slf4j.api@default:default,com.springsource.slf4j.jcl@default:false,com.springsource.slf4j.nop@default:false,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.bridge@default:default,org.apache.batik.css@default:default,org.apache.batik.dom.svg@default:default,org.apache.batik.dom@default:default,org.apache.batik.ext.awt@default:default,org.apache.batik.extension@default:default,org.apache.batik.parser@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.batik.xml@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@3:true,org.eclipse.equinox.event@3:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@3:true,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet.ext.net@default:true,org.restlet.ext.servlet@default:default,org.restlet.ext.ssl@default:default,org.restlet@default:true,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default,org.w3c.css.sac@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.adempiere.base.callout@default:default,org.adempiere.base.process@default:default,org.adempiere.base@4:true,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.payment.processor@default:default,org.adempiere.pipo.handlers@default:default,org.adempiere.pipo@default:default,org.adempiere.plugin.utils@default:default,org.adempiere.replication@default:default,org.adempiere.report.jasper.font.demo@default:false,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper.swing@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing@default:default,org.adempiere.ui@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.idempiere.hazelcast.service.config@default:false,org.idempiere.hazelcast.service@default:true,org.idempiere.webservices@default:default"/> <stringAttribute key="selected_workspace_plugins" value="org.adempiere.base.callout@default:default,org.adempiere.base.process@default:default,org.adempiere.base@4:true,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.payment.processor@default:default,org.adempiere.pipo.handlers@default:default,org.adempiere.pipo@default:default,org.adempiere.plugin.utils@default:default,org.adempiere.replication@default:default,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper.swing@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing@default:default,org.adempiere.ui@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.idempiere.hazelcast.service.config@default:false,org.idempiere.hazelcast.service@default:true,org.idempiere.webservices@default:default,org.w3c.dom.fragment@default:false"/>
<booleanAttribute key="show_selected_only" value="false"/> <booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/> <booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/> <booleanAttribute key="useCustomFeatures" value="false"/>

View File

@ -8,7 +8,12 @@ Bundle-ClassPath: client.jar,
looks-2.0.4.jar, looks-2.0.4.jar,
miglayout-3.7.1-swing.jar, miglayout-3.7.1-swing.jar,
jpedal.jar jpedal.jar
Export-Package: de.schaeffer.compiere.tools, Export-Package: com.jgoodies.looks,
com.jgoodies.looks.common,
com.jgoodies.looks.plastic,
com.jgoodies.looks.plastic.theme,
com.jgoodies.looks.windows,
de.schaeffer.compiere.tools,
net.miginfocom.layout, net.miginfocom.layout,
net.miginfocom.swing, net.miginfocom.swing,
org.adempiere.apps.graph, org.adempiere.apps.graph,

View File

@ -48,6 +48,7 @@ import javax.swing.JMenu;
import javax.swing.JMenuBar; import javax.swing.JMenuBar;
import javax.swing.JProgressBar; import javax.swing.JProgressBar;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
@ -110,7 +111,10 @@ public final class AMenu extends CFrame
public AMenu () public AMenu ()
{ {
super(); super();
if (log.isLoggable(Level.INFO)) log.info("CodeBase=" + Adempiere.getCodeBase()); if (log.isLoggable(Level.INFO)) log.info("CodeBase=" + Adempiere.getCodeBase());
UIManager.put( "ClassLoader", this.getClass().getClassLoader());
Splash splash = Splash.getSplash(); Splash splash = Splash.getSplash();
// //
m_WindowNo = AEnv.createWindowNo(this); m_WindowNo = AEnv.createWindowNo(this);

View File

@ -6,14 +6,17 @@ import java.util.logging.Level;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import net.sf.jasperreports.engine.DefaultJasperReportsContext;
import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JRExporterParameter;
import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.export.JRCsvExporter; import net.sf.jasperreports.engine.export.JRCsvExporter;
import net.sf.jasperreports.engine.export.JRHtmlExporter; import net.sf.jasperreports.engine.export.JRHtmlExporter;
import net.sf.jasperreports.engine.export.JRHtmlExporterParameter; import net.sf.jasperreports.engine.export.JRHtmlExporterParameter;
import net.sf.jasperreports.engine.export.JRPdfExporter; import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.engine.export.JRXlsExporter; import net.sf.jasperreports.engine.export.JRXlsExporter;
import net.sf.jasperreports.engine.export.JRXlsExporterParameter; import net.sf.jasperreports.engine.export.JRXlsExporterParameter;
import net.sf.jasperreports.engine.util.LocalJasperReportsContext;
import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.component.Listbox; import org.adempiere.webui.component.Listbox;
@ -138,75 +141,82 @@ public class ZkJRViewer extends Window implements EventListener<Event>, ITabOnCl
} }
private void renderReport() throws Exception { private void renderReport() throws Exception {
Listitem selected = previewType.getSelectedItem(); ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (selected == null || "PDF".equals(selected.getValue())) { try {
String path = System.getProperty("java.io.tmpdir"); Thread.currentThread().setContextClassLoader(JasperReport.class.getClassLoader());
String prefix = makePrefix(jasperPrint.getName()); Listitem selected = previewType.getSelectedItem();
if (log.isLoggable(Level.FINE)) if (selected == null || "PDF".equals(selected.getValue())) {
{ String path = System.getProperty("java.io.tmpdir");
log.log(Level.FINE, "Path="+path + " Prefix="+prefix); String prefix = makePrefix(jasperPrint.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = File.createTempFile(prefix, ".pdf", new File(path));
LocalJasperReportsContext context = new LocalJasperReportsContext(DefaultJasperReportsContext.getInstance());
context.setClassLoader(JRPdfExporter.class.getClassLoader());
JRPdfExporter exporter = new JRPdfExporter(context);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, file.getAbsolutePath());
exporter.exportReport();
media = new AMedia(getTitle(), "pdf", "application/pdf", file, true);
} else if ("HTML".equals(previewType.getSelectedItem().getValue())) {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(jasperPrint.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = File.createTempFile(prefix, ".html", new File(path));
JRHtmlExporter exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE, file);
// Make images available for the HTML output
exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, Executions.getCurrent().getDesktop().getSession().getWebApp().getRealPath("/images/report/"));
HttpServletRequest request = (HttpServletRequest)Executions.getCurrent().getNativeRequest();
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath()+"/images/report/");
exporter.exportReport();
media = new AMedia(getTitle(), "html", "text/html", file, false);
} else if ("XLS".equals(previewType.getSelectedItem().getValue())) {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(jasperPrint.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = File.createTempFile(prefix, ".xls", new File(path));
FileOutputStream fos = new FileOutputStream(file);
// coding For Excel:
JRXlsExporter exporterXLS = new JRXlsExporter();
exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, fos);
exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterXLS.exportReport();
media = new AMedia(getTitle(), "xls", "application/vnd.ms-excel", file, true);
}else if ("CSV".equals(previewType.getSelectedItem().getValue())) {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(jasperPrint.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = File.createTempFile(prefix, ".csv", new File(path));
FileOutputStream fos = new FileOutputStream(file);
JRCsvExporter exporter= new JRCsvExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, fos);
exporter.exportReport();
media = new AMedia(getTitle(), "csv", "application/csv", file, true);
} }
File file = File.createTempFile(prefix, ".pdf", new File(path)); } finally {
JRPdfExporter exporter = new JRPdfExporter(); Thread.currentThread().setContextClassLoader(cl);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, file.getAbsolutePath());
exporter.setParameter(JRExporterParameter.CLASS_LOADER, exporter.getClass().getClassLoader());
exporter.exportReport();
media = new AMedia(getTitle(), "pdf", "application/pdf", file, true);
} else if ("HTML".equals(previewType.getSelectedItem().getValue())) {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(jasperPrint.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = File.createTempFile(prefix, ".html", new File(path));
JRHtmlExporter exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE, file);
// Make images available for the HTML output
exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, Executions.getCurrent().getDesktop().getSession().getWebApp().getRealPath("/images/report/"));
HttpServletRequest request = (HttpServletRequest)Executions.getCurrent().getNativeRequest();
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath()+"/images/report/");
exporter.exportReport();
media = new AMedia(getTitle(), "html", "text/html", file, false);
} else if ("XLS".equals(previewType.getSelectedItem().getValue())) {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(jasperPrint.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = File.createTempFile(prefix, ".xls", new File(path));
FileOutputStream fos = new FileOutputStream(file);
// coding For Excel:
JRXlsExporter exporterXLS = new JRXlsExporter();
exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, fos);
exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterXLS.exportReport();
media = new AMedia(getTitle(), "xls", "application/vnd.ms-excel", file, true);
}else if ("CSV".equals(previewType.getSelectedItem().getValue())) {
String path = System.getProperty("java.io.tmpdir");
String prefix = makePrefix(jasperPrint.getName());
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
}
File file = File.createTempFile(prefix, ".csv", new File(path));
FileOutputStream fos = new FileOutputStream(file);
JRCsvExporter exporter= new JRCsvExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, fos);
exporter.exportReport();
media = new AMedia(getTitle(), "csv", "application/csv", file, true);
} }
iframe.setSrc(null); iframe.setSrc(null);

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="batik-ext.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.w3c.dom.fragment</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
pluginProject.extensions=false
resolve.requirebundle=false

View File

@ -0,0 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Fragment
Bundle-SymbolicName: org.w3c.dom.fragment
Bundle-Version: 1.0.0.qualifier
Fragment-Host: system.bundle; extension:=framework
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: batik-ext.jar,
.
Export-Package: org.w3c.dom,
org.w3c.dom.events;version="3.0.0"

View File

@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
batik-ext.jar