01-14-2004, 05:18 AM
I have a question about crystal report formula...
the situation :
I already extract information for all student in this semester from my database. The student is in different kind of programme (Diploma, Degree, PHD)
TABLE STUDENT :
So i already can list all the student grouping with the programme.
My question is....
1. How do i create a formula so i can display a statistic information for displaying the total of Diploma Male, Diploma Female, Degree Male, Degree Female and so on...?
any example how to count it using formula?
thanks a lot for the information.
01-14-2004, 05:29 AM
What database you using ?
Count(Name) as StudentCount
Sex = "male"
Programme = "PhD"
You can pass in the sex and programme to make it more dynamic.
01-14-2004, 05:51 AM
I'm Using SQL Server,
Actually i'm trying to display using crystal report, not using any VB, because the VB part is ok. i already connect to the database.
i just don't know how to use the Formula Editor to display the total for each of the programme and Sex...
how do i do that? any example using Formula Editor in Crystal Report?
Thanks for the reply...
01-14-2004, 07:31 AM
No, no, no that is VB format. This actually has nothing to do with VB, but I am willing to help you :).
Do you need to add up specific fields while printing records? Do you have experience with creating formulas? Basically, it looks like you want a formula for a running total, correct? Do you want a running total of all diplomas? Can you map out what fields need to be in this formula (what needs to be compared) and what final output you need (etc: based on fielda and fieldb I need to get the total of this field..etc.)
Let me know, and I will try to get you started
01-14-2004, 06:22 PM
I have STUDENT table with this colum
TABLE STUDENT :
-Sex (value : M,F)
-Programme (Value : Diploma, Degree, PHD)
what i want to do is, to calculate the formula total for
and so on...
i already group it by the PROGRAMME and it show the total student for each of the programme.
now how do i break it, into male and female?
thanks for the reply....
01-14-2004, 07:48 PM
In the crystal report :
the SQL Query : Select * from STUDENT
the selection for total
Diploma/Male : Sex="M" and Programme="DIploma"
i just don't know how to count it using formula... if i want to count only total student for each programme, i can just group by Programme and get the total group. since i have to break it to F and M, so i'm stuck at that point right now....
thanks for the reply
01-15-2004, 07:42 AM
"Diploma/Male : Sex="M" and Programme="DIploma"
i just don't know how to count it using formula... if i want to count only total student for each programme, i can just group by Programme and get the total group. since i have to break it to F and M, so i'm stuck at that point right now...."
OK, so do you have a Gender(sex) FIELD and a Program FIELD? This is still not clear. If not what fields do we need to search for in order to find this information.
Basically we want to count all instances where the gender is "M" and the program is "Diploma". So, let me know if these are two valid fields, or if this information needs to pulled from a different field such as in the "Development" field I need to search all records and find the string "Diploma". Or is there a specific "Program" field that only holds certain values such as "college degree, diploma, work", etc.