Saltar al contenido principal

Búsqueda

Búsqueda

Page Number and Total Page Counter wrong when using multiple copies

Comentarios

15 comentarios

  • Avatar
    Peter Thane

    Have you tried adding the page number as a sequential field that resets each job and have adjusted the Event sequence for when this applies? 

     

    In the image below I have liked the label to a simple 4 record database, printing two copies of each with a serialised field that increments for every copy and another just when the record changes. 

    0
  • Avatar
    Raphael Matter

    Thank you for the detailed answer.

    I tried however also not working for me.

    When I choose event per page or per copy it will always count up.

    when I choose event per record or job it will always remain 1.

    The problem is (sorry for not mention this in the problem description): There is only one record in the job - and the document contains a table retrieving the data from the database.

    So upon the number of table rows the table will spread over several pages - and this doesn't seem to work.

    0
  • Avatar
    Peter Thane

    Can you show some images of your label file so I can understand how it is configured please? 

    0
  • Avatar
    Raphael Matter

    Thank you

    It is a delivery note as DIN-A4 Document (in example table data on 3 pages)

    The header firelds are coming from an integration file record. And the delivery lines are shown in the table, queried from a database.

    0
  • Avatar
    Peter Thane

    Sorry for the delay in responding, but what does the trigger file look like please? 

    0
  • Avatar
    Raphael Matter

    Thanks again - here is a trigger file. It only contains the header fields. As said, the positions are queried from the database with an ID included in the header.

    %BTW% /AF="C:\\bartender\\bartender_labels\\PackLieferscheinKN.btw" /PRN="SpeditionA4" /Tray="Kassette 1" /D="<Trigger File Name>" /P /R=3 /C=3
    %END%
    ;2024.04.30;UML0001962;UML0001962;1472;KN;;Street;;Location;KN;;Street;;Locationt;KN;;2024.04.30;;xxx;;7282897;9037.5;33

    0
  • Avatar
    Peter Thane

    Okay so the database lookup is in the trigger string and all the fields are stored in the same row of the database. So how many fields are there? 

    Have you configured the label so it is made up of multiple templates with different fields on each? 

    If you have a 3 page document the X / Y string at the bottom of each page should say 1/3, 2/3 & 3/3 and you also want 3 copies of each of these so a total of 9 pages, is that correct?  

    0
  • Avatar
    Raphael Matter

    Exactly the copies should be exact copies so: 1/3, 2/3, 3/3 and again for the copy 1/3, 2/3, 3/3.

    Currently it is 1/9, 2/9, 3/9, 4/9.... Logically this is not correct, as a print copy should not change the pages of a document I think.

    The trigger file contains the heaer fields (marked in yellow) and the lookup id for the database.

    With this id I query the database to get x rows with columns marked in green.

    Depending of how many rows are returned from the database I have n pages in my document!

    0
  • Avatar
    Peter Thane

    Okay. How is the 9999 total quantity figure calculated? I just wonder if we can take that value and the divide it my the number of copies as the simplest solution. The 1 / field would also need looking at too perhaps using the reset when the value equals the 9999 value.  

    0
  • Avatar
    Raphael Matter

    I already tried to do it this way by calculation. But I couldn't manage by any means.

    That's what I wrote in the description of this thread:

    I cannot find a way to get the "real" number of pages per document without copies.

    With event based vb scripting I could use Format.IdenticalCopiesOfLabel to get the number of copies.

    With Print Job Field "Total Number of pages" I get the count.

    But I cannot manage to divide page count / copies.

    The main problem is accessing the page count as number.

    I can access the page count in vbscripting but as sson as I try to parse to CInt or to use it in a calculation I get a type conflict error.

    Does anybody know how to use the page count in a formula - or if there is a variable which gives the right information directly?

    0
  • Avatar
    Peter Thane

    Yes I did see that but there are different ways to achieve this and so I need an understanding where the 9999 value is coming from to make the correct suggestion

    0
  • Avatar
    Raphael Matter

    Please excuse my delayed answer.

    Datasources are in English: Print Job - Page number / Print Job - total amount of pages

    0
  • Avatar
    Peter Thane

    As they are both database fields then I would configure the VB as an Event Controlled Script and set it run OnNewRecord, such as

     

    Using this I get these results with my simple three record data file

     

     

    0
  • Avatar
    Raphael Matter

    The page count and page number are no database fields - they are coming from the print job. As print job is notavailable in vb I use a named datasource to get the print job value in vb:

    Named Datasoruce are defined like this: (#Druckauftrag is #PrintJob in english)

    When I do print preview I get: Script Error: Type conflict. Don't understand this, but obviously named datasource to print job cannot be resolved

    0
  • Avatar
    Peter Thane

    For the page count instead of using the Print Job Fields, instead add a sequential number text field to the label and reference it from there for the count.

    For the number of copies (1 of X) then link the X to the Copies value from the File>Print field as that value should be populated from the Commander Script instruction C=3

    0

Iniciar sesión para dejar un comentario.