Printing Forms

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
sanoski
Posts: 25
Joined: Sun Jan 25, 2009 10:09 am

Printing Forms

Post by sanoski » Sun Jan 25, 2009 10:29 am

I am looking for a simple way to make a program my church needs. The guy wants the program to do one thing. He needs specific forms for various things. I cannot find an example of what he showed me, but I'll do my best to describe it.

It's something like a spreadsheet, only it prints the lines so the information can be written in by hand. Can revolution be used for this task? It sounds simple enough, but I'm not sure how powerful its printing features have evolved since I last used it several years ago. It will need to systematically print lines and text in specific places on a page. The UI should be straight forward, fields to write in text, and it prints out the form-- one thing only. If it is easy enough, I might design some extra templates depending on the need.

Lets say it should look similar to this image.

Image

It will be much simpler than that, but that's a general idea. The form itself will look different with different fields, and different sized boxes, etc. But that is generally what I need to design.

It will basically be for inventory, and how many hours someone spent in service, etc. How difficult would this be to implement in Revolution?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Sun Jan 25, 2009 11:15 am

You can makie a separate printing stack, and layout all the fields, graphics and images; then when it comes to priting time, you populate those fields with data from your data entry stack, and print the printing template stack.

The script of your print button can be as simple as

Code: Select all

on mouseUp
  open invisible stack "PrintoutTemplate"
  -- populate the fields
  put "Corned beef" into field "Line1Column1" of stack "PrintOutTemplate"
  put "10" into field "Line1Column2" of stack "PrintOutTemplate"
  put "Onion soup tin" into field "Line2Column1" of stack "PrintOutTemplate"
  put "22" into field "Line2Column2" of stack "PrintOutTemplate"
  -- now send it to the printer
  print stack "PrintoutTemplate"
end mouseUp
The most difficult part will be to get the layout right and get everything to print properly within the printer's physical margins.

<plug> An alternative is to create a PDF file using Quartam PDF Library, and then asking the operating system to print that PDF file. It doesn't come with a layout builder but you'll have pin-point accuracy over what gets printed where. The other advantage is that you then also have a PDF file that you can archive, without scanning the printed page again. </plug>

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Lynn P.
Posts: 79
Joined: Sun Apr 09, 2006 1:09 pm

Post by Lynn P. » Sun Jan 25, 2009 3:40 pm

Using Rev for creating forms only to be filled in by hand seems like overkill to me, and the wrong tool for the job.
Why not just set up the form using something like MS Word? Much faster and it's WYSIWYG.
Unless you are going to fill in the form via a Rev app interface, it seems a waste of time using a programming tool to generate an empty printed form.
JMHO though. :D

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”