I have this report:
Question Group
----Question - [TOTAL]
--------Answer 1 (10)
--------Answer 2 (0)
--------Answer 3 (8)
--------Answer 4 (2)
----Total: 20
Total: 20 is calculated with running total field, and it can only be calculated after each question finishes.
What I want is to place this value at the beginning ([TOTAL]), so it can be used to calculate percentages (--------Answer 1 (50%)).
I tried with formulas, with no success.
I managed to change the SQL that feeds the report and then used a formula to do what I want
count({newfield},{group})
Related
I'm having some problems with grouping and running totals in crystal reports, I've found loads of info whilst googling but I'm looking a bit more info.
Currently I have 3 tables, jobs, times and costs, I have a running total to calculate the value of the time.hours and another for the costs.amount.
The issue I'm having is that the costs are being multiplied by the amount of time.hours records that exist.
so if a job has 3 time.hours records and there is only one record of costs.amount that
cost is being multiplied by that about of records
So what i end up with is this
Job Hours Costs
123 5 0
123 4 100
123 3 0
=========================
12 100
which is exactly right, now if i add another running total without resetting then my total ends up as
========================
12 300
I think this is happening because of the way i have them grouped but im not sure how to make them group to only job.ID
This was solved using ( ) to break the formula down
({timesheet.Time_Date} <={?timDateUJC} and {jobsheet1.Job_JobCompleted} = 0)
or
({materialcost.Inv_Date} <= {?supDateUJC} and {jobsheet1.Job_JobCompleted} = 0)
I am trying to access the summarized fields in a crosstab in order to determine which is the greatest value in a row.
My data displayed is as follows:
Jan Feb Mar Quarter
clerk 1 shoes 0 3 1 4
clerk 1 pants 5 10 10 25
What I need to display on the report is that the major item sold by Clerk 1 is pants.
I am table to do this on a monthly basis but not summary level. Any ideas?
Thanks, Holdfast
You need to insert Embeeded Summary at grand total level and write maximum or minimum formula to retrive, but one issue here is when you insert embeeded summary then you will get extra row at each level of the cross tab.
Note: This is possible in CR 2008 and I have tested in CR 2008
I am making a report in "SAP Crystal Reports" and I need to calculate the sum total of the group field. Report is grouped by user name, I made the "Running Total Fields" field and it calculates all of them as in example below:
UserName 1 2
3
1
-----------
6
UserName 2 1
2
-----------
9 <------- I need here 3
Does anyone know how to solve this?
Thanks in advance.
Two options:
edit the running total field and reset it after each group (it is now generating a total for all records).
use a summarized field - select the field in the details section and choose Insert | Summarized Field...
I would also suggest reading a book on the topic.
I have a group running total that needs to be sum up at the report footer. Since thats not possible with CR I had to end up having another running total that refreshes "Never". But now I need to calculate some percentages at the group level based on this Grand total. Unfortunately I cannot access the value for grand total (because its another running total).
Confused?? Ok reports should look like below..
Column 1 | Colunm 2
======== =========
| Group 200 (Running Total Refresh at Group level) | 20% (200%1000) |
| Group 500 (Running Total Refresh at Group level) | 50% (500%1000) |
| Group 300 (Running Total Refresh at Group level) | 30% (300%1000) |
Footer 1000 (Running Total Never Refreshed)
But column 2 doesn't give me the correct value. it gives me 100% always means 200%200 or 500%500 etc.
Any idea how to fix this??
Thanx Lee, using a running total formula worked, I added following formula to the report footer,
numbervar Samples;
if {product.sku}="card-sample" then
Samples := Samples + {#num_qty};
Samples;
Then I use this formula to calculate column 2
Try this
Add a formula field for group percentage and then paste below code in it.
Group total / sum(column)
place this formula at your group level.
I should think your report total wants to simply be a summary field not a running total. Then your column 2 value can be calculated using running total / sum(field);
Here is an example:
I have two columns age and salary.
When age > 18 i want to add the salary.
Initially I used a running total with a condition {age} > 18
That didn't work well so i deleted the running total, and created a formula: if {age} > 18 then {salary} else 0
I then created a summary on that formula field.
Make sense?
hi all i wana ask a question about crystal reporting in vs 2008
lets say i have a report with these data
customer_ID Customer_Name Order_amoont Order_Date
(#group1 VipCustomer)
1 xyz 3 1/1/2010
2 abc 4 2/2/2010
5 sds 21 3/12/2009
(#Group2 NormalCustomer)
3 tyt 2 3/3/2010
4 ha 4 21/3/2009
i want only to display records where Order_Date year is in 2010 only so i went to the section expert and i added a condintion in suppress formula Year(order_Date)=2010 and i get the result ,,the question is how to count how many vip customers ordered in 2010 only and how many normal customer order in 2010 only ,,then i want the total number of both type of customers to be displayed to have a report like that::
customer_ID Customer_Name Order_amoont Order_Date
(#group1 VipCustomer)
1 xyz 3 1/1/2010
2 abc 4 2/2/2010
subtotal 2
(#Group2 NormalCustomer)
3 tyt 2 3/3/2010
subtotal 1
total 3
i know that answer ,and i will answer it
1-make a conditional formula field and add to it this condtion
if year(Order_Date)=2010 then 1
2-then add summary to the formula filed
--to get total place this summary in the report footer
--to get sub-total place this symmary in group footer
there is also another way to do it
by using running total field and it evaluate section us the formula year(Order_Date)=2010
then to get total place the running field in report footer
to get sub-total make a new running field the same as the 1st but in the reset section check on reset of change of group and place this field in group footer
thnx