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

Crystal - Display Map with counts.

Status
Not open for further replies.

vikoch

Programmer
Feb 6, 2008
38
US
I need to create a rpt., to display a Map. (I have a map)
For each state, I need to count and display on the map a number of students enrolled into the program(any pgm) in that state.
Please help.
 
Code:
select state, count(studentID) studentCount
from tblStudents
where enrolled = 1
group by state



[small]----signature below----[/small]
Majority rule don't work in mental institutions

My Crummy Web Page
 
I know the SQL code, but... How do I do this in Crystal?
In what section do I place the map? How do I print/display those counts.
This is what I did so far....
1. created @state:

if {Name.STATE_PROVINCE} = 'AZ' then "Arizona" else
if {Name.STATE_PROVINCE} = 'AL' then "Alabama" else
if {Name.STATE_PROVINCE} = 'CA' then "California"
group on this formula.

2. created @1:
whileprintingrecords;
numbervar cn;
cn := cn + {@st_al}

3. created @2:
whileprintingrecords;
numbervar cn;
cn;

4. created @3:
if {Name.STATE_PROVINCE} = 'AL'
then 1 else 0
5.Placed @2 in RF
Placed @1 & @3 in GH

Does not work.
 
Are you sure this is the right forum to ask?

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
The crystal Reports forum would be a better place for that question.

"NOTHING is more important in a database than integrity." ESquared
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top