Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SBT 5.0 need to find what prg file is the one that i need to open

Status
Not open for further replies.

titoneon

MIS
Dec 11, 2009
335
US
Hi Guys,
Here is the question i have.
I am looking for the prg file that is called from Purchase Orders, Transaction, Receive Orders, in other words i need to get to the point where i can see which prg file is called after an order is received, cuase after that there is a program that print labels, we have a custom program that will print as many labels as item received, the reason i want to find the program that print the labels is cause we are still using for receiving a Windows 98 machine, connected to the Lpt1 port a dot matrix printer to print as many labels as item received, the problem is that this printer is difficult to find, also i want to get rid of he 98 machine and run from a win xp machine SBT and also try to install one of those labels printers like the "Smart label printer 440", also cause i am planning getting SBT into a SERVER OS 2008 64BIT, and i don't want to get complicated with the 98 machine, so i will need to find out the route to get to the application that has the code for printing the labels, most likely to adjust something in there, as you know those printer has a label roll and i will need to figure out how the data can be printed vertical position, probably this last part i don't know how to explain it but if you guys have seen the "Smart label printer 440", you will know what i am talking about
Any help will always be appreciated.
Thanks a lot in advance
 
Are you running SBT Pro or VisionPoint? If it is Pro, depending on the version, it is PORECP.PRG which then calls form (older SBT) or class (newer ACCPAC or Sage Pro) PORECP.SCX / PORECP.VCX.

If you are running VisionPoint, it is PORECP.PRG.

Out of the box, neither VisionPoint or Pro printed labels at the point of PO receipt. My guess is that you or one of your predecessors customized the PO receiving program to print labels at the point of PO receipt.

One trick to find out what program is running at different points in SBT is to add an environmental variable to your computer called SBTDUTIL=ON. Then run SBT from Foxpro Command window. When you want to halt SBT and see what is happening, type Ctrl-F9. SBT will suspend and then you can open a debug or trace windows to see what is happening.

Printing labels is tricky. You will find this job more difficult than you assume.

Matthew Lefkowitz
Lefkowitz Systems, Inc.
 
Hi Matthew,
Sorry for no clarifying that the SBT version i am running is "SBT PRO 5.0" and Porecp.prg is the one that calls the Barprt.prg wich is the program that print the labels and by the way i did not know you are the one who wrote this program, all i want to do is, instead of printing the labels in the dot matrix printer(Panasonic KX-P1123) which use a continues form label roll, I want to be able to replace that printer with the "Smart label printer 440", model# SLP 440 from Seiko and of course i will replace the workstation win 98 for a Win xp pro 32 bit machine.

All i need to know if i need to change something in the Barprt.prg or in the Porecp.prg, i doubt it that i have to change something on Porecp.prg but in the Barprt.prg there is a variable lc_port = "LPT1" so i am wondering if this has to be remarked or deleted ? cause the "Smart label printer 440" is a USB type of printer, so i would like to know if you can help me here to make this change and be able to continue printing on the new printer ? please see below the code that it is in Barprt.prg that is setup to be called from Porecp.prg.
In advance thanks so much, i could never believe that you were the one who developed this program and now you are trying to help me, thanks again
Ernest

PROCEDURE barprt

*//DDP RHJ 12/17/99 Changed to allow auto calling from PORECP,
*// passed type of labels to print, batch or individual
*!* PARAMETERS lc_rept
PARAMETERS pc_purno, pc_type
*//DDP RHJ 12/17/99 -- END

#include global.h
#include events.h

*-- Return values from g_opnfl().
#DEFINE Cn_NotOpen 0 && Database was not open or could not be opened
#DEFINE Cn_WasOpen 1 && Database was already open
#DEFINE Cn_OpenHere 2 && Database was opened by g_opnfl().
#DEFINE Cc_NoOrder "" && Open file with no order tag

*-- SPR & Windows
*# DOCCODE DO iclist.spr
#DEFINE Cc_MainSpr gc_icprgdv + "ICLIST.SPR"
#DEFINE Cc_MainWin "LW_ITMN"
#DEFINE Cn_WinClos 31

*# DOCCODE DO iclist.spr
#DEFINE Cc_Spr2 gc_icprgdv + "LSTLOC.SPR"

*-- Browse fields list
#DEFINE Cc_BrowList [item :15, ] + ;
[itmdesc :35]

#DEFINE Cc_BrowLst [loctid :6, ] + [locdesc :60]

#define Cl_RecLevel .t.

