Printing labels

Questions, tips and tricks and techniques for scripting in Servoy

Printing labels

Postby automazione » Tue Jun 17, 2003 9:57 am

Is there an easy way to define multi-column label printing?

Thanks in advance
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby maarten » Wed Jun 18, 2003 9:06 pm

Hi Enrico,

here's an example for 3 rows x 4 columns in an A4 format;

-go into designer
-set "defaultPageFormat" property to A4
- check the white dotted vertical and horizontal lines
(they mark the printable area of your form. approx 696 x 450 px)
-set width property of the form to 146px (3 x (150-4))=438 //12px offset
- set body part to height 232 px (3 x 232 = 696)

4 rows x 4 columns
rows: 4 x 112.5 -4) = 432 (112.5-4 is rounded to 108) //18 offset
columns: 4 x 174 = 696

5rows x 5 columns
rows: 5 x (90-4) = 430 //20 offset
columns: 5 x 139.2 = 696 (rounded to 139)


If you go into preview you'll see that Servoy places labels automatically form left to right, downwards.
I will ask dev. team why there's a slight offset in the row calculations.
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby maarten » Wed Oct 08, 2003 9:41 pm

is fixed in next build.(after 1.2 rc5)
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby Harjo » Thu Feb 19, 2004 9:58 pm

Is this still working in 2.0 rc6?
I can't get it working! No matter what I do, in print-preview I only see 1 label on each page!

Is there an other (simpler) way of creating/designing labels?
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby Jan Blok » Tue Feb 24, 2004 12:41 am

made simple sample to show muliple column label printing (added rounded rect. to indicate label)
Attachments
label_printing.servoy
(3.99 KiB) Downloaded 558 times
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Harjo » Tue Feb 24, 2004 10:23 am

OHO! :oops: I had duplicated the form from an other form and had the: PageBreakAfterOccurance = 1
that's why it did'nt work. Sorry! :oops:
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby Providence1 » Wed Sep 22, 2004 4:44 am

Is there any way to create the gutter between the labels. In other words, if i know the measurements for the margins and the gutter, can I somehow create an Avery template?

Providence
Providence1
 
Posts: 456
Joined: Tue Aug 17, 2004 2:36 am
Location: New York, NY

Postby Providence1 » Thu Sep 23, 2004 12:15 am

Also, I am looking for information to programmatically set the margins of a page (right now they reset everytime the solution is re-opened).

In addition, any ideas why I'm only getting a first row of labels?

Three across on a form that's set to:

width: 200
height: 80

Top page margins: 0.5
Side Margins: 0.62

I've searched the forums, the books and the f1 help for this!

Regards,

Providence
Providence1
 
Posts: 456
Joined: Tue Aug 17, 2004 2:36 am
Location: New York, NY

Postby bcusick » Thu Sep 23, 2004 1:10 am

Providence1 wrote:Also, I am looking for information to programmatically set the margins of a page (right now they reset everytime the solution is re-opened).

In addition, any ideas why I'm only getting a first row of labels?


Click on your "body" part and make sure that the pageBreakAfterOccurance property is set to 0. Also make sure that your form view property is set to "Record view".

Providence1 wrote:page margins: 0.5
Side Margins: 0.62

I've searched the forums, the books and the f1 help for this!


Ahem.... type "margins" into the "Search" tab of the F1 Help...

Check out the screen shot.

Hope this helps,

Bob Cusick
Attachments
pagesetup.JPG
pagesetup.JPG (46.8 KiB) Viewed 10904 times
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby Providence1 » Fri Sep 24, 2004 11:04 am

Doh!

Okay, I'm dumb! Realized where the heck the defaultPageFormat was just as you responded!

Indeed, the pageBreakAfterOccurance property was set to 0. Form view property was set to "Record view", but I didn't have enough records in my dummy database to go past the first line.

But when I select Page Margins on the help search return box, the example is not coming up!

http://homepage.mac.com/providence/FileSharing22.html
Providence1
 
Posts: 456
Joined: Tue Aug 17, 2004 2:36 am
Location: New York, NY

Postby mnorman » Fri Sep 24, 2004 1:43 pm

Providence1 wrote:But when I select Page Margins on the help search return box, the example is not coming up!


This has been fixed.

Thank you for reporting this problem.

Here is a workaround to find "margin" in the Help Navigator:

-Choose Help>Help (F1) to open the Servoy Help Navigator.
-Click the "Index" tab.
-Enter "page setup" in the search criteria box.
-Double click on "page setup" from the list to open the Page Setup topic.
-Choose Tools>Find (CTRL-F/CMD-F)
-Enter "margin" in the "Find What" box.
-Press the "Find Next" button to highlight the first instance of "margin".
-Press the "Find Next" button to highlight each additional instance of
"margin" IN THE OPEN TOPIC.

_____________
Marc Norman
Servoy
mnorman
 
Posts: 106
Joined: Wed Sep 24, 2003 8:50 pm
Location: Alturas, CA

Postby Providence1 » Fri Sep 24, 2004 7:02 pm

This is my last post on the subject...

I'm using a method with a bunch of IF statements to pull the right address info from the front most address tab panel selected (be it Main, Home, Second Home, Second Office, etc). It also checks if any of the fields are empty and writes the answers to variable equivalents, i.e. "var address1Field, address2Field, then writes all of those to a global variable which I can then attached to a field and use as my label on a form.

What I want to know is, how do I send an array of foundrecords to the global (or a local variable) so that I can see more than just the current record?

I'm having a tough time setting a field to a local var, or some other senario I not seeing.

This will be a huge step in understand how calcs work in relation to everything else (globals, etc).

Thanks!

Providence
Providence1
 
Posts: 456
Joined: Tue Aug 17, 2004 2:36 am
Location: New York, NY

Postby Providence1 » Tue Sep 28, 2004 7:43 pm

Anyone?
Providence
Providence1
 
Posts: 456
Joined: Tue Aug 17, 2004 2:36 am
Location: New York, NY

Postby Providence1 » Thu Sep 30, 2004 1:41 am

Bueller?
Providence
Providence1
 
Posts: 456
Joined: Tue Aug 17, 2004 2:36 am
Location: New York, NY

Postby Jan Blok » Thu Sep 30, 2004 9:53 am

Why whould you "assign an array of foundrecords to a global" ?
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Next

Return to Methods

Who is online

Users browsing this forum: No registered users and 11 guests