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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing sales orders problem, please help

Status
Not open for further replies.

titoneon

MIS
Dec 11, 2009
335
US
In SBT 5.0 PRO
When trying to print a sales order, after completing the whole process and ready to print, i am getting this error.

"ERROR 5 Records is out of range "
called from SOPSTM LINE NUMBER 1227"
Then the choices i have are ignore, retry and quit

if i hit retry, then the next error will be this

"Error 5 records is out of range"
"called from SOPSTM LINE NUMBER 1227"
"Program code causing error"
.not. Empty(tableid) .and. .not. delete()"
if i hit ignore then this is what is causing the sotran.dbf to be lock, am refering to a previous post, i put a few days ago, now i realized what was causing the problem, that is what i need to fix, " this error 5 issue", in order to not allow to get the sotran.dbf to be locked
can anyone help me on how to fix the following please ?

"Error 5 records is out of range"
"called from SOPSTM LINE NUMBER 1227"
"Program code causing error"
.not. Empty(tableid) .and. .not. delete()"
By the way we reindex everything, using SBT menu
Thanks a lot
 
It could be that the details ( sotranxx) for the one of the so's are missing.
Print the so's one by one ( individual) until you get the error.
If error found , delete the so and re-create it.
If SBT/fox pro proficient you can fix it through the back end by adding records to the sotran file.

Edgar
Integrated Bar Code Systems, Inc



 
Hi Edgar,
the problem it is only happening in one specific workstation, it is a win xp pro 32bit machine, on my computer it is not a problem, so i don't understand what could be ?
Invoices print w/o a problem in that computer having problems with Sales Orders, i even trying to print to another printer from that computer but no luck, it does not make any sense
If you have any other suggestions please i am open to hear'Yes i can use vfp 5.0 to do whatever is needed but, i think it is a profile problem or such a temp file, don't know
Thanks in advance for any help
 
Login as the administrator at that workstation.
Run SBT. Print the invoices or sales order.
If you encounter no problems, then it is a privilege\ rights issue.
Give full rights to the local temp directory or full rights to the c: local drive.
Edgar
Integrated Bar Code Systems, Inc.
 
Ok,
I will try that on monday at the office, it is only that user that has that problem in that computer, do U think will be good idea to install sbt in that workstation again ? i have the cd, as you know all the files resides in the server, the workstation just run the sbtw.exe, which anyway is located too in the server, i don't know what could be corrupted in that machine, it looks like the temp files created while trying to print are not created correctly, just saying.
Thanks
Thanks
 
Hi,
This computer is having problems with Rundll32.exe, when the computer is shutting down, the "Rundll32.exe" is not responding, so i guess maybe a trojan on that computer is creating a problem and as far as i know the "Rundll32.exe" is in charge of calling dll files, probably this could be one of the reason why i am having problems printing that sales order form, any other suggestions ?
Thanks
 
Make sure all service packs are up to date. Do you have antivirus running? If so, disable it and see if you still have problems.
Next suggestion, is to re-install xp pro with all service packs. Install sbt in the clean workstation.

Edgar
Integrated Bar Code Systems, Inc.



 
Edgar,
This is what i did
I opened sbt in my own workst( win xp pro spk 3) then i login in sbt as that particular user that is having problem, guess what ? i am not able to print the sales order using "AUTO", even if i do that in my computer i got the same error that she is getting in her computer, if i login in sbt with my username and password there i snot problem, do u think i should delete that user and then recreate a new one ? i think is the only thing that i could do now
Thanks
Ernesto
 
Did you modified the So Printing in any way.?
What happens with another user ?
Give the problem user administrator rights in SBT, see what happens.
Do you have administrator rights?
Can the problem user print individually ?

Edgar
Integrated Bar Code Systems, Inc.
 
Hi Edgar,

You- Did you modified the So Printing in any way.?
No at all.

You- What happens with another user ?
Well right now i am having the same problem as that user, if i select "Auto" to print the SO#, i am getting

"Error:5 Record is Out of Range
Called from:SOPSTM Line number 1227"
"Ignore Retry Debug and Quit" are the button options i have.
Yesterday i was able to print using "Auto", don't understand why not today
also i created a new user for the user that is having the problem, give the privileges for SO and still we get the same error

You- Give the problem user administrator rights in SBT, see what happens.
I have not done that cause i am administrator, and now i cannot even print in "AUTO"

You- Do you have administrator rights?
Yes i do and now i am experimenting the same problem as her.

You -Can the problem user print individually ?
Yes she can
I don't know what else to do, i don't think reindexing will fix the problem.
I even opened the SOPSTM.prg file and went to line 1227, and that line it is just a variable, here are some lines just before the line 1227

IF lc_shipsum = "Y" AND NOT EMPTY(gc_shiptyp)
*-- See if there is at least one non ship type item on the invoice
GOTO ln_recno
LOCATE REST FOR LEFT(a_sotran->item, LEN(gc_shiptyp)) <> gc_shiptyp ;
WHILE a_sotran->custno + a_sotran->sono = ;
lc_cust + lc_sono

ll_detail = FOUND()
ENDIF

*-- Restore record position in a_sotran
GOTO ln_recno && this is line 1227

Let me know if you find anything or have any other suggestion
Thanks


 
This goes back to my initial suggestion, you may be missing details ( sotran records)

Somast ( header ) with no children ( sotran).

