Labels from database records

Getting your data onto paper - or the web - Discussing the reports features of Base

Labels from database records

Postby hstoellinger » Wed Jan 02, 2008 3:29 pm

I am trying to print labels from a MySQL-DB. One label is to be printed from each DB-record. They are supposed to look something like this:
"Number" "Title-Line 1"
"part x of y". "Title-Line 2"
The number in "Number" should be printed to the left of the label in a large font, "part..." in a small font below the number; "Title" is sometimes too long to fit on one line and will therefore wrap to the second line. In that case the second line should be offset accordingly.
I have tried to use tabs or frames to format the output. However, when I then try to synchronize the labels, this doesn't work.
Thanks for any thoughts
H. Stoellinger
hstoellinger
 
Posts: 11
Joined: Tue Jan 01, 2008 7:01 pm

Re: Labels from database records

Postby JohnV » Thu Jan 03, 2008 3:23 am

Interesting question. Try this.

Turn on View > Nonprinting Characters (Ctrl+F10 will toggle it). In the upper left label note that each line ends with a line break. Delete each of these and tap Enter to replace with a paragraph break. Select both paragraphs and do Format > Paragraph > Indents & Spacing tab. Set Before Text to something like 1" and First Line to -1" which will give you a hanging indent paragraph style. Click Synchronize.

May not work perfectly but it's the best I can think of.
JohnV
Volunteer
 
Posts: 1585
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Labels from database records

Postby hstoellinger » Wed Jan 16, 2008 6:36 pm

Thanks for your hints, John - I now get (roughly) what I want! It works for "single labels". However: the paper I use for my labels has three colums. So, what I have done, is to define three labels with the respective desired offsets from the left edge (eg. 2cm, 7,5cm,12,5cm), copying everything else from the first (left-side) label. I did so because I don't want to have to fiddle with changing indent specifications, font sizes, etc. for every one of the three fields in the generated document.
The funny thing is, however, that the "synchronize" dialog box does not appear when I specify that I want to print a pageful (or more, ofcourse!) of labels. I did so with the business-card facility and it works there. What I REALLY need to do most of the time is to print - say - half a page or maybe two and a half pages of labels/business cards, depending on the database records that fit the selection criteria. As it is, a whole page gets printed regardless. I see this because I include a graphic as well as fixed text in the business cards and they always print on the rest of the last page of business cards.
Any chance of improving this situation?
Regards from Salzburg - Austria
Heinrich
hstoellinger
 
Posts: 11
Joined: Tue Jan 01, 2008 7:01 pm

Re: Labels from database records

Postby JohnV » Wed Jan 16, 2008 9:36 pm

The funny thing is, however, that the "synchronize" dialog box does not appear when I specify that I want to print a pageful (or more, ofcourse!) of labels.
The Synchronize button is either alway there or never there depending on whether you checked Synchronize on the Options tab when you originally created the labels.
So, what I have done, is to define three labels with the respective desired offsets from the left edge (eg. 2cm, 7,5cm,12,5cm), copying everything else from the first (left-side) label
If the Synch button is available then you only need format the upper left label and click it to pass the format on to all other labels.
What I REALLY need to do most of the time is to print - say - half a page or maybe two and a half pages of labels/business cards, depending on the database records that fit the selection criteria. As it is, a whole page gets printed regardless. I see this because I include a graphic as well as fixed text in the business cards and they always print on the rest of the last page of business cards.
I don't think so because you have something there to print.
JohnV
Volunteer
 
Posts: 1585
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Labels from database records

Postby hstoellinger » Thu Jan 17, 2008 6:56 pm

Hello John,
Sorry to disappoint you: I started a new labels definition completely from scratch, made sure to check the synchronize box - alas, the synchronize dialog box is NOT displayed in the new document. I do know that I would only have to define the top-left label - if the synch box worked, however...
No, I DON't always have "something to print" (at least not a WHOLE page of labels!). Maybe we are talking at cross purpose here: I might want to print only ONE label, maybe 7 labels (which would only fill PART of a whole page (3 colums, 14 rows of labels) or even multiple pages of labels (the last one possibly only half full). I don't want to waste half a page or more of a sheet of pre-punched labels or business cards every time I only want to print a handful.
As I said - maybe we are talking at cross-purpose here.
Regards
Heinrich
hstoellinger
 
Posts: 11
Joined: Tue Jan 01, 2008 7:01 pm

Re: Labels from database records

Postby thomasjk » Thu Jan 17, 2008 9:59 pm

Look at this link if all you want to do is print a few labels at a time. You'll have to scroll down to find the details.
http://openoffice.blogs.com/openoffice/ ... index.html
Tom K.
Windows 10 Home version 1803 17134.165
LibreOffice 5.4.7.2
thomasjk
Volunteer
 
Posts: 4413
Joined: Tue Dec 25, 2007 4:52 pm
Location: North Carolina

Re: Labels from database records

Postby JohnV » Thu Jan 17, 2008 11:23 pm

made sure to check the synchronize box - alas, the synchronize dialog box is NOT displayed in the new document
I believe you should Repair your installation if you installed the version from the OpenOffice.org forum. Some versions packaged with Linux distributions (especially Umbunto or whatever) do some strange things.

No, I DON't always have "something to print" (at least not a WHOLE page of labels!)
Let's say you have 100 address records but only want to print 7 of them. Open the label template, click the print icon, answer 'yes' to the 'form letter' query, select the 7 records with the gray boxes to their left and print. Then to print on this partially used label sheet you can use this macro.
http://www.oooforum.org/forum/viewtopic ... abel+sheet
Note - I just made a change in this code so if you use it let me know if experience any problems.
JohnV
Volunteer
 
Posts: 1585
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest