[SOLVED]using defined counters for specific instances
I'm trying to count the number of proficient students and non-proficient students by defining I9 counters and if testing the proficiency fields. If all 4 are "P" the kid is proficient if not, he's non-proficient. I put the value of the counter in the footing, but its always 0. What am I missing
TABLE FILE ASTU_STUDENT PRINT 'ASTU_STUDENT.ASTU_STUDENT.PERMNUM' AS 'STD ID' 'ASTU_STUDENT.ASTU_STUDENT.COUNSELOR' AS 'TEAM' 'ATCH_TEACHER.ATCH_TEACHER.LASTNAME' AS 'TEACHER,LAST NAME' 'SPROF_SCORES.SPROF_SCORES.READING_PF' AS 'READING P/F' 'SPROF_SCORES.SPROF_SCORES.WRITING_PF' AS 'WRITING P/F' 'SPROF_SCORES.SPROF_SCORES.MATH_PF' AS 'MATH P/F' 'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' AS 'SCIENCE P/F' COMPUTE PROF_STD/I9 = IF 'SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' AND 'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' AND 'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' AND 'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P' THEN 1 ELSE 0; BY 'ASTU_STUDENT.ASTU_STUDENT.GRADE' BY 'ASTU_STUDENT.ASTU_STUDENT.CCSDFULLNAME' AS 'NAME' HEADING "Proficiency Report for Full-Time Students at AIS" "by Grade and Student Last Name" " " " " FOOTING " " ON TABLE SUBFOOT "TOTAL PROFICIENT STUDENTS WHERE ( ASTU_STUDENT.ASTU_STUDENT.SCHOOLNUM EQ '879' )This message has been edited. Last edited by: MARYC,
WebFOCUS 7.6.8 ORACLE
January 06, 2011, 01:52 PM
T.Peters
Are you looking for something like this:
TABLE FILE COURSE
PRINT
COURSE.CRSELIST.COURSECODE
COURSE.CRSELIST.CTITLE
COURSE.CRSELIST.TUITION
COURSE.CRSELIST.DURATION
COMPUTE Count_3_and_4/I5 = IF COURSE.CRSELIST.DURATION EQ '3' AND COURSE.CRSELIST.TUITION LT 3000 THEN 1 ELSE 0;
ON TABLE SUBFOOT
""
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE COLUMN-TOTAL AS 'TOTAL' Count_3_and_4
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
COURSECODE CTITLE TUITION DURATION Count_3_and_4
AMA130 HOW TO WRITE USERS MANUAL 1,030.00 3 1
AMA680 BUSINESS TO BUSINESS MKTG STRATEGY 2,160.00 4 0
AMA800 INTERVIEWING: A STRATEGIC APPROACH 900.00 3 1
BIT420 EXECUTIVE COMMUNICATION 2,600.00 6 0
BIT640 NEGOT AND ADMIN THE LABOR CONTRACT 2,600.00 6 0
BIT650 IMPROVING INTERNAL CONSULTING SKILL 1,030.00 3 1
EDP090 DELEGATION AND TEAM EFFORT. 1,500.00 3 1
EDP130 STRUCTURED SYS ANALYSIS WKSHP 1,200.00 5 0
EDP390 EFFECTIVE MANAGERIAL COUNSELING 900.00 3 1
EDP690 APPLIED METHODS IN MKTG RESEARCH 2,250.00 5 0
EDP750 STRATEGIC MARKETING PLANNING 2,600.00 5 0
MC230 INTRO TO SYSTEM ANALYSIS 1,110.00 4 0
MC90 MANAGING DISTRIBUTOR SALE NETWORK 1,030.00 3 1
NAMA40 PLANNING & DEVELOPING PRODUCTS 1,150.00 4 0
NAMA730 EFFECTIVE SALES MANAGEMENT 1,900.00 3 1
NAMA930 CORPORATE FINANCIAL MANAGEMENT 2,100.00 5 0
PDR330 CHANGING ROLE OF EX SEC & ADM ASST 915.00 3 1
PDR740 STRATEGIES IN SALES MANAGEMENT 1,900.00 3 1
PDR870 INSTRUCTIONAL DEVELOPMENT WORKSHOP 2,070.00 5 0
PU168 FUNDAMNETALS OF MKTG COMMUNICATIONS 1,100.00 4 0
PU440 GAINING COMPETITIVE ADVANTAGE 1,600.00 4 0
SFC280 FUND OF ACCTG FOR SECRETARIES 850.00 2 0
SSI220 FIELD MANAGEMENT OF SALESPEOPLE 1,100.00 4 0
SSI670 APPLIED PRODUCT/MARKET MANAGEMENT 2,600.00 5 0
SU620 HOW TO WIN ARBITRATION CASES 800.00 2 0
UMI710 MKTG FOR THE NON-MKTG MANAGER 1,500.00 3 1
UMI720 SUCCESSFUL PRODUCT INNOVATION 2,600.00 5 0
UNI620 PRINCIPLES OF PROFESSIONAL SELLING 1,100.00 4 0
UNI780 ORGANIZATIONAL CAREER DEVELOPMENT 2,600.00 5 0
TOTAL
10
WebFOCUS: 7702 O/S : Windows Data Migrator: 7702
January 06, 2011, 03:47 PM
MARYC
No, I'm checking flags on the students record that indicate whether or not he has passed the prof tests. If they are all on I want to count him as 'proficient'. I also have to count the students who are non-proficient in all 4 categories, so once I figure out how to count one, I can count the others.
WebFOCUS 7.6.8 ORACLE
January 06, 2011, 03:52 PM
Waz
Perhaps if you added ST. to the field in the footing ?
Also when you post code, please put it in the code tags.
[CODE]
[/CODE]
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
January 06, 2011, 04:57 PM
MARYC
OK Let's try this again
[TABLE FILE ASTU_STUDENT PRINT 'ASTU_STUDENT.ASTU_STUDENT.PERMNUM' AS 'STD ID' 'ASTU_STUDENT.ASTU_STUDENT.COUNSELOR' AS 'TEAM' 'ATCH_TEACHER.ATCH_TEACHER.LASTNAME' AS 'TEACHER,LAST NAME' 'SPROF_SCORES.SPROF_SCORES.READING_PF' AS 'READING P/F' 'SPROF_SCORES.SPROF_SCORES.WRITING_PF' AS 'WRITING P/F' 'SPROF_SCORES.SPROF_SCORES.MATH_PF' AS 'MATH P/F' 'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' AS 'SCIENCE P/F']
this is the part that doesn't seem to work
[ COMPUTE PROF_STD/I9 = IF ('SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' AND 'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' AND 'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' AND 'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P') THEN 1 ELSE 0; NOPRINT ]
BY 'ASTU_STUDENT.ASTU_STUDENT.GRADE' BY 'ASTU_STUDENT.ASTU_STUDENT.CCSDFULLNAME' AS 'NAME' HEADING "Proficiency Report for Full-Time Students at AIS" "by Grade and Student Last Name" " " " " FOOTING "TOTAL PROFICIENT STUDENTS [ WHERE ( ASTU_STUDENT.ASTU_STUDENT.SCHOOLNUM EQ '879' ) AND ( ASTU_STUDENT.ASTU_STUDENT.CCSDSTATUS NE 'A' OR 'G' OR 'I' OR 'N' ) AND ( ASTU_STUDENT.ASTU_STUDENT.ENTERCODE NE 'CR' OR 'E4' OR 'E5' OR 'E6' ); ON TABLE SET PAGE-NUM OFF ]
WebFOCUS 7.6.8 ORACLE
January 06, 2011, 05:04 PM
Glenda
Do you have more than one "schoolnum" or is this report limited to a selected "schoolnum"?
Glenda
In FOCUS Since 1990 Production 8.2 Windows
January 06, 2011, 05:27 PM
MARYC
Just the one school
WebFOCUS 7.6.8 ORACLE
January 07, 2011, 01:43 PM
George Patton
Isn't it just simpler to do this as a DEFINE?
DEFINE FILE ASTU_STUDENT
PROF_STD/I9 = IF ('SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P') THEN 1 ELSE 0;
END
Or even:
DEFINE FILE ASTU_STUDENT
PROF_READING/I9 = IF 'SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' THEN 1 ELSE 0;
PROF_WRITING/I9 = IF 'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' THEN 1 ELSE 0;
PROF_MATH/I9 = IF 'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' THEN 1 ELSE 0;
PROF_SCIENCE/I9 = IF 'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P') THEN 1 ELSE 0;
PROFICIENT/I1 = IF PROF_READING + PROF_WRITING + PROF_MATH + PROF_SCIENCE EQ 4 THEN 1 ELSE 0
END
... Then just use PROFICIENT as your test. You could easily expand this a wee bit to indicate those who are proficient on one area but not others.
This message has been edited. Last edited by: George Patton,
After your final sort is completed hold data as "FDATA" and add the following code
DEFINE FILE FDATA
PROF_STAT/I9 = IF READING_PF||WRITING_PF||MATH_PF||SCIENCE_PF EQ 'PPPP' THEN 1 ELSE 0;
NUMPROF/I9 = LAST NUMPROF + PROF_STAT;
END
-*
TABLE FILE FDATA
PRINT
'ASTU_STUDENT.ASTU_STUDENT.GRADE'
'ASTU_STUDENT.ASTU_STUDENT.CCSDFULLNAME' AS 'NAME'
'ASTU_STUDENT.ASTU_STUDENT.PERMNUM' AS 'STD ID'
'ASTU_STUDENT.ASTU_STUDENT.COUNSELOR' AS 'TEAM'
'ATCH_TEACHER.ATCH_TEACHER.LASTNAME' AS 'TEACHER,LAST NAME'
'SPROF_SCORES.SPROF_SCORES.READING_PF' AS 'READING P/F'
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' AS 'WRITING P/F'
'SPROF_SCORES.SPROF_SCORES.MATH_PF' AS 'MATH P/F'
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' AS 'SCIENCE P/F'
HEADING
"Proficiency Report for Full-Time Students at AIS"
"by Grade and Student Last Name"
" "
" "
FOOTING
"TOTAL PROFICIENT STUDENTS : <LST.NUMPROF"
END
Glenda
In FOCUS Since 1990 Production 8.2 Windows
January 07, 2011, 02:27 PM
Glenda
Just out of curiosity, why do you have tick marks (') around your field names?
Glenda
In FOCUS Since 1990 Production 8.2 Windows
January 07, 2011, 03:40 PM
GamP
Those are being generated by DevStudio nowadays. You always get fully qualified fieldnames and they come with the tick marks.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
January 07, 2011, 03:43 PM
Glenda
That would explain why I don't see them.
Glenda
In FOCUS Since 1990 Production 8.2 Windows
January 07, 2011, 03:48 PM
Tom Flynn
Those are being generated by the GUI. They don't appear when you code via the Text Editor...