The best way to print a long table field

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
CAsba
Posts: 384
Joined: Fri Sep 30, 2022 12:11 pm

The best way to print a long table field

Post by CAsba » Tue May 21, 2024 9:40 am

Hi all,
My table field has unlimited lines of data, all to be printed. It prints 36 lines per page. I tried looking up a way to print 350 lines, over 10 pages, but didn't find anything. The first 'column' of a line is an Index number that increases by 1 for each next line. I'm thinking of finding a way to set each page of the TF to Indexes 1 - 36, 37 - 72, etc., and to print each card showing the range, in a repeat loop. This procedure could be arduous, and may not even work, so I would like to ask - (a) is there a better, more obvious way that you guys may know, and if not, (b) is my idea feasible ?

CAsba
Posts: 384
Joined: Fri Sep 30, 2022 12:11 pm

Re: The best way to print a long table field

Post by CAsba » Tue May 21, 2024 12:57 pm

SOLVED
I populated the table field (from the datagrid) iusing usingn a batch of 36 lines, print a batch, populate again, print again, etc..,
using a loop to create a batch, and a second loop, til all the batches added up to the dg number of lines.

stam
Posts: 2755
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: The best way to print a long table field

Post by stam » Tue May 21, 2024 1:33 pm

Glad you solved this!

Not being very familiar with printing I was imagining how to do this and it struck me this would be a nice print-preview feature:
Ceate a substack, laid out as you would want to print, perhaps with a first/title page and subsequent pages being different cards and just print the card. You wouldn't need to create multiple subsequent cards, just update the table/DG showing the records to be printed (i.e. 1-36, 37-72 etc). Really you wouldn't even need to export the data to a tableField if you did this...

You could include navigation/print/cancel buttons that are hidden when printing the cards... just a thought.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”