Skip to main content

Search

Search

Conditional Number Of Leading Zeros

Comments

9 comments

  • Avatar
    Shotaro Ito

    In Professional edition or above,

    Create data source as VB Script Multiline, Have a VBScript 

     

    L = Len(Format.NumberSerializedLabels)
    Value = String(L-1,"0") & 1
    0
  • Avatar
    Legacy Poster

    In Professional edition or above,

    Create data source as VB Script Multiline, Have a VBScript 

     

    L = Len(Format.NumberSerializedLabels)
    Value = String(L-1,"0") & 1

     

    In Professional edition or above,

    Create data source as VB Script Multiline, Have a VBScript 

     

    L = Len(Format.NumberSerializedLabels)
    Value = String(L-1,"0") & 1

     

    Thanks for reply. How is it getting the max value of the required field?

    0
  • Avatar
    Legacy Poster

    Format.NumberSerializedLabels automatically contains the number of records to be printed (which should be equal to your max value).

    0
  • Avatar
    Legacy Poster

    Format.NumberSerializedLabels automatically contains the number of records to be printed (which should be equal to your max value).

    Thanks. unfortunately the numbering does not always start from 1, and can have gaps (e.g. 1-1,000 and 3,001-10,000), so this is 8,000 records, but max No is 10,000, so i need to get the max (10,000)

     

    Thanks again for reply though. I'm sure it will come in handy

    0
  • Avatar
    Legacy Poster

    How/where do you get the record values from? I googled for Max() / Min() functions in VBS but apparently they don't exist so you would have to write corresponding functions yourself, provided there is no other way to get the max value...

    0
  • Avatar
    Shotaro Ito

    In BarTender 10.1 you have Print Job Filed data source and that can show number of total records. However that might have problem using with VB Script.

    0
  • Avatar
    Legacy Poster

    In BarTender 10.1 you have Print Job Filed data source and that can show number of total records. However that might have problem using with VB Script.

     

    as I mentioned above:

     

     

    Thanks. unfortunately the numbering does not always start from 1, and can have gaps (e.g. 1-1,000 and 3,001-10,000), so this is 8,000 records, but max No is 10,000, so i need to get the max (10,000)

     

    Thanks again for reply though. I'm sure it will come in handy

     

    No of records doesn't help. I need the MAX value of a field

    0
  • Avatar
    Shotaro Ito

    Oops. Pardon me I didn't catch the point. I would do that in database side, before giving to BarTender.

    0
  • Avatar
    Legacy Poster

    Oops. Pardon me I didn't catch the point. I would do that in database side, before giving to BarTender.

     

    Unfortunately, that's not an option, the CSV is supplied by third party product, and they can;t change the format of the output

    0

Please sign in to leave a comment.