PRIVATE ll_itmser, ;
ll_form, ;
lc_porder, ;
ll_itm

ll_itm = Cl_False
ll_form = .F.
ll_itmser = .F.
lc_porder = ""

*-- Declare local variables private
PRIVATE lc_prndest, ;
lc_bbatch, ;
lc_ebatch, ;
lc_lbatch, ;
lc_range, ;
ll_opnbtch, ;
ln_bbatch, ;
ln_ebatch, ;
ll_allrecs, ;
lc_psched, ;
lc_reptyp, ;
lc_zero, ;
lc_popt, ;
lc_scust, ;
lc_state, ;
lc_label, ;
lc_xscope, ;
lc_vendno, ;
lc_dbfile, ;
lc_desc

lc_desc = ""

*-- Define report window
DEFINE WINDOW lw_rept ;
FROM 0, 0 TO 23, 79 ;
NONE ;
COLOR SCHEME 1


*-- Set report title, grid size, help id, option grid defaults, print width
lc_stat = "Received "
lc_order = "N"
lc_invtype = "All "

lc_uomin = "Transaction Unit"

*-- Position system file to application record
= g_setsys(gc_applid, gc_compid, .F.)

lc_dbfile = "Current"
lc_file = SPACE(14)
lc_port = "LPT1"
lc_priprt = "Y"
lc_prityp = "List "
lc_barprt = "Y"
lc_item = SPACE(15)
lc_bitem = SPACE(15)
lc_eitem = SPACE(15)
lc_loc = "WH1 "
lc_bdate = " / / "
lc_edate = " / / "
lc_bpurno = SPACE(10)
lc_epurno = SPACE(10)
lc_pstat = SPACE(1)
lc_class = SPACE(6)
lc_bclass = SPACE(6)
lc_eclass = SPACE(6)
lc_vendno = SPACE(6)
lc_comcode = SPACE(6)
lc_onhand = "Set Number"
lc_bccode = SPACE(2)
lc_eccode = SPACE(2)
lc_porder = "Item # "
lc_row = SPACE(15)
lc_salesmn = SPACE(4)
lc_paid = ""
lc_qty = "1 "
lc_pfact = "Purchase"
ln_presp = 0
lc_presp = SPACE(1)
lc_psched = "DEF"
lc_label = "#1"
lc_xscope = "B"

*-- Initialize report heading lines
lc_head1 = ""
lc_head2 = ""
lc_head3 = ""

*-- Initialize row numbers for validation
ln_rday1 = 0
ln_rday2 = 0
ln_rday3 = 0
ln_rday4 = 0

*-- Set to continue
ll_cont = .T.

*//DDP RAL 12/07/99 Added to autoprint from PORECP
*-- Setup Batch/individual option
lc_type = "Individual"

IF TYPE("pc_type") = "C"
lc_type = pc_type
ENDIF

IF TYPE("pc_purno") # "C"
*//DDP RAL 12/07/99 -- END
 
Hi,
I am able to print on that new printer but it is not printing correctly, let me see how can i explain that.
Ok the label size is a "standard address label", size= 4 3/4" x 1 1/2" so when printing, this label it will eject by 4 3/4" but what happened is that the text printed in the label it is no parallel to the dimension 4 3/4" so instead it prints the text perpendicular to the way it ejects so of course it is printing incorrectly and text is cut off so i need to see if anyone can help me to fix it please, in other words the text need to be printed in the same direction the label ejects, please let me know where can i change that and how if it is possible ?
Thanks a lot, a little frustrate here.
Ernest
 
Yes, it sounded like my Bar Print Pro program. And you did put the version in the title of the thread which I failed to read so my apologies for that.

No, nothing in the code will help you change printers. You need to install the new printer on your Windows PC and make or configure the printer driver in windows for the label stock you decide to use. Your printer may come with software to create the driver or you may have to make the stock size yourself. This can be difficult.

One you have a driver that fits your label stock, then you go to Bar Print Pro and marry the printer and its driver to one of the six labels that Bar Print Pro provides. Then you need to adjust the chosen label so that each of the elements in the label sits on the label where you want it. Then you need to test, test, test, adjust, adjust, adjust. This is also difficult.

But when you are done, you will have a label that prints perfectly on your new printer.

Printing in Windows to a printer that is not a standard size printer is difficult.

Matthew Lefkowitz
Lefkowitz Systems, Inc.
 
