IDEMPIERE-4723 - Clean up dead code in compiere/print (#1039)

* IDEMPIERE-4723 - Clean up dead code in compiere/print

* IDEMPIERE-4723 - Clean up dead code in compiere/print
This commit is contained in:
Diego Ruiz 2021-12-08 14:48:44 +01:00 committed by GitHub
parent 83c4b16882
commit 5c675536cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 5 additions and 326 deletions

View File

@ -63,14 +63,6 @@ public class ArchiveEngine
String aa = aaClient;
if (aa == null)
aa = MClient.AUTOARCHIVE_None;
/* String aaRole = null; // role.getAutoArchive(); // TODO
if (aaRole != null)
{
if (aaRole.equals(MClient.AUTOARCHIVE_AllReportsDocuments))
aa = aaRole;
else if (aaRole.equals(MClient.AUTOARCHIVE_Documents) && !aaClient.equals(MClient.AUTOARCHIVE_AllReportsDocuments))
aa = aaRole;
}*/
// Nothing to Archive
if (aa.equals(MClient.AUTOARCHIVE_None))
return null;
@ -113,14 +105,6 @@ public class ArchiveEngine
String aa = aaClient;
if (aa == null)
aa = MClient.AUTOARCHIVE_None;
/* String aaRole = null; // role.getAutoArchive(); // TODO
if (aaRole != null)
{
if (aaRole.equals(MClient.AUTOARCHIVE_AllReportsDocuments))
aa = aaRole;
else if (aaRole.equals(MClient.AUTOARCHIVE_Documents) && !aaClient.equals(MClient.AUTOARCHIVE_AllReportsDocuments))
aa = aaRole;
}*/
// Nothing to Archive
if (aa.equals(MClient.AUTOARCHIVE_None))
return;
@ -207,10 +191,4 @@ public class ArchiveEngine
if (s_engine == null)
s_engine = this;
} // ArchiveEngine
/** The base document */
// private PDFDocument m_document = Document.createBlank();
} // ArchiveEngine

View File

@ -218,7 +218,6 @@ public class CPaper extends Paper
{
MediaPrintableArea area = new MediaPrintableArea ((float)getImageableX()/72, (float)getImageableY()/72,
(float)getImageableWidth()/72, (float)getImageableHeight()/72, MediaPrintableArea.INCH);
// log.fine( "CPaper.getMediaPrintableArea", area.toString(MediaPrintableArea.INCH, "\""));
return area;
} // getMediaPrintableArea
@ -274,10 +273,6 @@ public class CPaper extends Paper
pratts.add(OrientationRequested.LANDSCAPE);
else
pratts.add(OrientationRequested.PORTRAIT);
// media = na-legal
//Commented Lines By AA Goodwill: Custom Paper Support
//pratts.add(getMediaSizeName());
//End Of AA Goodwill
return pratts;
} // getPrintRequestAttributes

View File

