PDF output is interrupted when columns are hidden

This post is in regards to a similar bug that was previously fixed in TAdvDbGrid cell color works fine on screen, but in PDF output a different column is targeted - #11 by Vinson_Stephen

I have modified the test program that I previously created for the now-fixed bug above. Three files are attached to this post: a PAS file, a DFM module and its corresponding text-version (if that's what you prefer).

Compile/run to see what I'm observing: When all columns are showing, exporting to PDF works fine. But now remove random column(s) by unchecking any combination of checkboxes offered in the program. Now try to export to a PDF again. You'll see only the first page is output. Moreover, I'm seeing some of the trailing columns in that first page are missing. It's as if something is crashing during the PDF generation before the entire grid is rendered in the PDF canvas, although no exception is triggered.

Let me now if you need anything else.

Steve V.

testPdfColorsUnit.dfm (11.5 KB)
testPdfColorsUnit.dfm.txt (11.5 KB)
testPdfColorsUnit.pas (7.7 KB)

We will investigate.
As a workaround for now, move the hidden columns to the rightmost position.

I forgot to mention that this is observed with Delphi 10.2. I haven't checked it in my Delphi 11.3 environment, but I presume the issue will be there as well.

The behavior should be the same between Delphi 10.2 and Delphi 11.3


We have applied a fix, next version of TMS VCL UI Pack will address this.