Batch Printing

216 views
Skip to first unread message

norber...@multimageweb.com

unread,
Nov 18, 2014, 4:17:25 AM11/18/14
to idem...@googlegroups.com
Hi,

i have request from user to print documents in batch, example: print all printed/not yet printed documents 1 pdf file (invoices) (applicable to any doctype invoice, material receipt etc., select printformat, send by email to....and lot other useful parameters.) 

user would starts batch printing from any window by click to select all or select some records or run it as a specific process, where select parameters (doctype, printed/not printed, print copy watermark). then save pdf. 

any idea how to realise it ?
norbert



This e-mail is confidential and may contain legally privileged information. It is intended only for the addressees and may not be reviewed or used in any way by other recipients. If you have received this e-mail in error, kindly notify us immediately by telephone or e-mail and delete the message and any attachments thereto from your system.

Hiep Lq

unread,
Nov 24, 2014, 11:03:41 PM11/24/14
to idem...@googlegroups.com
Hi Norber.
for batch print, you can refer class org.adempiere.webui.process.InvoicePrint

norber...@multimageweb.com

unread,
Nov 26, 2014, 5:51:53 AM11/26/14
to idem...@googlegroups.com, tomas.s...@multimageweb.com, Michal Žilinčár
Hi thanks,

so we thinking follow improvement - simple as possible first.

Admin attach process e.g. invoice printing to invoice process button. User can i.) print invoice by regular button ii.)run invoice print from process button by selecting period range from to. as result 1 pdf with e.g. 1000 invoices., shipments etc. this can be repeated normallly on all windows needs to be printed batch.

required changes (idea)
1. add parameter date range to process (e.g. accounting date range from to)
2. improve app dict -  by "do not show process parameter when printing from window" - but available when printing from regular process (add a new checkbox)
3. commit - https://idempiere.atlassian.net/browse/IDEMPIERE-1882 our possibilities could be much more improved. e.g. user when start printing in batch invoice could select print format language date range and other parameters.
4. improve - printing logic to consider printing process with new parameters. 

known issue: this could be not applicable with our actual knowledge to jasper formats - some workaround required.

also would be nice chuck requirement to select some records and print only selected docs batch.

looking for people interested to getting this done.
norbert

Carlos Antonio Ruiz Gomez

unread,
Nov 26, 2014, 7:23:01 AM11/26/14
to idem...@googlegroups.com
Hi Norbert, I'm not sure I understood the requirement but almost everything can be done actually:

> 1. add parameter date range to process (e.g. accounting date range from to)

Print invoices have date invoiced range.

> 2. improve app dict -  by "do not show process parameter when printing from window" - but
> available when printing from regular process (add a new checkbox)

In Report you can define in Show Help "Run silently - Take Defaults"

> known issue: this could be not applicable with our actual knowledge to jasper formats - some workaround required.

I think Nicolas and I fixed some batch printing processes to work with jasper.


> also would be nice chuck requirement to select some records and print only selected docs batch.

It seems easy to do it with Info Window

Regards,

Carlos Ruiz


El 26/11/14 a las 05:51, norber...@multimageweb.com escribió:

norber...@multimageweb.com

unread,
Nov 28, 2014, 12:49:50 PM11/28/14
to idem...@googlegroups.com
Carlos, thanks for valuable answer !

i added inline with red color my answers, let me summary  too my requirement: 

1. implementor opening each process beginning Rpt%, SETUP1 change Show help to Run silently - Take Defaults (ensure no parameters will appear when print from window, but showing in regular process ???) SETUP2: create/select View (e.g. C_Invoice_Header_v, C_Order_Header_v) ensure select print format will be listed in solution issue IDEMPIERE-1882 (only patch now no approved)  SETUP3:  add parameters like date from/to, type, bpartner etc.

2. Go to App Dict. Window>Tab>Toolbar Button add appropriate Process Rpt% (ensure user can run batch printing from window header)

3. Go: user opening e.g. Shipment Window selects Engine Button selects Shipment Batch Printing - opening process popup window - enter parameters like (invoice date/from, BP1) or similar cases. 

4. Result: PDF with queried printouts in 1 pdf file. (e.g. 400 pages shipments per customer for given date )

This solution enable re-use existing Rpt Processes and use it as batch printing tool. 

I believe the above description more describe my idea. 

anyway this doesnt works after above setup i got error message

18:25:42.161-----------> ReportEngine.get: No PrintFormat for Record_ID=0, Type=2 [111]
18:25:42.162===========> AbstractProcessDialog.doRun: NoDocPrintFormat [111]
org.adempiere.exceptions.AdempiereException: NoDocPrintFormat
at org.compiere.print.ReportCtl.startDocumentPrint(ReportCtl.java:357)
at org.compiere.print.ReportCtl.startDocumentPrint(ReportCtl.java:339)
at org.compiere.print.ReportCtl.start(ReportCtl.java:137)
at org.compiere.print.ReportCtl.start(ReportCtl.java:108)
at org.compiere.apps.AbstractProcessCtl.run(AbstractProcessCtl.java:289)
at org.adempiere.webui.apps.WProcessCtl.process(WProcessCtl.java:170)
at org.adempiere.webui.apps.AbstractProcessDialog$ProcessDialogRunnable.doRun(AbstractProcessDialog.java:631)
at org.adempiere.util.ContextRunnable.run(ContextRunnable.java:38)
at org.adempiere.webui.apps.DesktopRunnable.run(DesktopRunnable.java:40)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

THANKS NORBERT !

On Wednesday, November 26, 2014 1:23:01 PM UTC+1, Carlos Antonio Ruiz Gómez wrote:
Hi Norbert, I'm not sure I understood the requirement but almost everything can be done actually:

> 1. add parameter date range to process (e.g. accounting date range from to)

Print invoices have date invoiced range.

I dont want to use Proces Print Invoice. I want to use any Process Rpt with description ** Special ** Do not change **, like: Rpt C_Invoice,  Rpt C_Order, Rpt C_Payment, Rpt M_InOut...etc. so no special process required to create  in my concept.  We can reuse existing ones.

> 2. improve app dict -  by "do not show process parameter when printing from window" - but
> available when printing from regular process (add a new checkbox)

In Report you can define in Show Help "Run silently - Take Defaults"

OK this fulfill base requirement, something new for me :) thnks 

> known issue: this could be not applicable with our actual knowledge to jasper formats - some workaround required.

I think Nicolas and I fixed some batch printing processes to work with jasper.

i will look into tickets try to find out details. 
 

> also would be nice chuck requirement to select some records and print only selected docs batch.

It seems easy to do it with Info Window

don't prefer info window because from my experience not good to switch between regular window and info window. so want to give user handle it from regular window.
 

Regards,

Carlos Ruiz


El 26/11/14 a las 05:51, norber...@multimageweb.com escribió:
Hi thanks,

so we thinking follow improvement - simple as possible first.

Admin attach process e.g. invoice printing to invoice process button. User can i.) print invoice by regular button ii.)run invoice print from process button by selecting period range from to. as result 1 pdf with e.g. 1000 invoices., shipments etc. this can be repeated normallly on all windows needs to be printed batch.

required changes (idea)
1. add parameter date range to process (e.g. accounting date range from to)
2. improve app dict -  by "do not show process parameter when printing from window" - but available when printing from regular process (add a new checkbox)
3. commit - https://idempiere.atlassian.net/browse/IDEMPIERE-1882 our possibilities could be much more improved. e.g. user when start printing in batch invoice could select print format language date range and other parameters.
4. improve - printing logic to consider printing process with new parameters. 

known issue: this could be not applicable with our actual knowledge to jasper formats - some workaround required.

also would be nice chuck requirement to select some records and print only selected docs batch.

looking for people interested to getting this done.
norbert



On Tuesday, November 25, 2014 5:03:41 AM UTC+1, Hiep Lq wrote:
Hi Norber.
for batch print, you can refer class org.adempiere.webui.process.InvoicePrint

On Tuesday, November 18, 2014 5:17:25 PM UTC+8, norber...@multimageweb.com wrote:
Hi,

i have request from user to print documents in batch, example: print all printed/not yet printed documents 1 pdf file (invoices) (applicable to any doctype invoice, material receipt etc., select printformat, send by email to....and lot other useful parameters.) 

user would starts batch printing from any window by click to select all or select some records or run it as a specific process, where select parameters (doctype, printed/not printed, print copy watermark). then save pdf. 

any idea how to realise it ?
norbert



Reply all
Reply to author
Forward
0 new messages