Skip to main content

Search

Search

Identical Number Of Copies Is Sourced By A Data Source. Identical Number Of Copies Must Be Sourced By The Print Dialog.

Comments

5 comments

  • Avatar
    Ian Cummings
    Moderator
    If you data source the number of identical labels to print in the label format from a database field, why do you need to specify it in code?

    In the data source for the print quantity in the label format, make sure that the default value for the field is set to 1.

    Out of interest, if you specify a literal numeric value does the code work okay printing that number of labels?
    0
  • Avatar
    Legacy Poster
    Thanks for your reply.

    Sorry to say I forget to mention, let take a look for my scenario

    Specific identical label on coding and hardcode the printing label setting copy to 1 = working fine
    do not specific identical label on coding and set the printing label to database field = nothing printed
    0
  • Avatar
    Ian Cummings
    Moderator
    Could re-phrase your last point as I don't quite understand it.
    0
  • Avatar
    Legacy Poster
    [code] btApp.Visible = False
    btFormat = btApp.Formats.Open(strLabelPath.Trim, False, "")

    btDb = btFormat.Databases.GetDatabase(1)
    btDb.OLEDB.UserId = p_objGlobalConn._DBUserID
    btDb.OLEDB.Password = p_objGlobalConn._DBPassword
    btDb.OLEDB.SQLStatement = strSQL.Trim

    btFormat.Printer = strPrinter.Trim
    btFormat.PrintOut(False, False)
    btFormat.Close(BtSaveOptions.btDoNotSaveChanges)

    [/code]

    if I using the code above and set the identical copy as database field, nothing is printed.
    0
  • Avatar
    Ian Cummings
    Moderator
    1. I take it that if the value of identical copies is left at a literal value of 1 then your select statement does return records to print?

    2. The code seems fine to me.

    3. Are you sure that the field you specified for the print quantity contains valid integer data? Did you specify a default value of 1 in the BarTender document like previously mentioned?

    4. Enable application message logging in BarTender and check for any error generated. Do this via the "Administer>Application message setup" menu item.
    0

Please sign in to leave a comment.