In Fox pro , set somast with relation to sotran. Go one by one in somast until you find the culprit(s) so's. See my post Feb 14th.


Edgar
Integrated Bar Code Systems, Inc.




 
This goes back to my initial suggestion, you may be missing details ( sotran records)

Somast ( header ) with no children ( sotran).

In Fox pro , set somast with relation to sotran. Go one by one in somast until you find the culprit(s) so's. See my post Feb 14th.


Edgar
Integrated Bar Code Systems, Inc.




 
Edgar,
I set the relation already, so each time a select a SONO in somast04, i can display in a brow the records for that sono in sotran04, that is not a problem, the question is, How do i know if a particular SONO in SOMAST04 is having a problem in sotran04 or missing a record there(line item record) ? how can i know that, so far as know SOMAST does not have a field telling me how many lines items should be on sotran, so how do i know what record i missing something, in fact, we have been testing creating a NEW SO and then adding one line item only, then went back to print that SO# using "Auto" and it display the "ERROR as i indicated before.
Now if you are telling me, that having some records in SOMAST that do not have the corresponding records in sotran can be creating future problems printing new SO# using Auto, that is a different situation but still, how do i know while browsing in VFP both tables using the relation which record in SOMAST is missing record in SOTRAN ?
Thanks and please clarify me in i am wrong, or how i should know that ?
Regards
Ernesto
 
Ernesto,
During Auto, SBT goes from top ( to bottom) of SOMAST looking in somastxx.prt for a blank record.
If it finds it, it starts the printing process.
I suggested to you to print the SO's one by one until you find the culprit.
A bit faster would be to print a short range at a time until you narrow the fault.

<<How do i know if a particular SONO in SOMAST04 is having a problem in sotran04 or missing a record there(line item record)>>>

For every SOMAST there should at least 1 (one) corresponding record in sotran.
( I am talking about a normal SO transaction)

Edgar
 
Edgar,
Believe or not, i realized what were you telling me in the your post, so i did the set realtion, and i found 17 records or 17 SONO w/o the corresponding record in sotranxx, now what i am doing is each going to each of those sono in somast and then insert or append a record with the same sono in sotranxx and so on until each of those sono in somastxx has the corresponding sono in sotranxx, do you think i need to enter any other data in the rest of the fields or just the sono in sotranxx ?
Sorry man but i did not know that each sono in somastxx needed to have the corresponding sono in sotranxx cause i was assuming if they were voided, then it was not exist in sotranxx, let me know if need to fill data in some other fields in sotranxx
Thanks
 
What you can do is:
1- Mark them as printed, Put a "P" in somastxx->prtid field. This will prevent from "Auto" printing.
2- Void those so's and if necessary re-create them.


<< sono in sotranxx, do you think i need to enter any other data in the rest of the fields or just the sono in sotranxx ?>>

Need SONO, CUSTNO, ITEM.
I would just void them, in SOMAST>>SOSTAT put "V" and SOMAST>>PRTID put "P"
Recalculate balances for SO Only !

Edgar
Integrated Bar Code Systems, Inc.
 
Edgar,
Thanks a lot for all the clues, if that ever happens to you and you want to know how to find in somast04 the records that do not have the sono in sotran04, just use this select
select sono, custno,ordate from somast04 where sono NOT IN (SELECT SONO FROM sotran04) into cursor junkjob
just simply change 04 for your company number, this will display in a cursor those records in somast that do not have line item records in sotran

i have not doing the "Recalculate balances for SO" yet but i tried to print a new SO using Auto and still is failing
By the way if install SBT PRO 5.0 in a worskt running windows 7 prof 64bit, should i use the cd to install the client ? if so where the libraries dll(vfp5enu.dl nad so on) files should be located in the windows 7, in what folder in the system32 or the syswow folder ?

Thanks a lot for you help
 
<< select sono, custno,ordate from somast04 where sono NOT IN (SELECT SONO FROM sotran04) into cursor junkjob
just simply change 04 for your company number, this will display in a cursor those records in somast that do not have line item records in sotran >>

Not as simple as think. History records ( current or history), partial shipmenst, partial shipments with receipts, voids, bids etc. But if it works for , great !.

<< print a new SO using Auto and still is failing >>

You are still missing some. SBT looks for custno + sono and valid items. Current / History , partial shipments etc.
Do as I suggested.

<< By the way if install SBT PRO 5.0 in a workstation running windows 7 prof 64bit, ...>

Use the CD, workstation installation. Why re-invent the wheel ?
I have not tried PRO50 and Win 7, maybe somebody else has a suggestion.
Edgar
 
Edgar,
Thanks a lot for all the suggestions, i got it down, it is working fine now, after finding the missings line items and just imputing in sotranxx at least the sono, custno and item, got working fine, i just realized that this happened cause some of the users sometimes got their computer frozen at the time they are ready to add the items in the SO form.
I just commented with you about the Wind 7 pro 64 bit cause i have some machines under win 7 32bit and some under 64bit and they are working ok with sbt but i just copy the library in the 64bit into the folder "SYSWOW", AND NEVER used the cd to install the clients, i just wanted to know if you ever did it with the cd and where you located the library.
Thanks a lot
 
I'm glad everything is working for you.
When you use the cd to install the workstation, it loads the Fox libraries where it needs to be placed.
You don't need to do anything else.

Edgar
PS Make sure you re-create those SO's line items if needed, it may create problems when shipping, otherwise void them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top