@ -346,7 +346,6 @@ public class DataEngine
int FieldLength = rs.getInt(5);
boolean IsMandatory = "Y".equals(rs.getString(6));
boolean IsKey = "Y".equals(rs.getString(7));
//boolean IsParent = "Y".equals(rs.getString(8));
// SQL GroupBy
boolean IsGroupFunction = "Y".equals(rs.getString(9));
if (IsGroupFunction)
@ -377,7 +376,7 @@ public class DataEngine
// General Info
boolean IsPrinted = "Y".equals(rs.getString(15));
//int SortNo = rs.getInt(16);
boolean isPageBreak = "Y".equals(rs.getString(17));
String formatPattern = rs.getString(25);
@ -430,8 +429,7 @@ public class DataEngine
synonymNext();
}
// -- Parent, TableDir (and unqualified Search) --
else if ( /* (IsParent && DisplayType.isLookup(AD_Reference_ID)) || <-- IDEMPIERE-71 Carlos Ruiz - globalqss */
AD_Reference_ID == DisplayType.TableDir
else if ( AD_Reference_ID == DisplayType.TableDir
|| (AD_Reference_ID == DisplayType.Search && AD_Reference_Value_ID == 0)
)
{
@ -1003,7 +1001,6 @@ public class DataEngine
{
if (pdc.getColumnName().endsWith("_ID"))
{
// int id = rs.getInt(pdc.getColumnIDName());
int id = rs.getInt(counter++);
if (!rs.wasNull())
{
@ -1014,7 +1011,6 @@ public class DataEngine
}
else
{
// String id = rs.getString(pdc.getColumnIDName());
String id = rs.getString(counter++);
if (!rs.wasNull())
{
@ -1383,14 +1379,10 @@ public class DataEngine
{
org.compiere.Adempiere.startup(true);
// DataEngine de = new DataEngine(null);
@SuppressWarnings("unused")
DataEngine de = new DataEngine(Language.getLanguage("de_DE"));
MQuery query = new MQuery();
query.addRestriction("AD_Table_ID", MQuery.LESS, 105);
// PrintData pd = de.load_fromTable(100, query, null, null, false);
// pd.dump();
// pd.createXML(new javax.xml.transform.stream.StreamResult(System.out));
}
} // DataEngine

View File

@ -221,7 +221,6 @@ public class MPrintColor extends X_AD_PrintColor implements ImmutablePOSupport
}
if (code == null)
m_cacheColor = Color.black;
// log.fine( "MPrintColor.getColor " + code, m_cacheColor);
return m_cacheColor;
} // getColor
@ -295,17 +294,6 @@ public class MPrintColor extends X_AD_PrintColor implements ImmutablePOSupport
System.out.println(names[i] + " = " + colors[i] + " RGB=" + colors[i].getRGB()
+ " -> " + new Color(colors[i].getRGB(), false)
+ " -> " + new Color(colors[i].getRGB(), true));
/**
// Create Colors
for (int i = 0; i < colors.length; i++)
create(colors[i], names[i]);
create(whiteGray, "Gray white");
create(darkGreen, "Green dark");
create(blackGreen, "Green black");
create(blackBlue, "Blue black");
create(brown, "Brown");
create(darkBrown, "Brown dark");
**/
// Read All Colors
int[] IDs = PO.getAllIDs ("AD_PrintColor", null, null);

View File

@ -121,7 +121,6 @@ public class MPrintFont extends X_AD_PrintFont implements ImmutablePOSupport
}
if (code == null)
m_cacheFont = new Font (null); // family=dialog,name=Dialog,style=plain,size=12
// log.fine( "MPrintFont.getFont " + code, m_cacheFont);
return m_cacheFont;
} // getFont
@ -279,24 +278,6 @@ public class MPrintFont extends X_AD_PrintFont implements ImmutablePOSupport
MPrintFont pf = new MPrintFont(Env.getCtx(), 100, null);
dump( pf.getFont() );
String[] systemLocical = new String[] {"Dialog", "DialogInput", "Monospaced", "Serif", "SansSerif"};
for (int i = 0; i < systemLocical.length; i++)
{
// create(new Font(systemLocical[i], Font.BOLD, 13));
// create(new Font(systemLocical[i], Font.PLAIN, 11));
// create(new Font(systemLocical[i], Font.BOLD, 11));
// create(new Font(systemLocical[i], Font.ITALIC, 11));
// create(new Font(systemLocical[i], Font.PLAIN, 10));
// create(new Font(systemLocical[i], Font.BOLD, 10));
// create(new Font(systemLocical[i], Font.ITALIC, 10));
// create(new Font(systemLocical[i], Font.PLAIN, 9));
// create(new Font(systemLocical[i], Font.BOLD, 9));
// create(new Font(systemLocical[i], Font.ITALIC, 9));
// create(new Font(systemLocical[i], Font.PLAIN, 8));
// create(new Font(systemLocical[i], Font.BOLD, 8));
// create(new Font(systemLocical[i], Font.ITALIC, 8));
}
// Read All Fonts
int[] IDs = PO.getAllIDs ("AD_PrintFont", null, null);
for (int i = 0; i < IDs.length; i++)

View File

@ -169,7 +169,6 @@ public class MPrintFormat extends X_AD_PrintFormat implements ImmutablePOSupport
if (language != null)
{
m_language = language;
// log.fine("setLanguage - " + language);
}
m_translationViewLanguage = null;
} // getLanguage
@ -516,8 +515,6 @@ public class MPrintFormat extends X_AD_PrintFormat implements ImmutablePOSupport
*/
protected Object loadSpecial (ResultSet rs, int index) throws SQLException
{
// CreateCopy
// log.config(p_info.getColumnName(index));
return null;
} // loadSpecial
@ -530,11 +527,6 @@ public class MPrintFormat extends X_AD_PrintFormat implements ImmutablePOSupport
*/
protected String saveNewSpecial (Object value, int index)
{
// CreateCopy
// String colName = p_info.getColumnName(index);
// String colClass = p_info.getColumnClass(index).toString();
// String colValue = value == null ? "null" : value.getClass().toString();
// log.log(Level.SEVERE, "Unknown class for column " + colName + " (" + colClass + ") - Value=" + colValue);
if (value == null)
return "NULL";
return value.toString();
@ -780,7 +772,6 @@ public class MPrintFormat extends X_AD_PrintFormat implements ImmutablePOSupport
// Save & complete
pf.saveEx();
// pf.dump();
pf.setItems (createItems(ctx, pf));
//
return pf;
@ -856,7 +847,6 @@ public class MPrintFormat extends X_AD_PrintFormat implements ImmutablePOSupport
// Save & complete
pf.saveEx();
// pf.dump();
pf.setItems (createItems(ctx, pf));
//
return pf;
@ -1363,26 +1353,4 @@ public class MPrintFormat extends X_AD_PrintFormat implements ImmutablePOSupport
return this;
}
/**************************************************************************
* Test
* @param args arga
*/
static public void main (String[] args)
{
org.compiere.Adempiere.startup(true);
/**
MPrintFormat.createFromTable(Env.getCtx(), 496); // Order
MPrintFormat.createFromTable(Env.getCtx(), 497);
MPrintFormat.createFromTable(Env.getCtx(), 516); // Invoice
MPrintFormat.createFromTable(Env.getCtx(), 495);
MPrintFormat.createFromTable(Env.getCtx(), 500); // Shipment
MPrintFormat.createFromTable(Env.getCtx(), 501);
MPrintFormat.createFromTable(Env.getCtx(), 498); // Check
MPrintFormat.createFromTable(Env.getCtx(), 499);
MPrintFormat.createFromTable(Env.getCtx(), 498); // Remittance
**/
} // main
} // MPrintFormat

