Inserting Multiple Serial Numbers Into A Design S’abonner

0
Avatar
Legacy Poster

Dear Seagull,

I am using a Excel data source, whereby all the serial numbers is in 1 column.

I am trying to create a label to print out 10 serial numbers in a label. The way I found to do this is by putting 10 serial numbers in a row (thus meaning there will be 10 columns), then manually create 10 boxes in the label where each is linked to a column. I find this method troublesome.

Please advise how to do this with just 1 column.

Thanks

5 commentaires

0
Avatar
Shotaro Ito
Modérateur
Actions pour les commentaires Permalien

Hi LHG,

You can add numbers to database field value, by VB Script Datasource > More Options > VB Script > OnProcessData Event.
For example, if you have start number of serial in column "SERIAL" in Excel, have scripts like..

Text 1
Datasource: Database Field "SERIAL"
OnProcessData Script: None

Text 2
Datasource: Database Field "SERIAL"
OnProcessData Script:
[code]Value = 1 + Value[/code]

Text 3
Datasource: Database Field "SERIAL"
OnProcessData Script:
[code]Value = 2 + Value[/code]

On this setup, when field "SERIAL" value is 101, texts on the label will be..

Text 1: 101
Text 2: 102
Text 3: 103

Hope that helps!
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Dear Shotaro,

I tried inserting Value = 1 + Value in the VB script, but a script error appears.

I am only able to append the value with characters, e.g.

Value = Value + "123"




Please advise.

Thanks
0
Avatar
Shotaro Ito
Modérateur
Actions pour les commentaires Permalien

Type mismatch error happens when datasource is not numbers.
set "1" in Sample data of datasource and try.

Besides you can avoid type mismatch with this - when datasource is not number, nothing happens.
[code]If IsNumeric(Value) Then Value = 1 + Value[/code]

If you use alphabetical serial number, simple addition won't work so please tell me how your serial number goes.
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

[quote name='Shotaro I -Seagull Support' timestamp='1315445203' post='549']
Type mismatch error happens when datasource is not numbers.
set "1" in Sample data of datasource and try.

Besides you can avoid type mismatch with this - when datasource is not number, nothing happens.
[code]If IsNumeric(Value) Then Value = 1 + Value[/code]

If you use alphabetical serial number, simple addition won't work so please tell me how your serial number goes.
[/quote]


Hi Shotaro,

My serial numbers is not decimal. It is in mixed text with trailing numbers at the end.

But what I want to do is to select the next row value, cause the serial number may not be in sequence.

I would suggest that this feature is included in BarTender, as it would be useful for creating packing list.


thanks
0
Avatar
Shotaro Ito
Modérateur
Actions pour les commentaires Permalien

I see, that's a function BarTendder doesn't have.
Currently your solution - have all numbers in excel column, is the most simple way of doing.
Perhaps create an Excel macro to populate such a row data is an option.

Besides there's an interesting [url="http://seagullscientific.invisionzone.com/index.php?/topic/73-designing-labels-with-1many-relationships/"]forum post (Designing Labels With 1:many Relationship) [/url] to get multiple row data to a label.

Vous devez vous connecter pour laisser un commentaire.