Printing pdf with datagrid... dynamically

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
D4vidrim
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 61
Joined: Fri May 31, 2013 9:32 am

Printing pdf with datagrid... dynamically

Post by D4vidrim » Tue Jun 16, 2015 11:59 pm

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 :)

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Printing pdf with datagrid... dynamically

Post by MaxV » Thu Jul 09, 2015 1:18 pm

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
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply