Zum Hauptinhalt gehen

Suche

Suche

C# Select Object To Print

Kommentare

9 Kommentare

  • Avatar
    Ian Cummings
    Moderator
    This has not yet been implemented in the .NET SDK component. It has been implemented if automating via the COM (ActiveX automation) method, and in the VB scripting that runs internally to the BarTender document.

    Have you tried setting the data source of the barcode to nothing? When a data sourced object is given an <empty> value it generally won't print, which of course gives you the end result that you want.
    0
  • Avatar
    Legacy Poster
    [quote name='Ian C - Seagull Support' timestamp='1355138910' post='3881']
    This has not yet been implemented in the .NET SDK component. It has been implemented if automating via the COM (ActiveX automation) method, and in the VB scripting that runs internally to the BarTender document.

    Have you tried setting the data source of the barcode to nothing? When a data sourced object is given an <empty> value it generally won't print, which of course gives you the end result that you want.
    [/quote]
    0
  • Avatar
    Legacy Poster
    Yes I did,

    Assuming I want to print all the object except bar codes BarCode03 and BarCode04, I sent an empty value to these objects (btFormat.Substrings["Gtin03"].value = ""; btFormat.Substring["Gtin04"].value=""; )but this is causing not to print the label at all, the label has seven objects.

    I'll appreciate any other idea
    0
  • Avatar
    Legacy Poster
    Another solution is to have 4 different bartender documents ..

    But I prefer to have only one. !!
    0
  • Avatar
    Michael Toupin (mtoupin
    [quote name='Grapes' timestamp='1355164105' post='3888']
    Yes I did,

    Assuming I want to print all the object except bar codes BarCode03 and BarCode04, I sent an empty value to these objects (btFormat.Substrings["Gtin03"].value = ""; btFormat.Substring["Gtin04"].value=""; )but this is causing not to print the label at all, the label has seven objects.

    I'll appreciate any other idea
    [/quote]

    What error message do you receive when doing this?
    0
  • Avatar
    Legacy Poster
    I am not getting any error message, but when I send any empty value to any object contained in the label (BarCode01 to Barcode02, or to any other bar code) the label does not get print.

    The solution I found was to create 4 different Bartender Documents (SSCCBar01.btw, SSCCBar02.btw, SSCCBar03.btw, SSCCBar04.btw) one for each quantity of bar codes needed, I am selecting a document based on how many bar codes I need to print in the label, the program runs well as I wanted to run. I just wanted the option to have only one bartender document for administrate/maintain purposes.

    Do you think this option will be implemented soon in .NET SDK?
    0
  • Avatar
    Ian Cummings
    Moderator
    Setting the value of one sub-string on your label to a value of nothing WILL NOT cause the entire label not to print. I'm sorry but that is just not the case. Could it be that all objects on the label use the same named sub-string data source, which is why all objects do not print? That is the only possibility I can think of for the results you are getting.

    When you say, "the label does not get print", do you mean that the printer feeds a blank label or that the printer does nothing?

    Remember that you can always implement VB script inside the BarTender document to "not print" label objects based on conditional rules. See the below white paper for details:

    http://www.bartenderbarcodesoftware.com/label-software/whitepapers/Dynamically-Changing-Objects-At-Print-Time-Using-VB-Script.pdf
    0
  • Avatar
    Legacy Poster
    When I say, "the label does not get printed" I mean nothing is sent to the printer, so the printer does nothing, not even a blank label.

    The moment I set values to the strings of all objects (bar code objects), the label gets sent to the printer and prints very well.

    For your information I am using:
    4 bar codes "02 Item Number of Goods Contained Withing Logistic Unit (GTIN)" object names (BarCode01,BarCode02,BarCode03,BarCode04)
    1 bar code "00 SSCC-18 Serial Shipping Container Code"
    2 Strings with company information

    Those are my 7 objects I am using in the label.

    And here is the way I assign values to the string in this case BarCode01: (This works very well)
    btFormat.SubStrings["Gtin01"].Value = (tbBar1.Text).Substring(2, 13);
    btFormat.SubStrings["Location01"].Value = (tbBar1.Text).Substring(18, (tbBar1.Text).Length - 18);
    btFormat.SubStrings["Qty01"].Value = Convert.ToString(Convert.ToInt32(tbQ1.Text));

    If I do not want the Barcode01 to print I initialized the strings to empty or null but this way the label does not get print at all, not blank label neither.
    btFormat.SubStrings["Gtin01"].Value = "";
    btFormat.SubStrings["Location01"].Value = "";
    btFormat.SubStrings["Qty01"].Value = "";
    0
  • Avatar
    Ian Cummings
    Moderator
    I suggest you make the application object visible so that you can see what is happening inside BarTender. Probably an error to do with invalid data in the GS1 barcode. Note that the TOTAL data source of the barcode needs to be set to nothing. This will include the application identifiers, and not just the data fields.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.