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

Sales Analysis Report 1

Status
Not open for further replies.

rjm65

Technical User
May 27, 2003
86
US
When our company initially setup the customer accounts in SBT, they failed to use all the alloted customer character spaces available, that is they designated some customer with 2-3 letter codes like AF, AF3, or KW, etc. New customer now are created using all the possible character spaces allowed.

My problem is when running certain reports, like Sales Analysis Report in A/R, when I want to run it for customer AF it also includes customer AF3 (in the customer blank it reads to write "portion or blank for all."

There are other variables that I can use to help me narrow the search, but it is not always feasible to use them as sometimes a territory or sales rep is changed in the year for a customer.

Is there an easy way to make the "customer" input box search only for the exact match, or use a wildcard (*) for instance when I do want it to search for a range?

Thanks in advance!
Raymond
rjm65@yahoo.com

 
Try typing "AF ". Notice the space after the name

Edgar
IBS
 
It didn't work. Typed the "space" in with both insert on and then off to see if that would make a difference too. Thanks,
Raymond
 
hmmm, SBT/ACCPAC is removing trailing blanks during the executiuon of the program.
Option 1
Modify the ARREPT.PRG and look for the SAles Analysis report procedure.
Option 2
Do a Customer Key Change In System manager and change AF the name to something else. This may take a while,depending upon how much history you have.

Regards,
Edgar
IBS

 
Eventually I would love to do option 2 to standardize all customer name codes. In the meantime, I think I found the area of the ARREPT.PRG that needs to be modified:

*-- Set customer number condition
IF NOT EMPTY(lc_custno)
lc_filt = lc_filt + [a->custno = '] + TRIM(lc_custno) + [' AND ]
ENDIF

Is everything that comes after IF NOT EMPTY(lc_custno) what tells the program to use customer number or portion to match?

Thanks,
Raymond
 
Try as follows>:

IF NOT EMPTY(lc_custno)
lc_filt = lc_filt + [a->custno = '] + lc_custno + [' AND ]

Remove the alltrim() function

Best of luck

Edgar
IBS
 
Thanks Edgar...but still no luck. Still shows results for say AF and AF3, tried with and without the "space" too.

In the end I would love to do the key change, but several "key" people within our organization would have to learn new customer codes.... and you can imagine how hard it is to teach old dogs new tricks!

Thanks,
Raymond
 
Dear rjm65
Assuming that you've changed the line correctly.
1 - Did you find the correct Procedure or Function for sales analysis. It Should be PROCEDURE l_arrep3 IN ARREPT.PRG.
2- Did you compile the program ? In Fox Pro program menu select compile.

Let me know, it should work.

Edgar
IBS

 
It should and it did.... after I did step 2! I have very little knowledge of Foxpro, so I wasn't aware of having to compile, plus being extra careful not to do any step not mentioned. Works just like you said now. Thanks again!
Raymond
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top