Hi Matthew,
In the meant time that i was waiting for your answer i found under the directory S:\PRO50\IC the following lbx files
barprt1.lbx, barprt2, barprt3, barprt4, barprt5 and barprt6, been barprt6.lbx the one is used to print the labels under the dot matrix printer, remember that the dot matrix printer have a continuos form the longest side of the label being horizontal, and the new label printer use a roll and the longest size goes or eject vertical so i need the data printer parallel to that longest size, so it seen that the program barprt calls the "barprt6.lbx" so i will need to create a new label form with the same fields and rename it as "barprt6.lbx " , is that correct ?
I already installed the software and the driver for that printer for my OS. whic is Win xp pro 32bit

Sorry i don't understand this part
"One you have a driver that fits your label stock, then you go to Bar Print Pro and marry the printer and its driver to one of the six labels that Bar Print Pro provides"

How do i go to Bar print Pro ?

Thanks a lot for getting back
Ernest
 
Hi Matthew,
I just created a new label under the folder PRO50\IC and named BARPRT6, with the dimension of the label located in the new printer, then i copy from the original BARPRT6.LBX the fields and the labels and pasted in the new label i created, i went and opened SBT as a user and tried to recieve and items and printed the label, it did print but still what is printed is perpendicular to the label, instead of printing as it suppose to be, i don't know if we can put some code somewhere to rotate the text 90 degree, that should fix the problem cause in the label creation there is not way in vfp 5.0 that i can rotate the labels and fields that i am pasting in the new label so at the design time i am not able to manipulate the objects in the label and at the run time it prints at 0 degree while the label eject as 90 degree.
Please if you have a way to help, it is very very appreciated
Thanks a lot
Ernest
 
SBTBILL,
What do you mean pro 5.0 should run on win 7 ? yes i know that cause i have some machines running windows 7 with SBT, now what does that has do to with what i am asking here ?
Thanks
Ernest
 
If Bar Print Pro was installed correctly, you will see it in the IC module under the Custom menu. Click it. The menus will change. Now go to Maintain -> Modify Bar Code Labels. You will see the six labels listed. Pick the one you use for your labels. Here you can customize the label and marry it to a particular printer.

Matthew Lefkowitz
Lefkowitz Systems, Inc.
 
Matt,
Thanks a lot , i will try today, what i did yesterday was actually created a new one under vfp 5.0, then i copy the objects from the original into the new one, then renamed the old one and named the new one as the old one in order to keep the same label name called by Barprt.prg, i will try today that, in fact i did not know about this from the sbt menu , i never dealed with bar print code option from the menu, thanks a lot
Ernest
 
Matthew,
I tried to edit the first label which is the one that i need to change but when using the instructions you gave me, i can not change that label to fit my needs there, then i used VFP 5.0 and there i created a label with the dimensions i needed, then i copy the objects from the existing label that run in sbt and paste those objects in the new label i created under VFP 5.0, then since in vfp 5.0 this new label does not have any table associated i simply assigned to the object fields some values, in order to print from vfp the label to see if prints correctly, in fact it did it, so well i said, now what i have to do is find out in barprt.prg which is label 1 and what i should do in that prg is replace the "barprt1" by the new label i created , so that should do it, but when i go and run again from sbt to print that label, it still sees the old label, i don't understand, actually i will tell here what i replaced in "barprt.prg" and please tell me what is wrong, also i realized that using the IC,
Maintain -> Modify Bar Code Labels, I am not able to modify that label as i want it, neither i cannot create a new label there, so that is the reason i created a new one in vfp 5.0 and then replaced the name of label called in the prg file by the new one, that should work but for a reason, i am still missing something that the original from SBT is the one is called and printed, please maybe i am missing something here or doing something wrong, can you guide me a little more, please see below what i changed in the "barprt.prg" file, see the remarked line by "EP" and let me know if this is correct or incorrect ?

******
RELEASE WINDOWS lw_rept
IF ll_cont
DO CASE

CASE lc_label = "#1"
lc_label = (gc_icprgdv + "nbarprt6") && by "EP" THE ORIGINAL WAS "barprt1" LABEL TO PRINT ON DOT MATRIX PANASONIC
** I JUST REPLACED IT BY THE NBARPRT6.LBX TO SEE IF IT PRINTS CORRECTLY ON THE NEW LABEL PRINTER USING SBT

CASE lc_label = "#2"
lc_label = (gc_icprgdv + "barprt2")

CASE lc_label = "#3"
lc_label = (gc_icprgdv + "barprt3")

