Skip to main content

Search

Search

Inserting Multiple Serial Numbers Into A Design

Comments

5 comments

  • Avatar
    Shotaro Ito
    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
    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
    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
    [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
    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.
    0

Please sign in to leave a comment.