View File

@ -757,7 +757,6 @@ public class MPrintFormatItem extends X_AD_PrintFormatItem implements ImmutableP
{
// Set Translation from Element
if (newRecord
// && MClient.get(getCtx()).isMultiLingualDocument()
&& getPrintName() != null && getPrintName().length() > 0)
{
String sql = "UPDATE AD_PrintFormatItem_Trl "

View File

@ -26,7 +26,6 @@ import javax.print.attribute.standard.MediaSize;
import javax.print.attribute.standard.MediaSizeName;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.PO;
import org.compiere.model.X_AD_PrintPaper;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
@ -324,25 +323,4 @@ public class MPrintPaper extends X_AD_PrintPaper implements ImmutablePOSupport
}
} // CMediaSizeName
/**************************************************************************
* Test
* @param args args
*/
public static void main(String[] args)
{
org.compiere.Adempiere.startupEnvironment(true);
// create ("Standard Landscape", true);
// create ("Standard Portrait", false);
// Read All Papers
int[] IDs = PO.getAllIDs ("AD_PrintPaper", null, null);
for (int i = 0; i < IDs.length; i++)
{
System.out.println("--");
MPrintPaper pp = new MPrintPaper(Env.getCtx(), IDs[i], null);
pp.dump();
}
}
} // MPrintPaper

View File

@ -66,7 +66,6 @@ public class MPrintTableFormat extends X_AD_PrintTableFormat implements Immutabl
super (ctx, AD_PrintTableFormat_ID, trxName);
if (AD_PrintTableFormat_ID == 0)
{
// setName (null);
setIsDefault (false);
setIsPaintHeaderLines (true); // Y
setIsPaintBoundaryLines (false);

View File

@ -531,7 +531,6 @@ public class PrintData implements Serializable
log.log(Level.SEVERE, "Element not PrintData(Element) " + o.getClass().getName());
}
// As Data is stored sparse, there might be lots of NULL values
// log.log(Level.SEVERE, "PrintData.getIndex - Element not found - " + name);
return -1;
} // getIndex
@ -582,7 +581,6 @@ public class PrintData implements Serializable
log.log(Level.SEVERE, "Element not PrintData(Element) " + o.getClass().getName());
}
// As Data is stored sparse, there might be lots of NULL values
// log.log(Level.SEVERE, "PrintData.getIndex - Element not found - " + name);
return -1;
}

