extools.report¶
Tools for generating reports.
They are often required, but who ever remembers the params and criteria? These classes are designed to capture that knowledge for re-use.
They should be pretty strightforward to use:
report = POPurchaseOrderReport("PO0001", "PO0003")
report.generate(destination="preview")
To print to a file:
report = POPurchaseOrderReport("PO0001", "PO0003")
report.generate(destination="file", path="C:\Temp\report.pdf")
To open the print dialogue, pass the UI instance:
report = POPurchaseOrderReport("PO0001", "PO0003", ui=self)
report.generate(destination="file", path="C:\Temp\report.pdf")
To override a parameter:
report = POPurchaseOrderReport("PO0001", "PO0003", ONHOLD="1")
report.generate(destination="file", path="C:\Temp\report.pdf")
To override the selection criteria:
criteria = "((POPORH.ORDNUMBER = 'ORD00001'))"
report = POPurchaseOrderReport("PO0001", "PO0003",
**{"@SELECTION_CRITERIA": criteria})
report.generate(destination="file", path="C:\Temp\report.pdf")
-
class
extools.report.
APChequeReport
(**kwargs)[source]¶ Bases:
extools.report.ReportWrapper
-
parameter_set
= 'BKCHKSTK'¶
-
parameters
= {'APPRUNNUM': '', 'ENDSERIAL': '{to_id}', 'EXTPARAM1': '2', 'EXTPARAM2': ' ', 'EXTPARAM3': ' ', 'STARTSERIAL': '{from_id}'}¶
-
reports
= ('APCHK01.RPT',)¶
-
-
class
extools.report.
EFTVendorRemittanceReport
(**kwargs)[source]¶ Bases:
extools.report.ReportWrapper
-
parameter_set
= 'ELPAY01'¶
-
parameters
= {'BATCHTYPE': 'PY', 'DELMETHOD': '1', 'FROMBTCH': 0, 'FROMENTRY': 0, 'TOBTCH': 0, 'TOENTRY': 0, 'UNPOSTED': '0'}¶
-
reports
= ('ELPAY04.RPT',)¶
-
-
class
extools.report.
InvoiceActionsReport
(**kwargs)[source]¶ Bases:
extools.report.ReportWrapper
-
parameter_set
= 'OEINACTS'¶
-
params
= {'FROMDATE': '0', 'FROMSHIPMENT': '{from_id}', 'FUNCDECS': '2', 'LEVEL1NAME': ' ', 'LEVEL2NAME': ' ', 'LEVEL3NAME': ' ', 'PRINTAMTIN': '1', 'QTYDECS': '4', 'REPORTTYPE': '1', 'SWINCLJOB': '0', 'SWMULTICURR': '0', 'SWPMACTIVE': '0', 'THENBY': '1', 'THENBYFROM': ' ', 'THENBYTO': ' ', 'TODATE': '20500101', 'TOSHIPMENT': '{to_id}'}¶
-
reports
= ('OEINACTS.RPT',)¶
-
-
class
extools.report.
OEInvoiceReport
(**kwargs)[source]¶ Bases:
extools.report.ReportWrapper
-
parameter_set
= 'OEINV03'¶
-
parameters
= {'ECENABLED': '0', 'PRINTBOM': '0', 'PRINTED': '1', 'PRINTKIT': '0', 'QTYDEC': '0', 'SERIALLOTNUMBERS': '0', 'SORTFROM': '{from_id}', 'SORTTO': '{to_id}', 'SWDELMETHOD': '3'}¶
-
reports
= ('OEINV03.RPT',)¶
-
selection_criteria
= '(({{OEINVH.INVNUMBER}} >= "{from_id}") AND ({{OEINVH.INVNUMBER}} <= "{to_id}"))'¶
-
-
class
extools.report.
POPurchaseOrderReport
(**kwargs)[source]¶ Bases:
extools.report.ReportWrapper
-
parameter_set
= 'POPOR04'¶
-
parameters
= {'ACTIVE': '1', 'BLANKET': '1', 'DELMETHOD': '1', 'DIRECTEC': '0', 'DPRINTED': '1', 'ECENABLED': '0', 'FUTURE': '1', 'PORFROM': '{from_id}', 'PORTO': '{to_id}', 'PRINTED': '1', 'QTYDEC': '0', 'SORTFROM': '{from_id}', 'SORTTO': '{ponumber}', 'STANDING': '1', 'SWDELMETHOD': '3'}¶
-
reports
= ('POPOR04.RPT',)¶
-
selection_critieria
= '\n (({{POPORH1.PONUMBER}} >= "{from_id}")\n AND ({{POPORH1.PONUMBER}} <= "{to_id}"))\n '¶
-
-
class
extools.report.
PayrollChequeReportGenerator
(**kwargs)[source]¶ Bases:
extools.report.ReportWrapper
-
parameter_set
= 'BKCHKSTK'¶
-
parameters
= {'APPRUNNUM': '', 'ENDSERIAL': '{to_id}', 'EXTPARAM1': '2', 'EXTPARAM2': 'True', 'EXTPARAM3': ' ', 'STARTSERIAL': '{from_id}'}¶
-
reports
= ('CPCHK4A.RPT',)¶
-