Logging Custom Data To Print Database Follow

0
Avatar
Legacy Poster

I would like to log some addtional data when labels are printed and was wondering the best course of action to take.  I am currently using Enterprise Automation Version: 9.4 SR3 on a web server to print all labels but what I would like to do is relate a lotnumber to the actual print job. 

 

We are in an FDA regulated environment and part of the regulations to go paperless is to be able to pull an image of the label for every print job by lot number at will.  I have figured out how to setup the database to store an image for every print job and setup the standard logging just fine, but relating the lot number to the print job is fairly difficult.  What I have tried thus far unsuccessfully is to create the PrintLabelFormatTask and before I queue the task, I register an event on the JobSent event handler to log the printjobid and the corresponding lot number to another database table.  It appears to register the event, but it never seems to fire off once the job has been sent to the print spooler.  Is there another way to accomplish this task?


 

2 comments

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

Our companion application History Explorer will allow you to define a "Custom" Search for the print jobs logged to the BarTender System Database. This custom search will allow you to search by "Job Name" for example. Will this type of search not help you?

 

Also, you might wish to take a look at BarTender .NET System Database SDK (found under BarTender's Help), as this will also allow you to Filter Records from the BT system database. If this is not exactly what you're looking at, please give more details as to what exactly you're wishing to achieve.

0
Avatar
Legacy Poster
Comment actions Permalink

I have looked at the History Explorer, and while this does alow you to browse print jobs there is really nothing in there which will allow me to find a specific lot number.  The job names seems to only store the name of the label format you print on.  For our largest product line we print thousands of labels a day and they would all use the same label format.  What I am really after is tying each print event (JobID) to the image of the label and relating this to the lotnumber (or any other data we determine is important) which is printed on the label itself. 

 

One of the prompts in the label is named LotNumber so I have been able to access the PrintJobID's using the query below but this will only work if the label format contains this exact label prompt.

 

  select distinct String, Name, pl.PrintJobID from
  BtSubStrings s, BtSubStringValues v, BtObjectNames n, BtObjects o, BtPrintedLabels pl where
  s.SubStringValueID = v.SubStringValueID and  
  n.ObjectNameID = s.ShareNameID and
  o.ObjectID = s.ObjectID and
  o.PrintedLabelID = pl.PrintedLabelID
  and Name = 'LotNumber'

 

I believe this will work in this single case, but it is a fairly fragile solution and relys on every label template to have the same label prompt.  What I am really after, is the ability to access the JobID of each print job once it has been spooled to the printer.  At that point I can store all the standard data I am looking for in my own table, relating the JobID to my lotnumber, serialnumber or whatever I would like to find the print job by.  If there is some way to do this with the SDK natively I am all for it, but I am not opposed to storing this data myself if I can access the JobID's once they are spooled.

Please sign in to leave a comment.