How to calculate % with count base on condition? - crystal-reports

I use crystal report, my report have 2 fields : man=3 and woman=4. I want to calculate % man? with formula field. I try count({person.sex},"man")*100/count({person.sex}) but show Error "A field is required here"? Help me!

Take 2 running total variable, put into the group footer or appropriate section (preferable on any footer- report footer will display total percentage, not group wise) and give condition as you want or check below links.
Using a Running Total in a Formula in the Details Section of a Crystal Report
How to sum running total field for each group in crystal report?
http://community.spiceworks.com/topic/117306-crystal-reports-won-t-summarize-or-running-total-my-formula-field
please check this link
http://crystalreportsblog.com/crystal-reports-running-totals/
http://www.experts-exchange.com/Database/Reporting/Crystal_Reports/Q_28044491.html

Related

Can you get a Summary Total of a calculated amount that is in a Group Footer?

I have a formula field in a group footer that gets some of its information from another summary field in the same group footer. Report works great, just can't figure if I can get a grand total of the individual footer totals.... I can't use any of the Detail line fields because they need to be subtotaled first (in the group footer) so that the formula field can do its job. Is this an un-solvable circular problem? I could dump the results into excel if needbe.
thanks for any advice

calculating the percentage based on the number of records in the crystal reports

In my crystal reports I have a field called "PAYMENT" it has to be displayed according to the following requirement
REQUIREMENT
if there is only one RECORD in detail section then it has to display,
PAYMENT=percentage
if there are MULTIPLE RECORDS in detail section then it has to display,
PAYMENT=percentage+(percentage(total value)+remarks)
can anyone please tell me how to do this?
You can use the following formula in CR to count the records
CountRecords
Count ({Table.PAYMENT})
PaymentDisplay
Then create another formula with your decision making:
If COUNT FORMULA = 1 then DISPLAY OPTION 1 else DISPLAY OPTION 2
I have not tested this but it should work.

how to count row in crystal report

I've got data as picture below, i'm using crystal report to display statistic report from that data.
i want to count MRN which got 2 until 5 rows of episode number only.
currently im doing
1) group MRN in crystal report and count(episode number).
2) create 1 formula like :
if count(episode number) >=2 and count(episode number)<=5 then count(episode number)"
3) put the formula to report and try to insert summary to count that formula, but no selection summary appear for that formula.
Can you give me an idea how to count MRN with 2 until 5 episode only? refer to picture for clear explanation
In Crystal you can use two condition types to sort which records are being showed:
Record selection formula
Group selection formula
Both are located in the menu Report > Selection formulas
In your case you can define a group on field MRN and create a Count field inside that group. To show only groups where the count is between 2 and 5, use the Selection Formula > Group condition in the Report menu.
Count ({EpisodeNo},{MRN}) <=5 and Count ({EpisodeNo},{MRN})>=2

I want to add a group summary data into the formula field in crystal report

I created a account wise group and i want to find the maximum date accroding to the group so i created a summary field. I want to add the summary field in the formula.how can i do that help me.
try this
go to formula workshop and double click Maximum summary field which is most effective way.
go to formula workshop and write as below
Maximum ({Attendance.Date})
The syntax changes if its a group footer I have given it for report footer

Crystal Reports is grouping by default

I have a crystal report with three columns. I want to display all the records and a total in the last row. However, my crystal report is grouping by default. I am confused
This is how I do it in the CR.
This is how it shows
Thi sis how i wanted
I want everything in a single table and a one toal for each. Why is it grouping this way? Any help would be appreciated.
EDITED
Below is how i arrived at the TOTAL
Formulas
O/S BALANCE := amount - collected.
OSBALANCE TOTAL := SUM{#O?S BALANCE});
COLLECTED TOTAL := SUM({colection})
Add a cross-tab object to the report's footer section. Use the OS BALANCE field for the rows field and the COLLECTED for the summarized field.
See that is where it makes the difference in crystal reports. I will suggest one thing place OSBalance in detail and put the total in report footer and let me know the result