Mario Calderon - 2007-06-27

Hello,

I produce an exception in the Product window after pressing the buttons "Print Preview" or "Print".

The Configuration:

- I create a Print Format for the table M_Product, with some Columns.
- I create a Process with that Print Format associated.
- In the Product window, Product tab, I refer to the process.
- Right after pressing OK in the filter dialog of the Product window, the beep sounds, but no error or warning is shown in the console.
- When I press the buttons "Print Preview" or "Print" in the Product window, it produces always an error: the window "Print Preview" or "Print" freezes.
This happens only when the Print format includes the column "Product Category" in its display order. With many other columns it works OK.
On the console, I always get the following error

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid substring range
    at java.text.AttributedString.addAttribute(AttributedString.java:315)
    at org.compiere.print.layout.TableElement.printColumn(TableElement.java:1411)
    at org.compiere.print.layout.TableElement.paint(TableElement.java:1155)
    at org.compiere.print.layout.Page.paint(Page.java:167)
    at org.compiere.print.View.paintComponent(View.java:118)
    at javax.swing.JComponent.paint(JComponent.java:1006)
    at javax.swing.JComponent.paintChildren(JComponent.java:843)

- In Eclipse, execution stucks at
java.awtEventDispatchThread.run() line 144

Best regards
Mario Calderon