Label design for use in Print Portal 追蹤

0
Avatar
Rikard Cederberg

Hi,

I i have made a label that works perfectly in designer but not in print portal.
Can i have some feedback to what i could do differently to have it working in Print Portal aswell.

Here is the part that don't work:

I have an Input text field that fetches data from a DB (no problem here)
then i have a named datasource that does a vbscript calculation on some of those DB fields Round(Field("anslutning_sedb08.Items.PalletQTY")/Field("anslutning_sedb08.Items.PackageQTY"),0)
Then this result should be shown as a initial value to number of copies (this works in Designer print preview but not in Print Portal)

Here is how i show the calculated value:
Note: i have bartender on different language than English and some names i reference might not be correct.
The standard field "Copies" is linked to the named datasource that does the calculation Round(Field("anslutning_sedb08.Items.PalletQTY")/Field("anslutning_sedb08.Items.PackageQTY"),0)
I then have an form input field that is linked to standard "Copies"

As i said, this works if i do a printout from the Designer but not in Print Portal.

This is from Designer after Artikelnummer input ("Artikelnummer" is the data that is needed to query the database)

 

And this is from Print Portal

7 意見

0
Avatar
Pete Thane
評論操作 永久連結

Have you set the VB as an Event Controlled Script set to process the VB OnNewRecord I would suggest? Sometimes, not just in Print Portal, you need to control in the printing the sequence when BarTender processes VB scripts and that is when Event Controlled Scripts are needed. 

 

0
Avatar
Rikard Cederberg
評論操作 永久連結

Hi and thanks for your reply.

I tried to do the VBscript in an Event Controlled Script.
Everything else like before but the Script like this:
Value = Round(Field("anslutning_sedb08.Items.PalletQTY")/Field("anslutning_sedb08.Items.PackageQTY"),0)

 

The result is no data in the input field where i want the suggested number of printouts

Designer preview

Print Portal

0
Avatar
Pete Thane
評論操作 永久連結

I would try declaring each field individually and then carry out the Round process

ie something like

Value = <.....one of your fileds....>

Value1 = <...the other of your fields....>

Value = Round(Value/Value1,0)

Or perhaps rather than a template object add a field on to the template, but off to the side of the label (so it wont actually print) and include the VB in there and then link your Data Entry box to that field

 

0
Avatar
Rikard Cederberg
評論操作 永久連結

Nothing i do makes the value show in the field for the user.
I manage to set number of copies that is produced with this field but the purpose of this field is to propose an number of copies to the user but make it possible to change the number before printing. 

Lets start over and take this one step at the time

I made 2 named data sources 1 with database field PalletQTY and one with PackageQTY both is showing for the user on the input form.

I then added a new input number field to the form, the question is what is the right way to Divide PalletQTY with PackageQTY and show the value to the user on the input form at print time.

 

0
Avatar
Pete Thane
評論操作 永久連結

Hi Rikard,

I have been doing some more testing here and have hit the same issue as you. As I have this as a support log with the Seagulls Tech team and send them through my sample files to look at. 

I have found a (not very elegant) work around however which does come through onto Print Portal but will require the users to enter a value to print each time

Here is a screenshot of the Data Entry Form in Designer with the "work around" field highlighted. I have included a preview of template image on the screen too so the users can see a sample of the label that will be printed.. 

and then with Print Portal with the workaround field still populated but the others blank.

 

The work around field is a text field with a VB Script Transforms set and the code I have used is

Value = "99"

Value = Round(Format.NamedSubStrings("num1").Value/Format.NamedSubStrings("num2").Value,0)

where the 99 is the default on screen value, so you could use anything and the "num!" is total number items on the pallet field and "num" is the lower items per box. This does throw up a script error when you enter the information but just click ignore.

I have also set the field to be pre-printed so although it shows up Preview but does not print by ticking the Pre-Printed option accessed by clicking on the "Name" of the object in the properties of the Data Source.

Using the preview the uses will see how many labels should be printed but you would need to add on a new Data Entry field and link that to the Copies into which they would have enter the number of labels that they need to print. 

I hope this makes sense 

 

 

 

 

0
Avatar
Rikard Cederberg
評論操作 永久連結

Perfect, thank you.
Please let me know if this gets fixed and usable the "right" way.

0
Avatar
Pete Thane
評論操作 永久連結

Ping me an email to  info (at) dcatonine.co.uk and I will see if I can get you cc'd on the support ticket and so you can see the updates in case I forget to update this later

登入寫評論。