Unable to use 2 print format item with the same AD_Column_ID and different formatting

Description

Steps to reproduce:

1 - Choose Invoice Detail & Margin and run
2 - Edit the print format item as follows:
Column: DateInvoiced, FormatPattern: MM/dd


Column: DateInvoiced, FormatPattern: yyyy


3 - Refresh the report and see the wrong result:

Looking into the code, this happens because on PrintData java class we have:

Ttrusting only on AD_Column_ID the wrong index is returned and the value is not the expected.

Environment

None

Attachments

4
  • 01 Apr 2020, 01:11 PM
  • 01 Apr 2020, 01:05 PM
  • 01 Apr 2020, 01:02 PM
  • 01 Apr 2020, 01:01 PM

Activity

Heng Sin Low 
June 24, 2021 at 1:49 PM

  1. The created PR is not backward compatible (source and binary) but is backward compatible with existing print format. I didn’t find a way to address the issue raise in this ticket without breaking source level backward compatibility.

  2. If we don’t want to address this since there’s a pretty straightforward workaround (create a virtual column), we should close this ticket and implement https://idempiere.atlassian.net/browse/IDEMPIERE-3402 instead (i.e prevent > 1 printformatitem created for 1 AD_Column_ID since it doesn’t work in current code).

Andres Lopez Andrade 
August 22, 2020 at 3:34 AM

Still reproducible on 7.1z

Layda Salas 
July 30, 2020 at 10:34 AM

Tested und Reproduced in 7.1z

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created April 1, 2020 at 1:12 PM
Updated August 1, 2021 at 11:46 AM
Resolved June 28, 2021 at 11:47 AM