Cache Implementation With Bartender Follow

0
Avatar
Legacy Poster

Hi,
I am writing an application that uses ActiveX to print formats using the BarTender. We plan to use Bartender as a "library" to print the reports prepared by us.
I have a question.

One of the requirements of my application is the ability to print format several times with the same data. Of course, data is retrieved from the database, it can change between printouts, so I need to implement caching.
Simplifying, I want to once retrieved data from the database print many times at different time intervals. What's more, each additional print may be on a different printer.
Can I implement a cache mechanism using Bartender in the manner described above?

Thank you

2 comments

0
Avatar
Gene Henson
Moderator
Comment actions Permalink

BarTender doesn't necessarily have a mechanism for caching data for future use. However, you can setup the BarTender System Database which will store a copy of every printed label in a SQL server. You could then use the System Database SDK to access to print jobs and reprint them (with the exact same data) to a printer of your choice. You said you are currently using ActiveX, but if the SDK is an option then you could look into this. Also, if your goal is to reduce calls to a database, this would obviously be counter-productive. The BarTender Help system has more information on the System Database SDK.

If you're not interested in using the system database SDK, I think using BarTender XML to store and send your print jobs would be easiest (this could be done using ActiveX). You could do something like:

[list=1]
[*]Retrieve data from your database
[*]Put that data into BarTender XML (see the BT Help for more info on XML)
[*]Send the BT XML to BarTender to print the first time
[*]Implement a class that holds the BT XML and serialize the class, or just save the XML to disk
[*]Retrieve the needed XML on demand and change the printer name as needed
[*]Resend the print job
[/list]

Those are just a couple ideas to get you started. The beauty of writing your own interface is that you can pretty much do whatever you want.

Let us know if you have any other questions or need some more ideas.
0
Avatar
Legacy Poster
Comment actions Permalink

Thank you for your response.
I did not know before Bartender XML technology. In fact, it will be easiest to implement, but I hung cache implementation in the next release.

Please sign in to leave a comment.