CASE lc_label = "#4"
lc_label = (gc_icprgdv + "barprt4")

CASE lc_label = "#5"
lc_label = (gc_icprgdv + "barprt5")

CASE lc_label = "#6"
lc_label = (gc_icprgdv + "barprt6")
ENDCASE
ENDIF

*//DDP RAL 12/07/99 Added to autoprint from within PORECP
IF TYPE("pc_purno") # "C"
*//DDP RAL 12/07/99 -- END

DO WHILE ll_cont
*-- Set single character option indicators
lc_file = LEFT(lc_file, 1)
ll_itmser = .f.

IF (lc_xscope = "I" and lc_file = "I") or lc_file = "S"
*-- Individual item

*-- Prompt user for Item# number
lc_item = l_selitm()

IF EMPTY(lc_item)
*-- If user chose to exit by entering blank Item #
ll_cont = .f.
EXIT
ENDIF

*-- Locate item in iciloc & Quantity for chosen location
SELECT a_iciloc
LOCATE FOR loctid+item = lc_loc+lc_item
ln_hand = (a_iciloc->lonhand)

*-- Valid if item is seralized
IF (a_icitem->useserl # "N")
IF (ln_hand # 0)
DO l_serial

ll_itmser = .t.
ELSE
IF lc_onhand = "S"
*-- Display options
ln_resp = g_getdlg("Nothing on hand at location " + ;
TRIM(lc_loc) + " for serialized item " + ;
TRIM(lc_item) + ". Print label?", 1, 1, "Yes", "No")
ELSE
DO g_dspalt WITH "Nothing on hand at location " + ;
ALLTRIM(lc_loc) + " for serialized item " + ;
ALLTRIM(lc_item) + ".", 3
ln_resp = 2
ENDIF

IF ln_resp # 1
LOOP
ENDIF
ENDIF
ENDIF

*-- Position record on first record for selected P.O
SELECT a_icitem
SET ORDER TO item
SEEK lc_item

* SELECT a_tmpf6
ENDIF

IF ll_cont
*-- Call report procedures
DO CASE
CASE lc_file = "I"
* lc_porder = lc_file
DO l_bar

CASE lc_file = "P"
* lc_porder = lc_file
DO l_pobar
EXIT

CASE lc_file = "S"
lc_desc = ""
* lc_porder = lc_file
DO l_sbar

ENDCASE

IF (lc_xscope <> "I" AND lc_file = "I")
EXIT
ENDIF
ENDIF
ENDDO && WHILE ll_cont

*//DDP RAL 12/07/99 Added to autoprint from within PORECP
ELSE
IF ll_cont
DO l_pobar
ENDIF
ENDIF
*//DDP RAL 12/07/99 -- END

*-- Reset printer
SET PRINTER TO
 
I think other code in Bar Print Pro is looking for "barprt1" not for your new file. I'd stick with the program as it is written. If you really like your "nbarprt6" file, rename nbarprt6.lbx and nbarprt6.lbt to barprt1.lbx and barprt1.lbt in another folder and then copy to the Bar Print Pro folder, overwriting the original BARPRT1 files.

Why are you unable to edit the six labels in Bar Print Pro? Do you lack the privilege? Is SBT telling you that you cannot do this?

Matthew Lefkowitz
Lefkowitz Systems, Inc.
 
Matthew,
I got it working now, even using my "nbarprt6", the only thing i get is when i select in the grid the item i want to recieve is an error pop window as "error 12 variable no found, called from BARPRT LINE NUMBER 64 " then in order to continue i have the 4 commands button "ignore, rety, debug and quit" , if press the ignore the program continue w/o a problem and i am able to print the labels correctly, after i did them from scratch in VFP 5.0, SO they are running now from SBT with the only exception that i am getting that error, i went to check that line in the BARPRT.prg and it is variable declared a private variablee, here is the variable in the prg file ll_itm = Cl_False then all the way down in the program this variable is like this
ll_itm = Cl_True, probably this Cl_True, is comming from somewhere else i don't for know, i wish i can get rid of thar error related with this variable.
I have access to modify the labels, but i was never able to find the way to make the label the size i needed, i have admin access, so i decided to create the label in VFP, again the only inconvenient is that error for the user if by any chance you have a tip will be very appreciated so far you gave me the light to continue doing this
Thanks
Ernest
 
Matthew,
I understand you, i will keep like this until i can figure that out
Thanks a lot
Ernest
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top