Skip to main content

Search

Search

Print New Label Instead Of Reduce Font?

Comments

6 comments

  • Avatar
    Legacy Poster

    Short version: I am connected to a database, have too much data for one label, and would like it to overflow into a new label. Is that possible?

    0
  • Avatar
    Fernando Ramos Miracle

    Hello SamSeaChange,

     

    Indeed this could be done, for which you could make use of our "Template" feature. The idea would be to conditionally print a second template in case the database field contains too much data.

     

    Thinking about it I would actually use three different templates (note that you can create and manage your templates from the "File>Page Setup..." dialog under the "Template" tab):

     

    1. First template would print if the data fits only in one printed label.

     

    2. Second and third templates will print if the first label cannot contain the incoming data.

     

    In this example the first and second templates would be fairly the same, but I'd preferred to separate them so you don't have to "dynamically" cut the contents of the text object and instead simply dynamically select the template to print.

     

    Things to consider:

     

    - You can dynamically choose to print a template with the "Template Selector" feature, for which you'll need at least the Automation edition.

    - In my example you would need two template selectors, one for the first template, and a second one for the other two.

    - You will need to use the "Length" or number of characters of the incoming data to choose which templates to use. You can get this data using a VB script and the property Len() applied to the appropriate database field.

     

    *Note that this is only an option, there certainly are other ways of getting it done.

     

    Regards.

    0
  • Avatar
    Legacy Poster

    Thanks Fernando, this was very helpful but I don't think I can use the Template Selector. The Template Selector GUI doesn't see my 2nd database connection. I am connecting to that database using a Visual Basic Script - Multi-Line Script. Is there a way I can use or make a call to the Template Selector in VB?

     

    Should I post this in the VB part of this forum?

     

    Should I post a sample of my label connected to a sample database?

    0
  • Avatar
    Fernando Ramos Miracle

    Note that you can configure a Template selector to "watch" a named data source, and you could then change the value of that named data source from your VB script. In any case, as you are working with a custom database connection you will probably need to test it yourself (mainly test on which event the script will change that named data source for the template selector to actually read it).

     

    Regards.

    0
  • Avatar
    Legacy Poster

    Success!!! Thank you so much for the help. I created a Named Data Source that told me when I needed more than one label. Then created 3 templates, put Template 2 and Template 3 in a Template Selector, then had the Template Selector "watch" it and then I changed the way my Visual Basic Script connected to my database in the other Templates. Works great! Couldn't have done it with out your help.

    0
  • Avatar
    Fernando Ramos Miracle

    Hello Sam,

     

    Many thanks for your feedback; I'm glad I could be of help :)

     

    Regards

    0

Please sign in to leave a comment.