跳至主內容

搜尋

搜尋

How To Change A Qty Field On The First Or Last Label

評論

5 條評論

  • Avatar
    Legacy Poster

    I changed the formula to use Format.Objects("PageNum").Value and now the If..Then..Else works.

    0
  • Avatar
    Legacy Poster

    Sorry I was too quick.  It appears that the logic only works on the first record.  So testing for Page 1 works.  However testing for the last page does not.

    When I look at the ASC string for all pages other than one I am getting 636363.  I really only need to look for the first or last page so I can make this work.

     

    But I would rather understand why this is happening and what if I wanted to test for the last page?  How could I do that.

     

    Sorry this one is not solved quite yet.

     

    DaveO

    0
  • Avatar
    Ian Cummings
    版主

    Unfortunately you don't mention the edition and version of BarTender that you are running, but have you tried using the "Page Number" option of the "Print Job Field" data source type to get the current page number?

     

    I trust you're using an event based VB script for your code, using either the "OnIndenticalCopies" or "OnSerialize" events which thus allows you to check the page number for the current page in the on going print job that's being rendered?

    0
  • Avatar
    Legacy Poster

    The version I am running is 2016.  I am still unable to detect the last label.

     

    This is frustrating me to no end.  I can put a text field on the label and I can correctly display the Current Page Number AND the Total Number of Pages.

     

    However, if I try to reference that field or dataset value in a formula i.e. If ... Then ... Else I am unable to get detect the last label.

     

    Here is my simple condition:

     

    If Format.NamedSubStrings("PageNum").Value = Format.NamedSubStrings("TotalPagesCount").Value Then

       

         BoxQty = "5"

     

    End If

     

    Value = BoxQty

     

    I have this code inserted into an Event ControlScript of OnSerialize (however I have tried others as well).

     

    The PageNum and TotalPagesCount are datasources I created and when I associate them with text boxes the correct data is displayed.

     

    Thanks for any help.

     

    I can't be the only one to come across this - I must be doing something stupid.

     

    DaveO

    0
  • Avatar
    Ian Cummings
    版主

    Hmmm, I'm having problems trying to get this to work also.  I've logged a request with development for assistance.

    0

登入寫評論。