Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom PDF-creating code to be called via print-format #4587

Closed
metas-ts opened this Issue Sep 14, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@metas-ts
Copy link
Member

metas-ts commented Sep 14, 2018

Is this a bug or feature request?

FR

What is the current behavior?

A process that is callable via AD_Printformat basically needs to be an "old school Compiere" report, or a "jasper" report.
What's not working is to invoke some other code that returns a byte[] containing the report's PDF data

Which are the steps to reproduce?

Documentation

The first example that makes use of this feature is the process C_DunningDoc_JasperWithInvoicePDFs.
You can select it in an AD_Printformat that then used that printformat like and other.
E.g. in C_DocType or C_DocOutBound_Config


Note, the standard process for jasper reports has changed to be de.metas.report.jasper.client.process.JasperReportStarter

You don't need to remember, though; Tehre is a callout for AD_Process that inserts this ClassName "IsProcess" is checked and "ClassName" is still empty:
image

@metas-ts metas-ts self-assigned this Sep 14, 2018

@metas-ts metas-ts changed the title Allow custom code that creates PDF-data to be called via print-format Allow custom PDF-creating code to be called via print-format Sep 14, 2018

metas-ts added a commit that referenced this issue Sep 14, 2018

#4587-app - Allow custom PDF-creating code to be called via print-format
* decouple ReportStarter from jasper code; also move it from swat to base
  * introduce interface ExecuteReportStrategy that is invoked by ReportStarter
  * create a default implementation called JasperExecuteReportStrategy which invokes the jasper service.
* add process JasperReportStarter that subclasses ReportStarter that behaves the way ReportStarter did
  * add a callout for AD_Process that suggests ClassName JasperReportStarter if IsProcess is checked and ClassName is still empty
* ReportEngine does not directly call IJasperReportEngineAdapter anymore, but instead invokes the printformat's AD_Process
* rename IJasperService* to IPrintService*, because there is no more connection to jasper
* remove obsolete Jasper related code
* div cleanups and class movings

metas-ts added a commit that referenced this issue Sep 14, 2018

metas-ts added a commit that referenced this issue Sep 14, 2018

Merge pull request #4588 from metasfresh/gh4587-app
#4587-app - Allow custom PDF-creating code to be called via print-format

metas-ts added a commit that referenced this issue Sep 17, 2018

#4587-app - Allow custom PDF-creating code to be called via print-format
* fix AD_SysConfig
* add a bit of logging to DocOutboundWorkpackageProcessor

metas-ts added a commit that referenced this issue Sep 17, 2018

@metas-dh

This comment has been minimized.

Copy link
Member

metas-dh commented Sep 19, 2018

Results of IT1
tested in release

tested again the new process C_DunningDoc_JasperWithInvoicePDFs:

  • new process available in DocOutbound Config: OK
  • process working fine, in dunning: dunning doc and resp. invoice: OK
  • dunning doc and sales invoice are displayed in Doc Outbound: OK
  • printing queue:
    • entry for the sales invoice: OK, PDF: OK
    • entry for the dunning doc: OK, PDF: includes the sales invoice as well: OK

@metas-dh metas-dh closed this Sep 19, 2018

metas-ts added a commit that referenced this issue Sep 19, 2018

#4587-app - Allow custom PDF-creating code be called via print-format
bugfix: we don'T need an existing C_Dunning-doc archive

metas-ts added a commit that referenced this issue Sep 20, 2018

#4587-app - Allow custom PDF-creating code be called via print-format
bugfix: we don'T need an existing C_Dunning-doc archive
(cherry picked from commit b915b50)
@metas-ts

This comment has been minimized.

Copy link
Member Author

metas-ts commented Sep 20, 2018

🍒 picked #4587 to release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.