Make printing filename configurable
Description
Environment
8.2
causes
is blocked by
relates to

Activity

Former user March 5, 2024 at 7:16 PM
Former user
March 5, 2024 at 7:16 PM
+1 important feature, good to improve.
Carlos Ruiz March 5, 2024 at 7:16 PM
Carlos Ruiz
March 5, 2024 at 7:16 PM
BTW - is maybe not too difficult, on line 1863 of Env class (as of today) the format could be split again in column+format
Carlos Ruiz March 5, 2024 at 7:14 PM
Carlos Ruiz
March 5, 2024 at 7:14 PM
There is a potential improvement here, at this moment is not possible to format a column that comes from another table.
The notation for format is something like @DateAcct<yyyy-MM-dd>@
And the notation here for foreign columns is something like @C_Invoice_ID<DateAcct>@
That creates a problem that the DateAcct can be formatted when coming from the record being printed, but not when coming from another record.
A possible solution could be to support a combined notation like @C_Invoice_ID<DateAcct<yyyy-MM-dd>>@
Norbert Bede August 27, 2022 at 9:32 PM(edited)
Norbert Bede
August 27, 2022 at 9:32 PM
(edited)
Documentation
Carlos Ruiz July 18, 2022 at 1:28 PM
Carlos Ruiz
July 18, 2022 at 1:28 PM
Solved in
Fixed
Details
Details
Created April 7, 2021 at 8:32 AM
Updated June 10, 2024 at 3:19 PM
Resolved July 18, 2022 at 1:28 PM
xref: https://idempiere.atlassian.net/browse/IDEMPIERE-82?focusedCommentId=11484
the aim of this improvement to allow configure print files operating system filename before file is saved, override default filename eg. InvoiceFormatGroupLinesbyCategory__5099627889056305320.pdf to SCO20210406-001
Requirement & changes
1. add "FileNamePattern" field to ad_printformat
2. all report files will be stored on linux tmp in folders (using new Method FileUtil.createTempFile), avoid conflict (filename_timestamp), applied when sending report as email too
4. new Method: FileUtil.createTempFile -(based on File.createTempFile) - Instead of creating unique tempfile it will create unique temp directory with File name [prefix].[sufix] .
5. Temp Folder Format: [java.io.tmpdir]/rpttmp_[yyyyMMddHHmmss]_[AD_SESSION_ID]/
6. support for all format types supported in reportengine pdf, html, xls(x)
7. FileNamePattern is applied as ReportName affecting print preview name
6. support for forms and not forms (tabular reports)
7. if FileNamePattern is null - we will use tmp folder. Default Name format will be [PrintFormat_trl.Name]_[yyyyMMddHHmmss]
setup example
invoice_@DocumentNo@
rechnung_@DocumentNo@ (on _trl)
out of scope:
- jasper printing