I have data like this
Type Buy Sell
Car1 23000 15000
Car2 24000
Car3 25000
I used sum(#buy) for total buy field and sum(#sell) for total sell field.
Can I sum all or grand total that like sum(#buy) + sum(#sell) ?
because when I run in VB6 for preview that report, Grand total not show on, please help me master.
For this there are 2 approach.
Via Formula :- add a formula field and in that add give above condition in formula field editor. put this field in your desired location, but ideally put in report footer or group footer(if any).
Use running total or summary total.
Check this links
Crystal Report Sum of a Column data
https://forums.asp.net/t/1971464.aspx?Sum+of+Total+in+Crystal+Report+
Related
I have a report that calculates a summary field by group location which I am calling a sub total. There is another summary field by company in group company section. We allocate corporate overhead costs based on volume of revenue. I need to take the location total revenue and divide by the overall company revenue to get the % of volume. My problem is that I cannot get the company total into the location group row without effecting the numbers. I have tried to create a running total field to get the total. I have tried referring to the main report to get the company total and I have tried summarizing the location totals but I cannot summarize a summarized field. Any suggestions would be really helpful, thank you!
Company Locations---------- Total Revenue-------- % of Volume
California------------------------ 500,000----------------- 500,000/950,000 ?
New York ---------------------- 300,000
Ohio ---------------------------- 150,000
Company Total: -------------- 950,000
This looks like the same thing I am trying to do but I don't understand the answer yet..
http://www.experts-exchange.com/questions/27749404/Crystal-Reports-XI-fixed-value-for-denominator.html
your best option is creating a subreport on the report header to calculate only your total revenue and then using it on your main report through a shared variable.
if sum({totalRevenue},{location}) > 0 then
sum({totalRevenue},{location})
/
sum({totalRevenue})
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
I use RDLC reports in past but now i am using Crystal report. i use this formula in RDLC report
=Previous(RunningValue(Fields!balance.Value,sum,nothing))+Fields!balance.Value
but not find Running value in Crystal report. can anyone tell me where is it in crystal report? if not any other solution to do this?
i want result like this in balance column
id name debit credit balance
1 umer 100 0 100
2 umer 0 50 50
3 umer 0 10 40
4 umer 200 0 240
I'd suggest you use a Running Total for this as this type of calculation is exactly what they're intended to be used for.
First, create a formula that will handle the debits as addition to the total and credits as subtractions: {table.debitAmount} - {table.creditAmount}
Then create a Running Total and plug the formula you just created into the "Field to summarize". In the "Evaluate" section of the Running Total screen, keep it set to "For each record" and in the "Reset" section, keep it set to "Never" if you want this balance to work over the entire report or pick a group if your balance should be by a grouping level.
EDIT: It goes without saying, but you'll want to verify that the "Type of summary" to be set to "Sum"
Write below code in Balance
Whileprintingrecords;
Shared Numbervar balance;
Shared Numbervar display;
balance:=debit-credit;
display:=display+balance;
display
I'm trying to get the total count of employee ids so that I can use it as the basis for a percentage in my report. I'd like my report to look like this:
Types With Email
Customer 20% 15%
Vendor 40% 80%
Employees 40% 75%
Total People: 100
In my view I have the employee id, type and email address. I can get the count and the first percentage (percentage of customers, vendors and employees). What I'm have trouble with is the percentage of customers or vendors with email address. I've tried using formula fields and summaries, but haven't gotten too far with them. Can anyone point me in a direction?
Create a formula to calculate email-address presence:
//{#has_email}
If Isnull({employee.email}) Then
0
Else
1
It doesn't need to be added to the canvas.
Create a formula to calculate the % total:
//{#email %}
// summarize number of email address for a given type
Local Numbervar Total := Sum({#has_email}, {employee.type});
If Total <> 0 Then
Total / Count({employee.id}, {employee.type}) * 100
Add to group header or footer and format with %.
looking to show an employee total on a report which has the following.
The report shows, by company divisions, count of employees to have had their annual assessment, I also wish to show total employee count per division so we would show
North Division - 50 employees had assessment out of 170 employees
East Division - 30 employees had assessment out of 50 employees
I cant seem to figure how to show the total count by division.
any pointers would be appreciated.
First of all; you need to group your data by Division.
You then need add a running total: Set it to count a a field displayed on each line (such as employee id). Then click in the "Evaluate" section - "Use a formula". Click the X-2 button to open the formula editor.
Your formula will be dependant on your data. You want it to output "True" for employees who have had their assement and false otherwise. [*]
Then in the "Reset" section, click "on change of group" and select your division group.
Now place your running total in the group footer of the division group.
[*] if this does not work, you will need to create a formula that outputs 1 or 0, on every line depending on whether the employee has had an assessment. Then create a sum on this formula to count the employees.
There are multiple methods of achieving what you want. Google "Crystal Reports Conditional Sum" for more answers.