| View previous topic :: View next topic |
| Author |
Message |
jellofishi Newbie

Joined: 13 Feb 2005 Posts: 3
|
Posted: Thu Dec 08, 2005 1:36 pm Post subject: labels with datasource and automatic numbering |
|
|
hi
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 |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Fri Dec 09, 2005 8:32 am Post subject: |
|
|
| 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 |
|
 |
jellofishi Newbie

Joined: 13 Feb 2005 Posts: 3
|
Posted: Fri Dec 09, 2005 10:38 am Post subject: |
|
|
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 |
|
 |
howard OOo Advocate

Joined: 28 Feb 2004 Posts: 323 Location: Newfoundland
|
Posted: Fri Dec 09, 2005 11:32 am Post subject: |
|
|
[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 XP Home (hardly ever used!) |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Fri Dec 09, 2005 11:49 am Post subject: |
|
|
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 |
|
 |
howard OOo Advocate

Joined: 28 Feb 2004 Posts: 323 Location: Newfoundland
|
Posted: Fri Dec 09, 2005 4:42 pm Post subject: |
|
|
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 XP Home (hardly ever used!) |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8995 Location: Lexinton, Kentucky, USA
|
Posted: Sat Dec 10, 2005 8:34 am Post subject: |
|
|
Howard,
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 |
|
 |
|