Page 1 of 1

Printing pdf with datagrid... dynamically

Posted: Tue Jun 16, 2015 11:59 pm
by D4vidrim
Hi all,
I'm writing an app to create pdf files with some fields and a datagrid.
My problem is about data grid: I do not know in advance how many records will be on it, so I have to resize the table dynamically and, sometimes, it might be that I need more than a page to show all the records from it.

Is there any tutorial I could read about printing pdf with data grid?
Maybe someone has already found an easy solution!

Thank you :)

Re: Printing pdf with datagrid... dynamically

Posted: Thu Jul 09, 2015 1:18 pm
by MaxV
My experience is this:
  1. I use a separate substack for printing
  2. expand your datagrid to the maximum allowable size filling the datagrid
  3. now you can know the maximum number of lines that datgrid can contains
  4. prior printing get the number of lines of datagrid, if they exceed you maximum, create a new card