Help printing variable graphics S’abonner

0
Avatar
Paweł Gancarz

Hello,
I wanted to write a script so that I could insert graphics that I want to print after selecting another product name from the drop-down list. After recognizing the name, the script inserts the appropriately assigned graphic when printed.
Thank you very much for help. Do I have to choose any print options in each picture?

Select Case Format.Objects("Lista_REF").Value=""

Case XQ

Format.Objects("Obraz2").PrintVisibility = True

Format.Objects("Obraz1").PrintVisibility = False

Case XR

Format.Objects("Obraz2").PrintVisibility = False

Format.Objects("Obraz1").PrintVisibility = True

 

End Select

 

2 commentaires

0
Avatar
Pete Thane
Actions pour les commentaires Permalien

You dont need VB to achieve this as you could just use Conditional Printing of the graphic.

  • Add a text field that contains the dropdown data on the label (or off to the side if the text isnt printed) and then use the Change Data Source Name button to give the field a name (I called mine ChoosePic)
  • On your Data Entry Form, link this list to the Named Data Source.
  • On your Template add each image in the correct location and the correct size on the label but for each one click on the name of the image in the left hand column of the object (the bold Picture 1 in the screenshot below) and then clcik on the Print When button and set up the appropriate Conditional Printing, which in my case is when ChoosePic equals green (my drop down has two values red or green)

 

I have included a Preview of Template on my Data Entry Form and so the image below is a screenshot of what I see when I go to print.

I hope this helps

Pete

NOTE: for my sample I put the images next to each other on the Template and not on top of one another.

0
Avatar
Paweł Gancarz
Actions pour les commentaires Permalien

Thank you for your help. Everything works now.

Vous devez vous connecter pour laisser un commentaire.