View File

@ -23,7 +23,6 @@ import java.util.logging.Level;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
/**
* Print Format Utilities.
@ -140,30 +139,11 @@ public class PrintFormatUtil
rs = null; pstmt = null;
}
if (counter == 0) {
if (log.isLoggable(Level.FINE)) log.fine("None"
/**
+ " - " + sql
+ " - AD_PrintFormat_ID=" + pf.getAD_PrintFormat_ID()
+ " - AD_Table_ID=" + pf.getAD_Table_ID()
*/
);
if (log.isLoggable(Level.FINE)) log.fine("None");
} else {
if (log.isLoggable(Level.FINE)) log.fine("Added=" + counter);
}
return counter;
} // addMissingColumns
/**************************************************************************
* Main
* @param args arguments
*/
public static void main(String[] args)
{
org.compiere.Adempiere.startupEnvironment(true);
//
PrintFormatUtil pfu = new PrintFormatUtil (Env.getCtx());
pfu.addMissingColumns((String)null);
} // main
} // PrintFormatUtils

View File

@ -28,7 +28,6 @@ import static org.compiere.model.SystemIDs.PRINTFORMAT_PAYSELECTION_REMITTANCE__
import java.awt.print.PageFormat;
import java.awt.print.Pageable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import java.util.Properties;
import java.util.logging.Level;
@ -47,7 +46,6 @@ import javax.print.attribute.standard.JobName;
import javax.print.attribute.standard.JobPriority;
import javax.print.attribute.standard.OrientationRequested;
import javax.swing.JDialog;
import javax.swing.JPanel;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
@ -143,7 +141,6 @@ public class PrintUtil
printerName = Ini.getProperty(Ini.P_PRINTER);
if (printerName != null && printerName.length() != 0)
{
// System.out.println("CPrinter.getPrinterJob - searching " + printerName);
PrintService[] services = getAllPrintServices();
for (int i = 0; i < services.length; i++)
{
@ -151,10 +148,8 @@ public class PrintUtil
if (printerName.equals(serviceName))
{
ps = services[i];
// System.out.println("CPrinter.getPrinterJob - found " + printerName);
break;
}
// System.out.println("CPrinter.getPrinterJob - not: " + serviceName);
}
} // find printer service
@ -432,116 +427,6 @@ public class PrintUtil
}
} // dump
/*************************************************************************/
/**
* Test Print Services
*/
private static void testPS()
{
PrintService ps = getDefaultPrintService();
ServiceUIFactory factory = ps.getServiceUIFactory();
System.out.println(factory);
if (factory != null)
{
System.out.println("Factory");
JPanel p0 = (JPanel) factory.getUI(ServiceUIFactory.ABOUT_UIROLE, ServiceUIFactory.JDIALOG_UI);
p0.setVisible(true);
JPanel p1 = (JPanel) factory.getUI(ServiceUIFactory.ADMIN_UIROLE, ServiceUIFactory.JDIALOG_UI);
p1.setVisible(true);
JPanel p2 = (JPanel) factory.getUI(ServiceUIFactory.MAIN_UIROLE, ServiceUIFactory.JDIALOG_UI);
p2.setVisible(true);
}
System.out.println("1----------");
PrinterJob pj = PrinterJob.getPrinterJob();
PrintRequestAttributeSet pratts = getDefaultPrintRequestAttributes();
// Page Dialog
PageFormat pf = pj.pageDialog(pratts);
System.out.println("Pratts Size = " + pratts.size());
Attribute[] atts = pratts.toArray();
for (int i = 0; i < atts.length; i++)
System.out.println(atts[i].getName() + " = " + atts[i] + " - " + atts[i].getCategory());
System.out.println("PageFormat h=" + pf.getHeight() + ",w=" + pf.getWidth() + " - x=" + pf.getImageableX() + ",y=" + pf.getImageableY() + " - ih=" + pf.getImageableHeight() + ",iw=" + pf.getImageableWidth()
+ " - Orient=" + pf.getOrientation());
ps = pj.getPrintService();
System.out.println("PrintService = " + ps.getName());
// Print Dialog
System.out.println("2----------");
pj.printDialog(pratts);
System.out.println("Pratts Size = " + pratts.size());
atts = pratts.toArray();
for (int i = 0; i < atts.length; i++)
System.out.println(atts[i].getName() + " = " + atts[i] + " - " + atts[i].getCategory());
pf = pj.defaultPage();
System.out.println("PageFormat h=" + pf.getHeight() + ",w=" + pf.getWidth() + " - x=" + pf.getImageableX() + ",y=" + pf.getImageableY() + " - ih=" + pf.getImageableHeight() + ",iw=" + pf.getImageableWidth()
+ " - Orient=" + pf.getOrientation());
ps = pj.getPrintService();
System.out.println("PrintService= " + ps.getName());
System.out.println("3----------");
try
{
pj.setPrintService(ps);
}
catch (PrinterException pe)
{
System.out.println(pe);
}
pf = pj.validatePage(pf);
System.out.println("PageFormat h=" + pf.getHeight() + ",w=" + pf.getWidth() + " - x=" + pf.getImageableX() + ",y=" + pf.getImageableY() + " - ih=" + pf.getImageableHeight() + ",iw=" + pf.getImageableWidth()
+ " - Orient=" + pf.getOrientation());
ps = pj.getPrintService();
System.out.println("PrintService= " + ps.getName());
System.out.println("4----------");
pj.printDialog();
} // testPS
/**
* Test Stream Print Services
*/
/*private static void testSPS()
{
// dump (DocFlavor.INPUT_STREAM.GIF, DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType());
// dump (DocFlavor.SERVICE_FORMATTED.PAGEABLE, DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType());
// dump (DocFlavor.INPUT_STREAM.GIF, DocFlavor.BYTE_ARRAY.PDF.getMimeType());
// dump (DocFlavor.SERVICE_FORMATTED.PAGEABLE, DocFlavor.BYTE_ARRAY.GIF.getMediaSubtype());
// dump (DocFlavor.SERVICE_FORMATTED.PAGEABLE, DocFlavor.BYTE_ARRAY.JPEG.getMediaSubtype());
// dump (DocFlavor.SERVICE_FORMATTED.PAGEABLE); // lists devices able to output pageable
// dump (DocFlavor.SERVICE_FORMATTED.PRINTABLE);
// dump (DocFlavor.INPUT_STREAM.TEXT_PLAIN_HOST);
// dump (DocFlavor.INPUT_STREAM.POSTSCRIPT);
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
PrintService[] pss =
PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PAGEABLE, pras);
for (int i = 0; i < pss.length; i++)
{
PrintService ps = pss[i];
String name = ps.getName();
if (name.indexOf("PDF") != -1 || name.indexOf("Acrobat") != -1)
{
System.out.println("----");
System.out.println(ps);
Class<?>[] cat = ps.getSupportedAttributeCategories();
for (int j = 0; j < cat.length; j++)
{
System.out.println("- " + cat[j]);
}
}
}
// dump (null, DocFlavor.BYTE_ARRAY.PDF.getMimeType()); // lists PDF output
// dump (null, DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMediaType()); // lists PS output
// dump(null, null);
} // testSPS*/
/**************************************************************************
* Create Print Form & Print Formats for a new Client.
* - Order, Invoice, etc.
@ -587,7 +472,7 @@ public class PrintUtil
updatePrintFormatHeader(Remittance_PrintFormat_ID, RemittanceLine_PrintFormat_ID, trxName);
// TODO: MPrintForm
// MPrintForm form = new MPrintForm();
int AD_PrintForm_ID = DB.getNextID (AD_Client_ID, "AD_PrintForm", null);
String sql = "INSERT INTO AD_PrintForm(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_PrintForm_ID,"
+ "Name,Order_PrintFormat_ID,Invoice_PrintFormat_ID,Remittance_PrintFormat_ID,Shipment_PrintFormat_ID)"
@ -620,24 +505,4 @@ public class PrintUtil
int no = DB.executeUpdate(sb.toString(), trxName);
} // updatePrintFormatHeader
/*************************************************************************/
/**
* Test
* @param args arg
*/
public static void main(String[] args)
{
// org.compiere.Adempiere.startupClient();
// setupPrintForm (11);
// setupPrintForm (1000000);
testPS(); // Print Services
// testSPS(); // Stream Print Services
// dumpSPS(null, null);
} // main
} // PrintUtil

