Integrated Jasper Reports as optional printengine.

See "JasperReport Printengine" Feature Request for further details.
Without explicit usage of the printengine (the default), the old standard adempiere printengine will be used.
This commit is contained in:
deathmeat 2007-02-28 17:57:05 +00:00
parent f478a59fb5
commit 21791d90c7
16 changed files with 634 additions and 376 deletions

View File

@ -18,7 +18,8 @@
<property name="jar.name" value="CompiereJasper"/> <property name="jar.name" value="CompiereJasper"/>
<property name="needed.jar.name" value="CompiereJasperReqs"/> <property name="needed.jar.name" value="CompiereJasperReqs"/>
<property name="version" value="_1"/> <property name="version" value="_1"/>
<property environment="env"/> <!--<property environment="env"/>-->
<import file="../utils_dev/properties.xml"/>
<!-- set path to include the necessary jar files for javac --> <!-- set path to include the necessary jar files for javac -->
<path id="project.class.path"> <path id="project.class.path">
@ -50,6 +51,7 @@
<javac srcdir="${src}" destdir="${build.dir}" deprecation="on" source="1.4" target="1.4" debug="on"> <javac srcdir="${src}" destdir="${build.dir}" deprecation="on" source="1.4" target="1.4" debug="on">
<classpath> <classpath>
<pathelement path="${classpath}"/> <pathelement path="${classpath}"/>
<pathelement path="../lib/Adempiere.jar"/>
<pathelement path="../base/Base.jar"/> <pathelement path="../base/Base.jar"/>
<pathelement path="../dbPort/dbPort.jar"/> <pathelement path="../dbPort/dbPort.jar"/>
<pathelement path="../extend/Extend.jar"/> <pathelement path="../extend/Extend.jar"/>
@ -99,12 +101,12 @@
<fileset dir="${build.dir}"/> <fileset dir="${build.dir}"/>
<manifest> <manifest>
<attribute name="Specification-Title" value="Add-on for Jasper Reports integration on org.compiere.report.ReportStarter"/> <attribute name="Specification-Title" value="Add-on for Jasper Reports integration on org.compiere.report.ReportStarter"/>
<attribute name="Specification-Version" value="${env.COMPIERE_VERSION}${version}"/> <attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}${version}"/>
<attribute name="Specification-Vendor" value="Compiere.org"/> <attribute name="Specification-Vendor" value="Adempiere.org"/>
<attribute name="Implementation-Title" value="CompiereJasper ${env.COMPIERE_VERSION}${version}"/> <attribute name="Implementation-Title" value="CompiereJasper ${env.ADEMPIERE_VERSION}${version}"/>
<attribute name="Implementation-Version" value="${env.COMPIERE_VERSION}${version} ${DSTAMP}-${TSTAMP}"/> <attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION}${version} ${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Vendor" value="${env.COMPIERE_VENDOR}"/> <attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
<attribute name="Implementation-URL" value="http://www.compiere.org"/> <attribute name="Implementation-URL" value="http://www.adempiere.org"/>
<attribute name="Main-Class" value="org.compiere.report.ReportStarter"/> <attribute name="Main-Class" value="org.compiere.report.ReportStarter"/>
</manifest> </manifest>
</jar> </jar>
@ -138,12 +140,12 @@
<fileset dir="${needed.dir}"/> <fileset dir="${needed.dir}"/>
<manifest> <manifest>
<attribute name="Specification-Title" value="Needed libraries for Jasper Reports integration on org.compiere.report.ReportStarter"/> <attribute name="Specification-Title" value="Needed libraries for Jasper Reports integration on org.compiere.report.ReportStarter"/>
<attribute name="Specification-Version" value="${env.COMPIERE_VERSION}${version}"/> <attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}${version}"/>
<attribute name="Specification-Vendor" value="Compiere.org"/> <attribute name="Specification-Vendor" value="Adempiere.org"/>
<attribute name="Implementation-Title" value="CTools ${env.COMPIERE_VERSION}${version}"/> <attribute name="Implementation-Title" value="CTools ${env.ADEMPIERE_VERSION}${version}"/>
<attribute name="Implementation-Version" value="${env.COMPIERE_VERSION}${version} ${DSTAMP}-${TSTAMP}"/> <attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION}${version} ${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Vendor" value="${env.COMPIERE_VENDOR}"/> <attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
<attribute name="Implementation-URL" value="http://www.compiere.org"/> <attribute name="Implementation-URL" value="http://www.adempiere.org"/>
</manifest> </manifest>
</jar> </jar>
<copy file="${dist.dir}/${needed.jar.name}.jar" todir="../lib"> <copy file="${dist.dir}/${needed.jar.name}.jar" todir="../lib">

View File

@ -3,6 +3,8 @@
*/ */
package org.compiere.report; package org.compiere.report;
import java.awt.Component;
import java.util.logging.Level;
import net.sf.jasperreports.view.JRViewer; import net.sf.jasperreports.view.JRViewer;
import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRException;
@ -14,31 +16,57 @@ import javax.swing.*;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.io.File; import java.io.File;
import org.compiere.model.MUser;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.apps.*;
public class JasperReportViewer extends JRViewer { public class JasperReportViewer extends JRViewer {
private static final long serialVersionUID = -7988455595896562947L; private static final long serialVersionUID = -7988455595896562947L;
/** Logger */
private static CLogger log = CLogger.getCLogger(JasperReportViewer.class);
private JasperViewer jasperViewer;
private JasperPrint jasperPrint; private JasperPrint jasperPrint;
private JComboBox comboBox; private JComboBox comboBox;
public JasperReportViewer(final JasperPrint jasperPrint) throws JRException { public JasperReportViewer(final JasperViewer jasperViewer, final JasperPrint jasperPrint) throws JRException {
super( jasperPrint); super( jasperPrint);
this.jasperViewer = jasperViewer;
this.jasperPrint = jasperPrint; this.jasperPrint = jasperPrint;
JButton btnExport = new JButton();
tlbToolBar.add(new JSeparator(SwingConstants.VERTICAL));
JButton btnSendByEmail = new JButton();
btnSendByEmail.setToolTipText("Send by Email");
btnSendByEmail.setText("Email");
btnSendByEmail.setPreferredSize(new java.awt.Dimension(85, 23));
btnSendByEmail.setMaximumSize(new java.awt.Dimension(85, 23));
btnSendByEmail.setMinimumSize(new java.awt.Dimension(85, 23));
btnSendByEmail.addActionListener( new SendByEmailListener(jasperViewer, this));
tlbToolBar.add(btnSendByEmail);
tlbToolBar.add(new JSeparator(SwingConstants.VERTICAL));
JButton btnExport = new JButton();
btnExport.setToolTipText("Export to"); btnExport.setToolTipText("Export to");
btnExport.setText("Export to"); btnExport.setText("Export");
btnExport.setPreferredSize(new java.awt.Dimension(70, 23)); btnExport.setPreferredSize(new java.awt.Dimension(85, 23));
btnExport.setMaximumSize(new java.awt.Dimension(70, 23)); btnExport.setMaximumSize(new java.awt.Dimension(85, 23));
btnExport.setMinimumSize(new java.awt.Dimension(70, 23)); btnExport.setMinimumSize(new java.awt.Dimension(85, 23));
btnExport.addActionListener( new ExportListener( this)); btnExport.addActionListener( new ExportListener( this));
// tlbToolBar.addSeparator();
tlbToolBar.add(btnExport); tlbToolBar.add(btnExport);
comboBox = new JComboBox( new String[] {"PDF","HTML", "XLS"});
comboBox.setPreferredSize(new java.awt.Dimension(70, 23)); comboBox = new JComboBox( new String[] {"PDF","HTML", "XLS"});
comboBox.setMaximumSize(new java.awt.Dimension(70, 23)); comboBox.setPreferredSize(new java.awt.Dimension(80, 23));
comboBox.setMinimumSize(new java.awt.Dimension(70, 23)); comboBox.setMaximumSize(new java.awt.Dimension(80, 23));
comboBox.setMinimumSize(new java.awt.Dimension(80, 23));
tlbToolBar.add(comboBox); tlbToolBar.add(comboBox);
// Set default viewer zoom level
btnFitPage.setSelected(true);
setZooms();
} }
public JasperPrint getJasperPrint() { public JasperPrint getJasperPrint() {
@ -59,6 +87,8 @@ class ExportListener implements ActionListener {
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
JFileChooser fileChooser = new JFileChooser(); JFileChooser fileChooser = new JFileChooser();
fileChooser.setSelectedFile(new File(viewer.getJasperPrint().getName() +
"." + viewer.getFormat().toLowerCase()));
if (fileChooser.showSaveDialog( viewer)==JFileChooser.APPROVE_OPTION) { if (fileChooser.showSaveDialog( viewer)==JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile(); File file = fileChooser.getSelectedFile();
try { try {
@ -78,3 +108,38 @@ class ExportListener implements ActionListener {
} }
} }
} }
class SendByEmailListener implements ActionListener {
/** Logger */
private static CLogger log = CLogger.getCLogger(SendByEmailListener.class);
private JasperViewer jasperViewer;
private JasperReportViewer viewer;
public SendByEmailListener(JasperViewer jasperViewer, JasperReportViewer viewer) {
this.jasperViewer = jasperViewer;
this.viewer = viewer;
}
public void actionPerformed(ActionEvent event) {
String to = "";
MUser from = MUser.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()));
String subject = viewer.getJasperPrint().getName();
String message = "";
File attachment = null;
try
{
attachment = File.createTempFile("mail", ".pdf");
JasperExportManager.exportReportToPdfFile(viewer.getJasperPrint(), attachment.getAbsolutePath());
}
catch (Exception e)
{
log.log(Level.SEVERE, "", e);
}
EMailDialog emd = new EMailDialog ((JFrame)jasperViewer,
Msg.getMsg(Env.getCtx(), "SendMail"),
from, to, subject, message, attachment);
}
}

View File

@ -35,7 +35,7 @@ public class JasperViewer extends javax.swing.JFrame {
protected JasperViewer(JasperPrint jasperPrint,String frameTitle) throws JRException { protected JasperViewer(JasperPrint jasperPrint,String frameTitle) throws JRException {
this.m_title = frameTitle; this.m_title = frameTitle;
initComponents(); initComponents();
JasperReportViewer viewer = new JasperReportViewer(jasperPrint); JasperReportViewer viewer = new JasperReportViewer(this, jasperPrint);
this.pnlMain.add(viewer, BorderLayout.CENTER); this.pnlMain.add(viewer, BorderLayout.CENTER);
} }

View File

@ -69,9 +69,9 @@ public class ReportStarter implements ProcessCall {
String reportPath = System.getProperty("org.compiere.report.path"); String reportPath = System.getProperty("org.compiere.report.path");
if (reportPath == null) { if (reportPath == null) {
REPORT_HOME = new File( System.getProperty("COMPIERE_HOME")+"/reports"); REPORT_HOME = new File(System.getProperty("ADEMPIERE_HOME") + "./reports");
} else { } else {
REPORT_HOME = new File( reportPath); REPORT_HOME = new File(reportPath);
} }
} }
@ -220,7 +220,7 @@ public class ReportStarter implements ProcessCall {
/** /**
* @author rlemeill * @author rlemeill
* @param reportLocation http string url ex: http://compiereserver.domain.com/webApp/standalone.jrxml * @param reportLocation http string url ex: http://adempiereserver.domain.com/webApp/standalone.jrxml
* @return downloaded File (or already existing one) * @return downloaded File (or already existing one)
*/ */
private File httpDownloadedReport(String reportLocation) private File httpDownloadedReport(String reportLocation)
@ -324,6 +324,7 @@ public class ReportStarter implements ProcessCall {
if (Record_ID!=-1) { if (Record_ID!=-1) {
JasperData data = null; JasperData data = null;
File reportFile = null; File reportFile = null;
String fileExtension = "";
HashMap params = new HashMap( ctx); HashMap params = new HashMap( ctx);
addProcessParameters( AD_PInstance_ID, params, trxName); addProcessParameters( AD_PInstance_ID, params, trxName);
@ -343,9 +344,15 @@ public class ReportStarter implements ProcessCall {
} }
if (reportFile != null) if (reportFile != null)
{
data = processReport(reportFile); data = processReport(reportFile);
fileExtension = reportFile.getName().substring(reportFile.getName().lastIndexOf("."),
reportFile.getName().length());
}
else else
{
return false; return false;
}
JasperReport jasperReport = data.getJasperReport(); JasperReport jasperReport = data.getJasperReport();
String jasperName = data.getJasperName(); String jasperName = data.getJasperName();
@ -354,7 +361,7 @@ public class ReportStarter implements ProcessCall {
if (jasperReport != null) { if (jasperReport != null) {
// Subreports // Subreports
File[] subreports = reportDir.listFiles( new FileFilter( jasperName+"Subreport", reportDir, ".xml")); File[] subreports = reportDir.listFiles( new FileFilter( jasperName+"Subreport", reportDir, fileExtension));
for( int i=0; i<subreports.length; i++) { for( int i=0; i<subreports.length; i++) {
JasperData subData = processReport( subreports[i]); JasperData subData = processReport( subreports[i]);
if (subData.getJasperReport()!=null) { if (subData.getJasperReport()!=null) {
@ -402,10 +409,11 @@ public class ReportStarter implements ProcessCall {
JasperPrintManager.printReport( jasperPrint, false); JasperPrintManager.printReport( jasperPrint, false);
// You can use JasperPrint to create PDF // You can use JasperPrint to create PDF
JasperExportManager.exportReportToPdfFile(jasperPrint, "BasicReport.pdf"); // JasperExportManager.exportReportToPdfFile(jasperPrint, "BasicReport.pdf");
} else { } else {
log.info( "ReportStarter.startProcess run report -"+jasperPrint.getName()); log.info( "ReportStarter.startProcess run report -"+jasperPrint.getName());
JasperViewer jasperViewer = new JasperViewer( jasperPrint, pi.getTitle()+" - " + reportPath); JasperViewer jasperViewer = new JasperViewer( jasperPrint, pi.getTitle()+" - " + reportPath);
jasperViewer.setExtendedState(jasperViewer.getExtendedState() | javax.swing.JFrame.MAXIMIZED_BOTH);
jasperViewer.setVisible(true); jasperViewer.setVisible(true);
} }
} catch (JRException e) { } catch (JRException e) {
@ -446,12 +454,15 @@ public class ReportStarter implements ProcessCall {
// Reports deployement on web server Thanks to Alin Vaida // Reports deployement on web server Thanks to Alin Vaida
if (reportPath.startsWith("http://")) { if (reportPath.startsWith("http://")) {
reportFile = httpDownloadedReport(reportPath); reportFile = httpDownloadedReport(reportPath);
} else if(reportPath.startsWith("/")) {
reportFile = new File(reportPath);
} else { } else {
reportFile = new File(REPORT_HOME, reportPath); reportFile = new File(REPORT_HOME, reportPath);
} }
// Set org.compiere.report.path because it is used in reports which refer to subreports
System.setProperty("org.compiere.report.path", reportFile.getParentFile().getAbsolutePath());
return reportFile; return reportFile;
} }
@ -588,8 +599,8 @@ public class ReportStarter implements ProcessCall {
compiereJasperAbsolutePath = compiereJasperAbsolutePath.replaceAll("%20"," "); compiereJasperAbsolutePath = compiereJasperAbsolutePath.replaceAll("%20"," ");
jasperreportsAbsolutePath = jasperreportsAbsolutePath.replaceAll("%20"," "); jasperreportsAbsolutePath = jasperreportsAbsolutePath.replaceAll("%20"," ");
String newClassPath = jasperreportsAbsolutePath + System.getProperty("path.separator") + compiereJasperAbsolutePath; String newClassPath = jasperreportsAbsolutePath + System.getProperty("path.separator") + compiereJasperAbsolutePath;
log.warning("JasperReports compilation is probably started from JavaWebStart"); log.info("JasperReports compilation is probably started from JavaWebStart");
log.info("classpath is corrected to "+newClassPath); log.info("Classpath is corrected to "+newClassPath);
System.setProperty("java.class.path",newClassPath) ; System.setProperty("java.class.path",newClassPath) ;
} }

View File

@ -34,7 +34,7 @@
<target name="xdoclet"> <target name="xdoclet">
<echo>------ Executing xdoclet</echo> <echo>------ Executing xdoclet</echo>
<ant inheritall="false" antfile="xdoclet-build.xml"/> <!--<ant inheritall="false" antfile="xdoclet-build.xml"/>-->
</target> </target>
<target name="packaging"> <target name="packaging">

View File

@ -107,7 +107,7 @@ public class ProcessCtl extends Thread
} }
// execute // execute
ProcessCtl worker = new ProcessCtl(parent, pi, trx); ProcessCtl worker = new ProcessCtl(parent, WindowNo, pi, trx);
worker.start(); // MUST be start! worker.start(); // MUST be start!
return worker; return worker;
} // execute } // execute
@ -171,7 +171,7 @@ public class ProcessCtl extends Thread
} }
// execute // execute
ProcessCtl worker = new ProcessCtl(parent, pi, trx); ProcessCtl worker = new ProcessCtl(parent, WindowNo, pi, trx);
worker.start(); // MUST be start! worker.start(); // MUST be start!
return worker; return worker;
} // execute } // execute
@ -185,13 +185,16 @@ public class ProcessCtl extends Thread
* @param trx Transaction * @param trx Transaction
* Created in process(), VInvoiceGen.generateInvoices * Created in process(), VInvoiceGen.generateInvoices
*/ */
public ProcessCtl (ASyncProcess parent, ProcessInfo pi, Trx trx) public ProcessCtl (ASyncProcess parent, int WindowNo, ProcessInfo pi, Trx trx)
{ {
windowno = WindowNo;
m_parent = parent; m_parent = parent;
m_pi = pi; m_pi = pi;
m_trx = trx; // handeled correctly m_trx = trx; // handeled correctly
} // ProcessCtl } // ProcessCtl
/** Windowno */
int windowno;
/** Parenr */ /** Parenr */
ASyncProcess m_parent; ASyncProcess m_parent;
/** Process Info */ /** Process Info */
@ -360,7 +363,7 @@ public class ProcessCtl extends Thread
} // Pre-Report } // Pre-Report
// Start Report ----------------------------------------------- // Start Report -----------------------------------------------
boolean ok = ReportCtl.start(m_pi, IsDirectPrint); boolean ok = ReportCtl.start(m_parent, windowno, m_pi, IsDirectPrint);
m_pi.setSummary("Report", !ok); m_pi.setSummary("Report", !ok);
unlock (); unlock ();
} }

View File

@ -379,7 +379,7 @@ public class ProcessDialog extends CFrame
for (int i = 0; i < m_ids.length; i++) for (int i = 0; i < m_ids.length; i++)
{ {
int M_InOut_ID = m_ids[i]; int M_InOut_ID = m_ids[i];
ReportCtl.startDocumentPrint(ReportEngine.SHIPMENT, M_InOut_ID, true); ReportCtl.startDocumentPrint(ReportEngine.SHIPMENT, M_InOut_ID, this, Env.getWindowNo(this), true);
} }
ADialogDialog d = new ADialogDialog (this, ADialogDialog d = new ADialogDialog (this,
Env.getHeader(Env.getCtx(), m_WindowNo), Env.getHeader(Env.getCtx(), m_WindowNo),
@ -408,7 +408,7 @@ public class ProcessDialog extends CFrame
for (int i = 0; i < m_ids.length; i++) for (int i = 0; i < m_ids.length; i++)
{ {
int AD_Invoice_ID = m_ids[i]; int AD_Invoice_ID = m_ids[i];
ReportCtl.startDocumentPrint(ReportEngine.INVOICE, AD_Invoice_ID, true); ReportCtl.startDocumentPrint(ReportEngine.INVOICE, AD_Invoice_ID, this, Env.getWindowNo(this), true);
} }
ADialogDialog d = new ADialogDialog (this, ADialogDialog d = new ADialogDialog (this,
Env.getHeader(Env.getCtx(), m_WindowNo), Env.getHeader(Env.getCtx(), m_WindowNo),

View File

@ -459,7 +459,7 @@ public class VInOutGen extends CPanel
} }
// Execute Process // Execute Process
ProcessCtl worker = new ProcessCtl(this, pi, trx); ProcessCtl worker = new ProcessCtl(this, Env.getWindowNo(this), pi, trx);
worker.start(); // complete tasks in unlockUI / generateShipments_complete worker.start(); // complete tasks in unlockUI / generateShipments_complete
// //
} // generateShipments } // generateShipments
@ -508,7 +508,7 @@ public class VInOutGen extends CPanel
for (int i = 0; i < ids.length; i++) for (int i = 0; i < ids.length; i++)
{ {
int M_InOut_ID = ids[i]; int M_InOut_ID = ids[i];
ReportCtl.startDocumentPrint(ReportEngine.SHIPMENT, M_InOut_ID, true); ReportCtl.startDocumentPrint(ReportEngine.SHIPMENT, M_InOut_ID, this, Env.getWindowNo(this), true);
} }
ADialogDialog d = new ADialogDialog (m_frame, ADialogDialog d = new ADialogDialog (m_frame,
Env.getHeader(Env.getCtx(), m_WindowNo), Env.getHeader(Env.getCtx(), m_WindowNo),

View File

@ -451,7 +451,7 @@ public class VInvoiceGen extends CPanel
} }
// Execute Process // Execute Process
ProcessCtl worker = new ProcessCtl(this, pi, trx); ProcessCtl worker = new ProcessCtl(this, Env.getWindowNo(this), pi, trx);
worker.start(); // complete tasks in unlockUI / generateInvoice_complete worker.start(); // complete tasks in unlockUI / generateInvoice_complete
} // generateInvoices } // generateInvoices
@ -498,7 +498,7 @@ public class VInvoiceGen extends CPanel
for (int i = 0; i < ids.length; i++) for (int i = 0; i < ids.length; i++)
{ {
int C_Invoice_ID = ids[i]; int C_Invoice_ID = ids[i];
ReportCtl.startDocumentPrint(ReportEngine.INVOICE, C_Invoice_ID, true); ReportCtl.startDocumentPrint(ReportEngine.INVOICE, C_Invoice_ID, this, Env.getWindowNo(this), true);
} }
ADialogDialog d = new ADialogDialog (m_frame, ADialogDialog d = new ADialogDialog (m_frame,
Env.getHeader(Env.getCtx(), m_WindowNo), Env.getHeader(Env.getCtx(), m_WindowNo),

View File

@ -478,7 +478,7 @@ public class VPayPrint extends CPanel
{ {
MPaySelectionCheck check = m_checks[i]; MPaySelectionCheck check = m_checks[i];
// ReportCtrl will check BankAccountDoc for PrintFormat // ReportCtrl will check BankAccountDoc for PrintFormat
boolean ok = ReportCtl.startDocumentPrint(ReportEngine.CHECK, check.get_ID(), directPrint); boolean ok = ReportCtl.startDocumentPrint(ReportEngine.CHECK, check.get_ID(), null, Env.getWindowNo(this), directPrint);
if (!somethingPrinted && ok) if (!somethingPrinted && ok)
somethingPrinted = true; somethingPrinted = true;
} }
@ -502,7 +502,7 @@ public class VPayPrint extends CPanel
for (int i = 0; i < m_checks.length; i++) for (int i = 0; i < m_checks.length; i++)
{ {
MPaySelectionCheck check = m_checks[i]; MPaySelectionCheck check = m_checks[i];
ReportCtl.startDocumentPrint(ReportEngine.REMITTANCE, check.get_ID(), directPrint); ReportCtl.startDocumentPrint(ReportEngine.REMITTANCE, check.get_ID(), null, Env.getWindowNo(this), directPrint);
} }
} // remittance } // remittance

View File

@ -35,7 +35,7 @@ import org.compiere.util.*;
* *
* @author Comunidad de Desarrollo OpenXpertya * @author Comunidad de Desarrollo OpenXpertya
* *Basado en Codigo Original Modificado, Revisado y Optimizado de: * *Basado en Codigo Original Modificado, Revisado y Optimizado de:
* *Copyright © Jorg Janke * *Copyright <EFBFBD> Jorg Janke
* @version $Id: SubCheckout.java,v 1.1 2004/07/12 04:10:04 jjanke Exp $ * @version $Id: SubCheckout.java,v 1.1 2004/07/12 04:10:04 jjanke Exp $
*/ */
public class SubCheckout extends PosSubPanel implements ActionListener public class SubCheckout extends PosSubPanel implements ActionListener
@ -159,8 +159,8 @@ public class SubCheckout extends PosSubPanel implements ActionListener
//TODO: Credit card //TODO: Credit card
/* Panel para la introducción de los datos de CreditCard para el pago quitada por ConSerTi al no considerar /* Panel para la introducci<EFBFBD>n de los datos de CreditCard para el pago quitada por ConSerTi al no considerar
* que sea útil de momento * que sea <EFBFBD>til de momento
// -- 1 -- Creditcard // -- 1 -- Creditcard
CPanel creditcard = new CPanel(new GridBagLayout()); CPanel creditcard = new CPanel(new GridBagLayout());
@ -307,7 +307,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
* Process Order * Process Order
* @author Comunidad de Desarrollo OpenXpertya * @author Comunidad de Desarrollo OpenXpertya
* *Basado en Codigo Original Modificado, Revisado y Optimizado de: * *Basado en Codigo Original Modificado, Revisado y Optimizado de:
* *Copyright © ConSerTi * *Copyright <EFBFBD> ConSerTi
*/ */
public void processOrder() public void processOrder()
{ {
@ -332,7 +332,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
* Print Ticket * Print Ticket
* @author Comunidad de Desarrollo OpenXpertya * @author Comunidad de Desarrollo OpenXpertya
* *Basado en Codigo Original Modificado, Revisado y Optimizado de: * *Basado en Codigo Original Modificado, Revisado y Optimizado de:
* *Copyright © ConSerTi * *Copyright <EFBFBD> ConSerTi
*/ */
public void printTicket() public void printTicket()
{ {
@ -350,7 +350,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
PrintLabel.printLabelTicket(order.getC_Order_ID(), p_pos.getAD_PrintLabel_ID()); PrintLabel.printLabelTicket(order.getC_Order_ID(), p_pos.getAD_PrintLabel_ID());
*/ */
//print standard document //print standard document
ReportCtl.startDocumentPrint(ReportEngine.ORDER, order.getC_Order_ID(), true); ReportCtl.startDocumentPrint(ReportEngine.ORDER, order.getC_Order_ID(), null, Env.getWindowNo(this), true);
} }
catch (Exception e) catch (Exception e)
{ {
@ -364,7 +364,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
* Display the difference between tender amount and bill amount * Display the difference between tender amount and bill amount
* @author Comunidad de Desarrollo OpenXpertya * @author Comunidad de Desarrollo OpenXpertya
* *Basado en Codigo Original Modificado, Revisado y Optimizado de: * *Basado en Codigo Original Modificado, Revisado y Optimizado de:
* *Copyright © ConSerTi * *Copyright <EFBFBD> ConSerTi
*/ */
public void displayReturn() public void displayReturn()
{ {
@ -386,7 +386,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
* *
* @author Comunidad de Desarrollo OpenXpertya * @author Comunidad de Desarrollo OpenXpertya
* *Basado en Codigo Original Modificado, Revisado y Optimizado de: * *Basado en Codigo Original Modificado, Revisado y Optimizado de:
* *Copyright © ConSerTi * *Copyright <EFBFBD> ConSerTi
*/ */
public boolean isOrderFullyPay() public boolean isOrderFullyPay()
{ {
@ -409,7 +409,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
* Abre la caja registradora * Abre la caja registradora
* @author Comunidad de Desarrollo OpenXpertya * @author Comunidad de Desarrollo OpenXpertya
* *Basado en Codigo Original Modificado, Revisado y Optimizado de: * *Basado en Codigo Original Modificado, Revisado y Optimizado de:
* *Copyright © ConSerTi * *Copyright <EFBFBD> ConSerTi
*/ */
public void openCashDrawer() public void openCashDrawer()
{ {

View File

@ -52,7 +52,7 @@ public class ReportCtl
* @param IsDirectPrint if true, prints directly - otherwise View * @param IsDirectPrint if true, prints directly - otherwise View
* @return true if created * @return true if created
*/ */
static public boolean start (ProcessInfo pi, boolean IsDirectPrint) static public boolean start (ASyncProcess parent, int WindowNo, ProcessInfo pi, boolean IsDirectPrint)
{ {
s_log.info("start - " + pi); s_log.info("start - " + pi);
@ -60,19 +60,19 @@ public class ReportCtl
* Order Print * Order Print
*/ */
if (pi.getAD_Process_ID() == 110) // C_Order if (pi.getAD_Process_ID() == 110) // C_Order
return startDocumentPrint(ReportEngine.ORDER, pi.getRecord_ID(), IsDirectPrint); return startDocumentPrint(ReportEngine.ORDER, pi.getRecord_ID(), parent, WindowNo, IsDirectPrint);
else if (pi.getAD_Process_ID() == 116) // C_Invoice else if (pi.getAD_Process_ID() == 116) // C_Invoice
return startDocumentPrint(ReportEngine.INVOICE, pi.getRecord_ID(), IsDirectPrint); return startDocumentPrint(ReportEngine.INVOICE, pi.getRecord_ID(), parent, WindowNo, IsDirectPrint);
else if (pi.getAD_Process_ID() == 117) // M_InOut else if (pi.getAD_Process_ID() == 117) // M_InOut
return startDocumentPrint(ReportEngine.SHIPMENT, pi.getRecord_ID(), IsDirectPrint); return startDocumentPrint(ReportEngine.SHIPMENT, pi.getRecord_ID(), parent, WindowNo, IsDirectPrint);
else if (pi.getAD_Process_ID() == 217) // C_Project else if (pi.getAD_Process_ID() == 217) // C_Project
return startDocumentPrint(ReportEngine.PROJECT, pi.getRecord_ID(), IsDirectPrint); return startDocumentPrint(ReportEngine.PROJECT, pi.getRecord_ID(), parent, WindowNo, IsDirectPrint);
else if (pi.getAD_Process_ID() == 276) // C_RfQResponse else if (pi.getAD_Process_ID() == 276) // C_RfQResponse
return startDocumentPrint(ReportEngine.RFQ, pi.getRecord_ID(), IsDirectPrint); return startDocumentPrint(ReportEngine.RFQ, pi.getRecord_ID(), parent, WindowNo, IsDirectPrint);
else if (pi.getAD_Process_ID() == 313) // C_Payment else if (pi.getAD_Process_ID() == 313) // C_Payment
return startCheckPrint(pi.getRecord_ID(), IsDirectPrint); return startCheckPrint(pi.getRecord_ID(), IsDirectPrint);
else if (pi.getAD_Process_ID() == 290) // Movement Submission by VHARCQ else if (pi.getAD_Process_ID() == 290) // Movement Submission by VHARCQ
return startDocumentPrint(ReportEngine.MOVEMENT, pi.getRecord_ID(), IsDirectPrint); return startDocumentPrint(ReportEngine.MOVEMENT, pi.getRecord_ID(), parent, WindowNo, IsDirectPrint);
/** /**
else if (pi.AD_Process_ID == 9999999) // PaySelection else if (pi.AD_Process_ID == 9999999) // PaySelection
return startDocumentPrint(CHECK, pi, IsDirectPrint); return startDocumentPrint(CHECK, pi, IsDirectPrint);
@ -80,7 +80,7 @@ public class ReportCtl
return startDocumentPrint(REMITTANCE, pi, IsDirectPrint); return startDocumentPrint(REMITTANCE, pi, IsDirectPrint);
**/ **/
else if (pi.getAD_Process_ID() == 159) // Dunning else if (pi.getAD_Process_ID() == 159) // Dunning
return startDocumentPrint(ReportEngine.DUNNING, pi.getRecord_ID(), IsDirectPrint); return startDocumentPrint(ReportEngine.DUNNING, pi.getRecord_ID(), parent, WindowNo, IsDirectPrint);
else if (pi.getAD_Process_ID() == 202 // Financial Report else if (pi.getAD_Process_ID() == 202 // Financial Report
|| pi.getAD_Process_ID() == 204) // Financial Statement || pi.getAD_Process_ID() == 204) // Financial Statement
return startFinReport (pi); return startFinReport (pi);
@ -153,23 +153,37 @@ public class ReportCtl
* @param IsDirectPrint if true, prints directly - otherwise View * @param IsDirectPrint if true, prints directly - otherwise View
* @return true if success * @return true if success
*/ */
public static boolean startDocumentPrint (int type, int Record_ID, boolean IsDirectPrint) public static boolean startDocumentPrint (int type, int Record_ID, ASyncProcess parent, int WindowNo, boolean IsDirectPrint)
{ {
ReportEngine re = ReportEngine.get (Env.getCtx(), type, Record_ID); ReportEngine re = ReportEngine.get (Env.getCtx(), type, Record_ID);
if (re == null) if (re == null)
{ {
ADialog.error(0, null, "NoDocPrintFormat"); ADialog.error(0, null, "NoDocPrintFormat");
return false; return false;
} }
if (IsDirectPrint)
if(re.getPrintFormat() != null && re.getPrintFormat().getJasperProcess_ID() > 0)
{ {
re.print (); ProcessInfo pi = new ProcessInfo ("", re.getPrintFormat().getJasperProcess_ID());
ReportEngine.printConfirm (type, Record_ID);
// Execute Process
ProcessCtl worker = ProcessCtl.process(parent, WindowNo, pi, null);
try {
worker.start();
} catch(java.lang.IllegalThreadStateException itse) {
// Do nothing
}
} }
else else
preview(re); {
if (IsDirectPrint)
{
re.print ();
ReportEngine.printConfirm (type, Record_ID);
}
else
preview(re);
}
//vpj-cd e-evolution 15022007 //vpj-cd e-evolution 15022007
if(type == ReportEngine.INVOICE) if(type == ReportEngine.INVOICE)
@ -223,7 +237,7 @@ public class ReportCtl
if (psc != null) if (psc != null)
C_PaySelectionCheck_ID = psc.getC_PaySelectionCheck_ID(); C_PaySelectionCheck_ID = psc.getC_PaySelectionCheck_ID();
} }
return startDocumentPrint (ReportEngine.CHECK, C_PaySelectionCheck_ID, IsDirectPrint); return startDocumentPrint (ReportEngine.CHECK, C_PaySelectionCheck_ID, null, -1, IsDirectPrint);
} // startCheckPrint } // startCheckPrint
private static void preview(ReportEngine re) { private static void preview(ReportEngine re) {

View File

@ -1,6 +1,6 @@
/****************************************************************************** /******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution * * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
* This program is free software; * This program is free software;
you can redistribute it and/or modify it * you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published * * under the terms version 2 of the GNU General Public License as published *
@ -111,6 +111,8 @@ Integer ii = (Integer)get_Value("AD_PrintColor_ID");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name AD_PrintColor_ID */
public static final String COLUMNNAME_AD_PrintColor_ID = "AD_PrintColor_ID";
/** Set Print Font. /** Set Print Font.
@param AD_PrintFont_ID Maintain Print Font */ @param AD_PrintFont_ID Maintain Print Font */
public void setAD_PrintFont_ID (int AD_PrintFont_ID) public void setAD_PrintFont_ID (int AD_PrintFont_ID)
@ -126,6 +128,8 @@ Integer ii = (Integer)get_Value("AD_PrintFont_ID");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name AD_PrintFont_ID */
public static final String COLUMNNAME_AD_PrintFont_ID = "AD_PrintFont_ID";
/** Set Print Format. /** Set Print Format.
@param AD_PrintFormat_ID Data Print Format */ @param AD_PrintFormat_ID Data Print Format */
public void setAD_PrintFormat_ID (int AD_PrintFormat_ID) public void setAD_PrintFormat_ID (int AD_PrintFormat_ID)
@ -141,6 +145,8 @@ Integer ii = (Integer)get_Value("AD_PrintFormat_ID");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name AD_PrintFormat_ID */
public static final String COLUMNNAME_AD_PrintFormat_ID = "AD_PrintFormat_ID";
/** Set Print Paper. /** Set Print Paper.
@param AD_PrintPaper_ID Printer paper definition */ @param AD_PrintPaper_ID Printer paper definition */
public void setAD_PrintPaper_ID (int AD_PrintPaper_ID) public void setAD_PrintPaper_ID (int AD_PrintPaper_ID)
@ -156,6 +162,8 @@ Integer ii = (Integer)get_Value("AD_PrintPaper_ID");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name AD_PrintPaper_ID */
public static final String COLUMNNAME_AD_PrintPaper_ID = "AD_PrintPaper_ID";
/** Set Print Table Format. /** Set Print Table Format.
@param AD_PrintTableFormat_ID Table Format in Reports */ @param AD_PrintTableFormat_ID Table Format in Reports */
public void setAD_PrintTableFormat_ID (int AD_PrintTableFormat_ID) public void setAD_PrintTableFormat_ID (int AD_PrintTableFormat_ID)
@ -172,6 +180,8 @@ Integer ii = (Integer)get_Value("AD_PrintTableFormat_ID");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name AD_PrintTableFormat_ID */
public static final String COLUMNNAME_AD_PrintTableFormat_ID = "AD_PrintTableFormat_ID";
/** Set Report View. /** Set Report View.
@param AD_ReportView_ID View used to generate this report */ @param AD_ReportView_ID View used to generate this report */
public void setAD_ReportView_ID (int AD_ReportView_ID) public void setAD_ReportView_ID (int AD_ReportView_ID)
@ -188,6 +198,8 @@ Integer ii = (Integer)get_Value("AD_ReportView_ID");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name AD_ReportView_ID */
public static final String COLUMNNAME_AD_ReportView_ID = "AD_ReportView_ID";
/** Set Table. /** Set Table.
@param AD_Table_ID Database Table information */ @param AD_Table_ID Database Table information */
public void setAD_Table_ID (int AD_Table_ID) public void setAD_Table_ID (int AD_Table_ID)
@ -203,6 +215,8 @@ Integer ii = (Integer)get_Value("AD_Table_ID");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name AD_Table_ID */
public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID";
/** Set Create Copy. /** Set Create Copy.
@param CreateCopy Create Copy */ @param CreateCopy Create Copy */
public void setCreateCopy (String CreateCopy) public void setCreateCopy (String CreateCopy)
@ -220,6 +234,8 @@ public String getCreateCopy()
{ {
return (String)get_Value("CreateCopy"); return (String)get_Value("CreateCopy");
} }
/** Column name CreateCopy */
public static final String COLUMNNAME_CreateCopy = "CreateCopy";
/** Set Description. /** Set Description.
@param Description Optional short description of the record */ @param Description Optional short description of the record */
public void setDescription (String Description) public void setDescription (String Description)
@ -237,6 +253,8 @@ public String getDescription()
{ {
return (String)get_Value("Description"); return (String)get_Value("Description");
} }
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Footer Margin. /** Set Footer Margin.
@param FooterMargin Margin of the Footer in 1/72 of an inch */ @param FooterMargin Margin of the Footer in 1/72 of an inch */
public void setFooterMargin (int FooterMargin) public void setFooterMargin (int FooterMargin)
@ -251,6 +269,8 @@ Integer ii = (Integer)get_Value("FooterMargin");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name FooterMargin */
public static final String COLUMNNAME_FooterMargin = "FooterMargin";
/** Set Header Margin. /** Set Header Margin.
@param HeaderMargin Margin of the Header in 1/72 of an inch */ @param HeaderMargin Margin of the Header in 1/72 of an inch */
public void setHeaderMargin (int HeaderMargin) public void setHeaderMargin (int HeaderMargin)
@ -265,6 +285,8 @@ Integer ii = (Integer)get_Value("HeaderMargin");
if (ii == null) return 0; if (ii == null) return 0;
return ii.intValue(); return ii.intValue();
} }
/** Column name HeaderMargin */
public static final String COLUMNNAME_HeaderMargin = "HeaderMargin";
/** Set Default. /** Set Default.
@param IsDefault Default value */ @param IsDefault Default value */
public void setIsDefault (boolean IsDefault) public void setIsDefault (boolean IsDefault)
@ -283,6 +305,8 @@ if (oo != null)
} }
return false; return false;
} }
/** Column name IsDefault */
public static final String COLUMNNAME_IsDefault = "IsDefault";
/** Set Form. /** Set Form.
@param IsForm If Selected, a Form is printed, if not selected a columnar List report */ @param IsForm If Selected, a Form is printed, if not selected a columnar List report */
public void setIsForm (boolean IsForm) public void setIsForm (boolean IsForm)
@ -301,6 +325,8 @@ if (oo != null)
} }
return false; return false;
} }
/** Column name IsForm */
public static final String COLUMNNAME_IsForm = "IsForm";
/** Set Standard Header/Footer. /** Set Standard Header/Footer.
@param IsStandardHeaderFooter The standard Header and Footer is used */ @param IsStandardHeaderFooter The standard Header and Footer is used */
public void setIsStandardHeaderFooter (boolean IsStandardHeaderFooter) public void setIsStandardHeaderFooter (boolean IsStandardHeaderFooter)
@ -319,6 +345,8 @@ if (oo != null)
} }
return false; return false;
} }
/** Column name IsStandardHeaderFooter */
public static final String COLUMNNAME_IsStandardHeaderFooter = "IsStandardHeaderFooter";
/** Set Table Based. /** Set Table Based.
@param IsTableBased Table based List Reporting */ @param IsTableBased Table based List Reporting */
public void setIsTableBased (boolean IsTableBased) public void setIsTableBased (boolean IsTableBased)
@ -337,6 +365,29 @@ if (oo != null)
} }
return false; return false;
} }
/** Column name IsTableBased */
public static final String COLUMNNAME_IsTableBased = "IsTableBased";
/** JasperProcess_ID AD_Reference_ID=400 */
public static final int JASPERPROCESS_ID_AD_Reference_ID=400;
/** Set Jasper Process.
@param JasperProcess_ID The Jasper Process used by the printengine if any process defined */
public void setJasperProcess_ID (int JasperProcess_ID)
{
if (JasperProcess_ID <= 0) set_Value ("JasperProcess_ID", null);
else
set_Value ("JasperProcess_ID", Integer.valueOf(JasperProcess_ID));
}
/** Get Jasper Process.
@return The Jasper Process used by the printengine if any process defined */
public int getJasperProcess_ID()
{
Integer ii = (Integer)get_Value("JasperProcess_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Column name JasperProcess_ID */
public static final String COLUMNNAME_JasperProcess_ID = "JasperProcess_ID";
/** Set Name. /** Set Name.
@param Name Alphanumeric identifier of the entity */ @param Name Alphanumeric identifier of the entity */
public void setName (String Name) public void setName (String Name)
@ -361,6 +412,8 @@ return (String)get_Value("Name");
{ {
return new KeyNamePair(get_ID(), getName()); return new KeyNamePair(get_ID(), getName());
} }
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Printer Name. /** Set Printer Name.
@param PrinterName Name of the Printer */ @param PrinterName Name of the Printer */
public void setPrinterName (String PrinterName) public void setPrinterName (String PrinterName)
@ -378,4 +431,6 @@ public String getPrinterName()
{ {
return (String)get_Value("PrinterName"); return (String)get_Value("PrinterName");
} }
/** Column name PrinterName */
public static final String COLUMNNAME_PrinterName = "PrinterName";
} }

View File

@ -765,7 +765,7 @@ public final class EMail implements Serializable
// Local Character Set // Local Character Set
String charSetName = System.getProperty("file.encoding"); // Cp1252 String charSetName = System.getProperty("file.encoding"); // Cp1252
if (charSetName == null || charSetName.length() == 0) if (charSetName == null || charSetName.length() == 0)
charSetName = "UTF-8"; // WebEnv.ENCODING - alternative iso-8859-1 charSetName = "iso-8859-1"; // WebEnv.ENCODING - alternative iso-8859-1
// //
m_msg.setSubject (getSubject(), charSetName); m_msg.setSubject (getSubject(), charSetName);

View File

@ -0,0 +1,106 @@
Insert into "AD_ELEMENT"
("AD_ELEMENT_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY",
"UPDATED","UPDATEDBY","COLUMNNAME","ENTITYTYPE","NAME","PRINTNAME","DESCRIPTION",
"HELP","PO_NAME","PO_PRINTNAME","PO_DESCRIPTION","PO_HELP")
values
(50064,0,0,'Y',to_date('27.02.07','DD.MM.RR'),0,
to_date('27.02.07','DD.MM.RR'),0,'JasperProcess_ID','D',
'Jasper Process','Jasper Process',
'The Jasper Process used by the printengine if any process defined'
,null,null,null,null,null);
Insert into "AD_VAL_RULE"
("AD_VAL_RULE_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY",
"UPDATED","UPDATEDBY","NAME","DESCRIPTION","TYPE","CODE","ENTITYTYPE")
values
(270,0,0,'Y',to_date('27.02.07','DD.MM.RR'),0,to_date('27.02.07','DD.MM.RR'),
0,'AD_Process Jasper Reports',null,'S','AD_Process.JasperReport IS NOT NULL','D');
UPDATE AD_VAL_RULE
SET CODE = 'AD_Process.IsReport=''Y'' AND AD_Process.JasperReport IS NULL'
WHERE NAME = 'AD_Process Reports';
Insert into "AD_REFERENCE"
("AD_REFERENCE_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY",
"UPDATED","UPDATEDBY","NAME","DESCRIPTION","HELP","VALIDATIONTYPE","VFORMAT","ENTITYTYPE")
values
(400,0,0,'Y',to_date('27.02.07','DD.MM.RR'),0,to_date('27.02.07','DD.MM.RR'),
0,'AD_Process_JasperReports',null,null,'T',null,'D');
Insert into "AD_REF_TABLE"
("AD_REFERENCE_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY",
"UPDATED","UPDATEDBY","AD_TABLE_ID","AD_KEY","AD_DISPLAY","ISVALUEDISPLAYED",
"WHERECLAUSE","ORDERBYCLAUSE","ENTITYTYPE")
values
(400,0,0,'Y',to_date('27.02.07','DD.MM.RR'),0,to_date('27.02.07','DD.MM.RR'),
0,284,2801,2809,'N','AD_Process.JasperReport IS NOT NULL',null,'D');
Insert into "AD_COLUMN"
("AD_COLUMN_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","UPDATED",
"CREATEDBY","UPDATEDBY","NAME","DESCRIPTION","HELP","VERSION","ENTITYTYPE",
"COLUMNNAME","AD_TABLE_ID","AD_REFERENCE_ID","AD_REFERENCE_VALUE_ID",
"AD_VAL_RULE_ID","FIELDLENGTH","DEFAULTVALUE","ISKEY","ISPARENT","ISMANDATORY",
"ISUPDATEABLE","READONLYLOGIC","ISIDENTIFIER","SEQNO","ISTRANSLATED","ISENCRYPTED",
"CALLOUT","VFORMAT","VALUEMIN","VALUEMAX","ISSELECTIONCOLUMN","AD_ELEMENT_ID",
"AD_PROCESS_ID","ISSYNCDATABASE","ISALWAYSUPDATEABLE","COLUMNSQL")
values
(50209,0,0,'Y',to_date('27.02.07','DD.MM.RR'),to_date('27.02.07','DD.MM.RR'),0,
0,'Jasper Process','The Jasper Process used by the printengine if any process defined',
null,1,'D','JasperProcess_ID',493,18,400,null,22,null,'N','N','N','Y',null,'N',0,'N',
'N',null,null,null,null,'N',50064,null,'N','N',null);
Insert into "AD_FIELD"
("AD_FIELD_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY",
"UPDATED","UPDATEDBY","NAME","DESCRIPTION","HELP","ISCENTRALLYMAINTAINED",
"AD_TAB_ID","AD_COLUMN_ID","AD_FIELDGROUP_ID","ISDISPLAYED","DISPLAYLOGIC",
"DISPLAYLENGTH","ISREADONLY","SEQNO","SORTNO","ISSAMELINE","ISHEADING",
"ISFIELDONLY","ISENCRYPTED","ENTITYTYPE","OBSCURETYPE","AD_REFERENCE_ID",
"ISMANDATORY")
values
(50179,0,0,'Y',to_date('27.02.07','DD.MM.RR'),0,to_date('27.02.07','DD.MM.RR'),
0,'Jasper Process','The Jasper Process used by the printengine if any process defined',
null,'Y',425,50209,null,'Y',null,14,'N',195,0,'N','N','N','N','D',null,null,null);
COMMIT;
UPDATE ad_sequence
SET currentnextsys = (SELECT MAX (ad_element_id) + 1
FROM ad_element
WHERE ad_element_id < 1000000)
WHERE NAME = 'AD_Element';
UPDATE ad_sequence
SET currentnextsys = (SELECT MAX (ad_val_rule_id) + 1
FROM ad_val_rule
WHERE ad_val_rule_id < 1000000)
WHERE NAME = 'AD_Val_Rule';
UPDATE ad_sequence
SET currentnextsys = (SELECT MAX (ad_reference_id) + 1
FROM ad_reference
WHERE ad_reference_id < 1000000)
WHERE NAME = 'AD_Reference';
UPDATE ad_sequence
SET currentnextsys = (SELECT MAX (ad_reference_id) + 1
FROM ad_ref_table
WHERE ad_reference_id < 1000000)
WHERE NAME = 'AD_Ref_Table';
UPDATE ad_sequence
SET currentnextsys = (SELECT MAX (ad_column_id) + 1
FROM ad_column
WHERE ad_column_id < 1000000)
WHERE NAME = 'AD_Column';
UPDATE ad_sequence
SET currentnextsys = (SELECT MAX (ad_field_id) + 1
FROM ad_field
WHERE ad_field_id < 1000000)
WHERE NAME = 'AD_Field';
COMMIT;
ALTER TABLE AD_PrintFormat ADD JasperProcess_ID NUMBER(10);
COMMIT;

