OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

labels with datasource and automatic numbering

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
jellofishi
Newbie
Newbie


Joined: 13 Feb 2005
Posts: 3

PostPosted: Thu Dec 08, 2005 1:36 pm    Post subject: labels with datasource and automatic numbering Reply with quote

hi Smile
loving OOo

i would like to do the following :
have labels, with fields from a database datasource, and sequencialy numbered labels. all the labels refer to the same record in the datasource, but each label needs to have a sequential number.

the part with the fields from the datasource i have figured out. i just need the counter.

is there any way to define a field as sequential counter for each label, with the initial value taken from an input field in the first label ?
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Fri Dec 09, 2005 8:32 am    Post subject: Reply with quote

Quote:
all the labels refer to the same record in the datasource
It sounds like you want the equivalent of a sheet full of return address labels that are sequentially numbered.

It appears that labels can only merge data from one data source and because you are only going to reference one record in your existing table you can't use that to provide the numbers so here's my approach.

In a spreadsheet label a column Number, put the starting number in the cell beneath and drag down to get your sequential numbers. Register this as a Data Source.

At File > New > Labels use this as your Data Source an insert the Number field in the left pane. Go the the Options tab and check Synchronize and then click New Document. With your cursor behind Number in the upper left label tap Enter to open room for the rest of the label content.

Now you can simple type in the rest of the content or get it from the original table as follows:
Press F4, open your table so the records appear on the right and select your record with the gray button to its left. Click the Data to Text icon, put the bullet in Text then move the field names from left to right, organize them as they should appear in the label and OK out. The data from the record should now be in the label.

Click the Synchronize button to pass the content of this label to all others. Click the Print icon and answer 'yes' to the 'form letter' question. In the dialog that appears just remember that you are going to get as many numbered labels as the number of records you select. So if your sequential numbers run from 1 to 1000 but you really only want 50 labels be sure to select 50 records instead of using the default of "All".
Back to top
View user's profile Send private message
jellofishi
Newbie
Newbie


Joined: 13 Feb 2005
Posts: 3

PostPosted: Fri Dec 09, 2005 10:38 am    Post subject: Reply with quote

thanks.
i'm trying a slightly different way.
i made one table with the common data, and one with the sequential data, and created a view that contains all the info, linked together with one of the columns from each table.

my problem now is that OOo.base doesn't seem to be too stable with it's own file format. things break very often when editing the database tables. tried postgresql, but that didn't behave well either (more stable, but problems with primary keys in tables being sequences). mysql 4 seems to be behaving nicely, but lacks views. will try mysql 5 next. if it behaves as well as 4 with the addition of views that'll be good.
Back to top
View user's profile Send private message
howard
OOo Advocate
OOo Advocate


Joined: 28 Feb 2004
Posts: 333
Location: Newfoundland

PostPosted: Fri Dec 09, 2005 11:32 am    Post subject: Reply with quote

[quote="JohnV"]
Quote:

In a spreadsheet label a column Number, put the starting number in the cell beneath and drag down to get your sequential numbers. Register this as a Data Source.


John,
I don't quite understand this line. I tried dragging a cell with a number in it and nothing happened. What I would do is to put a formula like =row()-1 in row 2 if I wanted to start at one and paste this into as many cells as I wanted to get my sequence. Can you explain the dragging business.
_________________
Howard
3.41 (Vanilla) on various versions of PCLinuxOS and 4.01 on W8.1 (hardly ever used!)
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Fri Dec 09, 2005 11:49 am    Post subject: Reply with quote

Howard,

Put a number in any cell. Move the mouse cursor to the lower right corner of the cell until it changes to a crosshair then click and drag down.
Back to top
View user's profile Send private message
howard
OOo Advocate
OOo Advocate


Joined: 28 Feb 2004
Posts: 333
Location: Newfoundland

PostPosted: Fri Dec 09, 2005 4:42 pm    Post subject: Reply with quote

Thanks John, I've been using SO and OOo spreadsheets for years and never come across that before. I think I may have done it accidentally and not realised what was happening.

I see that if the contents are other than a number (text or formula) it just echoes them, but it's a bit quicker than the cut and pasting I've been doing up to now. Any other tricks? Can you increment alphabetical characters anyway e.g a,b,c,.... for example? (I can see how to do that with a formula.)
_________________
Howard
3.41 (Vanilla) on various versions of PCLinuxOS and 4.01 on W8.1 (hardly ever used!)
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Sat Dec 10, 2005 8:34 am    Post subject: Reply with quote

Howard,
Quote:
Any other tricks?
Open a Calc doc, do Tools > Options > Calc > Sort Lists to see other items that will "propagate" and note that you can add your own with New.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group