View File

@ -18,7 +18,6 @@ package org.compiere.print;
import static org.compiere.model.SystemIDs.PROCESS_RPT_M_INVENTORY;
import static org.compiere.model.SystemIDs.PROCESS_RPT_M_MOVEMENT;
import static org.compiere.model.SystemIDs.TABLE_AD_TABLE;
import java.awt.Color;
import java.awt.Font;
@ -466,7 +465,6 @@ public class ReportEngine implements PrintServiceAttributeListener
if (log.isLoggable(Level.INFO)) log.info("Copy " + (m_info.getCopies()-1));
prats.add(new Copies(m_info.getCopies()-1));
job = getPrinterJob(m_info.getPrinterName());
// job.getPrintService().addPrintServiceAttributeListener(this);
job.setPageable (m_layout.getPageable(true)); // Copy
PrintUtil.print(job, prats, false, false);
}
@ -496,7 +494,6 @@ PrintServiceAttributeSet - length=1
queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
**/
if (log.isLoggable(Level.FINE)) log.fine("attributeUpdate - " + psae);
// PrintUtil.dump (psae.getAttributes());
} // attributeUpdate
@ -1866,12 +1863,6 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
/** Inventory Move = 11 */
public static final int MOVEMENT = 11;
// private static final String[] DOC_TABLES = new String[] {
// "C_Order_Header_v", "M_InOut_Header_v", "C_Invoice_Header_v", "C_Project_Header_v",
// "C_RfQResponse_v",
// "C_PaySelection_Check_v", "C_PaySelection_Check_v",
// "C_DunningRunEntry_v","PP_Order_Header_v","DD_Order_Header_v" };
private static final String[] DOC_BASETABLES = new String[] {
"C_Order", "M_InOut", "C_Invoice", "C_Project",
"C_RfQResponse",
@ -2122,7 +2113,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
// query
MQuery query = new MQuery(format.getAD_Table_ID());
query.addRestriction(DOC_IDS[type], MQuery.EQUAL, Record_ID);
// log.config( "ReportCtrl.startDocumentPrint - " + format, query + " - " + language.getAD_Language());
//
if (DocumentNo == null || DocumentNo.length() == 0)
DocumentNo = "DocPrint";
@ -2218,7 +2209,6 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
rs = pstmt.executeQuery();
if (rs.next())
{
// if (i == 1 && ADialog.ask(0, null, what[0] == INVOICE ? "PrintOnlyRecentInvoice?" : "PrintOnlyRecentShipment?")) break;
what[1] = rs.getInt(1);
}
else // No Document Found
@ -2259,38 +2249,6 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
}
} // printConfirm
/*************************************************************************
* Test
* @param args args
*/
public static void main(String[] args)
{
org.compiere.Adempiere.startupEnvironment(true);
//
int AD_Table_ID = TABLE_AD_TABLE;
MQuery q = new MQuery("AD_Table");
q.addRestriction("AD_Table_ID", "<", 108);
//
MPrintFormat f = MPrintFormat.createFromTable(Env.getCtx(), AD_Table_ID);
PrintInfo i = new PrintInfo("test", AD_Table_ID, 108, 0);
i.setAD_Table_ID(AD_Table_ID);
ReportEngine re = new ReportEngine(Env.getCtx(), f, q, i);
re.layout();
/**
re.createCSV(new File("C:\\Temp\\test.csv"), ',', Language.getLanguage());
re.createHTML(new File("C:\\Temp\\test.html"), false, Language.getLanguage());
re.createXML(new File("C:\\Temp\\test.xml"));
re.createPS(new File ("C:\\Temp\\test.ps"));
re.createPDF(new File("C:\\Temp\\test.pdf"));
/****/
re.print();
// re.print(true, 1, false, "Epson Stylus COLOR 900 ESC/P 2"); // Dialog
// re.print(true, 1, false, "HP LaserJet 3300 Series PCL 6"); // Dialog
// re.print(false, 1, false, "Epson Stylus COLOR 900 ESC/P 2"); // Dialog
System.exit(0);
} // main
public void setWhereExtended(String whereExtended) {
m_whereExtended = whereExtended;
}