Cached data in label
Scenario:
I have a Batener Integration running, which reads btxml files from a specified directory.
Problem:
By using the integration, I tried printing two labels that use the same btw design file. To simplify this explanation, let's say this btw has only one named data source (my designer app is in spannish, I hope that's the name in english) called “power”. The first btxml file contained the following tag:
<NamedSubString Name="power">
<Value>10</Value>
</NamedSubString>
Which works correctly, the label appears with the text 10.
Shortly after (max. 30 seconds apart), I sent another btxml, but without the power NamedSubString and Value tags. The behaviour I expected was that the text would show either the embedded data or nothing at all, but it showed the value 10, the value of the previous btxml.
My suspicion is that Bartender cached the data from the previous btxml and, as the next btxml was missing said NamedSubString, it used the stored data.
Tried solutions:
1. Following this article, I changed the OpenDocumentLimit of the PrintScheduler to 0, in hopes of avoiding document caching. (The config file specifies <!-- OpenDocumentLimit - The maximum number of documents that BarTender will keep open at one time. A value of "0" disables document caching.-->)
2. Added the following tags in the btxml inside the PrintSetup tags :
<Performance>
<AllowFormatCaching>false</AllowFormatCaching>
<AllowVariableDataOptimization>false</AllowVariableDataOptimization>
</Performance>
Final question:
So far, none of the solutions I tried worked. Is there any way of changing this behavior?
-
You could adjust the quantity/copies/number of labels field to an Event Controlled > OnNewRecord (I thin it would be or else OnIdenticalCopies) and set the VB to something like
Value = 1
Value1 = <the field in the XML you are linking to>
If Value1 < 1 then
Value = Value
else Value = Value1
end if
This sets the default quantity to one then checks if there is a value set in the datbase/xml and if there is if it is greater than 1 then it uses that value or if not it uses the default (1)
0 -
Sorry if I explained myself incorrectly. The integration I'm running was made by using Bartender's Interation Bilder, and I'm not sure the solution you presented applies to my case (correct me if I'm wrong). Also, the problem does not only occur with one variable; it can happen with an undetermined amount of variables.
0
Please sign in to leave a comment.
Comments
2 comments