Format For A Retail Label
I have a db with items for a retail store. I am trying to get the correct format for the price on the label. The db has 4 tables concerning price: itemtype,unitprice,splitquantity,splitprice.
If the item type is = 0 I want to print the unitprice 1.99
if the item type is = 1 I want to print splitqauntity "/" split price 2/5.00
The last label package I used had a custom function that handled this.
Any help or guidance is appreciated
smiks1
-
In 10.1 this can be achieved by using conditional printing. Create the text fields, one for the $1.99 and one for the 2/$5.00, then select the object name, and under 'print when' select the box, than hit the radio button next to 'conditionally based on data source'. Select the database field, then 'is equal' and put 0 or 1 for each object.
0 -
My version says 10.0 sp4 0 -
Unfortunately the conditional printing support was added on v10.1, so in your case you'll need to produce the same functionality through a VB Script.
Create a new text object, change it's data source type to "Visual Basic Script" and change the VB script type to "Multi-Line" script.
The code would be similar to the one below (you'll need to set properly the reference to your database fields):
If Field("<itemtype>") = "1" Then Value = Field("<splitquantity>") & "/" & Field("<splitprice>") Else Value = Field("<unitprice>") End IfRegards
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare