IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#19860 - 08/15/06 10:12 AM How to define the first product number
Janet Offline
Junior Member

Registered: 08/15/06
Posts: 18
Loc: Winnipeg
I have a question on Planet Press 5.
We are going to format our new invoices by using Planet Press 5. We will add the barcode beside each product number.

We catch the data from AS400 txt file. but the first product number, sometimes begin from line 21, sometimes begin from line 23. What can I do to find the first product number?
Thank you.

Top
#19861 - 08/15/06 07:06 PM Re: How to define the first product number
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Janet,

In the Barcode's Data options, make a selection that includes lines 21 to 23. Then, check the option called 'Skip empty lines in data selection'. This way, even if it's sometimes at line 21, sometimes at 23, it will skip the lines that contains nothing.

Hope this helps.

Regards,
Rapha

Top
#19862 - 08/16/06 12:24 PM Re: How to define the first product number
Janet Offline
Junior Member

Registered: 08/15/06
Posts: 18
Loc: Winnipeg
Hi,Raphael,
Thank you for your reply. The product numbers need to be shown too. If the first product number begin from line23, the line 21 is empty, but the line 22 is " -------".

Would you please give me more suggestion?

Sorry, I am the beginner of Planet Press software.

Thank you for your help.
Janet

Top
#19863 - 08/16/06 12:51 PM Re: How to define the first product number
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
What type of barcode object are you using? Are you using a PostNet barcode? According to some testing I did, if you select multiple lines, the line that contains the '-----' will be ignored. However, this is not the case with other types such as Barcode 128.

If it's a barcode 128, you may need to convert the barcode object to a PressTalk object, and add a strip function to strip the '-' from the current line, only keeping the numbers we want. Here's an example from a barcode 128 converted to PressTalk. Line 5 contains the strip function I added:

Code:
 
moveto(0,0)
define(&_DataSel_,string,'')
define(&_ValidLine_,boolean,true)
for(&current.line,21,1,23)
set(&_DataSel_,&_DataSel_ + strip('-', @(&current.line,1,15)))
endfor()
define(&_Y2_,measure,&height)
if(&height < 0)
set(&_Y2_,0)
endif()
define(&BarHeight,measure,&height)
define(&BarWidth,measure,0.0120)
define(&BarType,integer,1)
setfillcolor([0,0,0,100])
moveto(0,0)
showbarcode('\207')
showbarcode(&_DataSel_)
define(&_bci_,integer,0)
define(&_bcTotal_,integer,103)
define(&_check_,integer,0)
for(&_bci_,1,1,length(&_DataSel_))
&_bcTotal_ := &_bcTotal_ + (&_bci_ * (ord(mid(&_DataSel_,&_bci_,1)) - 32))
endfor()
&_check_ := mod(&_bcTotal_, 103)
showbarcode(char(&_check_ + 32))
showbarcode('\212')
&width := &current.x
moveto(&current.x / 2.0,&_Y2_+0.16)
showcenter(&_DataSel_)
This method should also work for all other types of barcodes.

Hope this helps.

Regards,
Rapha

Top
#19864 - 08/16/06 03:05 PM Re: How to define the first product number
Janet Offline
Junior Member

Registered: 08/15/06
Posts: 18
Loc: Winnipeg
Hi, Raphael,
Thank you! That is what I need. We use barcode 39. I think it might need some coding also.

Thank you fro your sample.
Janet

Top


Moderator:  cosimo, OL Newsgroup Support