View File

@ -23,8 +23,9 @@
<ant inheritAll="false" dir="print"/> <ant inheritAll="false" dir="print"/>
<ant inheritAll="false" dir="base"/> <ant inheritAll="false" dir="base"/>
<ant inheritAll="false" dir="extend"/> <ant inheritAll="false" dir="extend"/>
<ant inheritAll="false" dir="JasperReports"/>
<ant inheritAll="false" dir="client"/> <ant inheritAll="false" dir="client"/>
<ant inheritAll="false" dir="JasperReports"/>
<ant inheritAll="false" dir="JasperReportsWebApp"/>
<ant inheritAll="false" dir="serverRoot"/> <ant inheritAll="false" dir="serverRoot"/>
<ant inheritAll="false" dir="serverApps"/> <ant inheritAll="false" dir="serverApps"/>
<ant inheritAll="false" dir="webStore"/> <ant inheritAll="false" dir="webStore"/>
@ -40,6 +41,7 @@
<ant inheritAll="false" dir="base" target="clean"/> <ant inheritAll="false" dir="base" target="clean"/>
<ant inheritAll="false" dir="extend" target="clean"/> <ant inheritAll="false" dir="extend" target="clean"/>
<ant inheritAll="false" dir="JasperReports" target="clean"/> <ant inheritAll="false" dir="JasperReports" target="clean"/>
<ant inheritAll="false" dir="JasperReportsWebApp" target="clean"/>
<ant inheritAll="false" dir="client" target="clean"/> <ant inheritAll="false" dir="client" target="clean"/>
<ant inheritAll="false" dir="serverRoot" target="clean"/> <ant inheritAll="false" dir="serverRoot" target="clean"/>
<ant inheritAll="false" dir="serverApps" target="clean"/> <ant inheritAll="false" dir="serverApps" target="clean"/>