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!

I am getting error please help

Status
Not open for further replies.

bigspank

Programmer
Aug 10, 2001
28
0
0
US
I have a database, it contains one table 2 views 2 reports. In one report I have this procedure:

Procedure Asiancount
Local LnAsian
LnAsian = 0
scan for race = "A"
LnAsian = LnAsian + 1
endscan
return LnAsian
Endproc

Procedure Blackcount
Local LnBlack
LnBlack = 0
scan for race = "B"
LnBlack = LnBlack + 1
endscan
return LnBlack
Endproc

Procedure Hispaniccount
Local LnHispanic
LnHispanic = 0
scan for race = "H"
LnHispanic = LnHispanicHispanic + 1
endscan
return LnHispanic
Endproc

Procedure Indiancount
Local LnIndian
LnIndian= 0
scan for race = "AI"
LnIndian = LnIndian + 1
endscan
return LnIndian
Endproc

Procedure Othercount
Local LnOther
LnOther= 0
scan for race = "O"
LnOther = LnOther + 1
endscan
return LnOther
Endproc

Procedure Tcount
Local LnTotal
LnTotal= 0
scan for race != " "
LnTotal = LnTotal + 1
endscan
return LnTotal
Endproc

Procedure Whitecount
Local LnWhite
LnWhite = 0
scan for race = "W"
LnWhite = LnWhite + 1
endscan
return LnWhite
Endproc
But when I run it or try to Preview the report I get this error: 'Blackcount.prg' does not exist!

Please help this is driving me nuts!

Thanks
When you sow a thought, you reap an act. When you sow an act, you reap a habit. When you sow a habit, you reap a character. When you sow a character, you reap a destiny.
 
HI

I feel you can do the whole lot in a much simpler way...

SELECT race, COUNT(race) AS myCount ;
FROM myDBF GROUP BY race INTO myCursor

NOW myCursor will have all the counts required and you can find whatever you want - one record for each race and the count number.

You can cast your report based on above SQL SELECT ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Check out SET PROCEDURE TO in the MSDN.
If your procedure file are in another prg or your prg files are not in the path, you will have to issue a 'SET PROCEDURE TO myprocedurefile' so Fox can find the procedures you are calling.

HTH,
Weedz (Wietze Veld)
My private project:And especially for VFP rookies:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top