Crystal Reports formula based on group footer summary field - crystal-reports

New to Crystal Reports -
I have a report with 3 columns - Estimated Hours, Actual Hours, Remaining Hours.
In the Group Footer it summarizes the hours by job. The remaining hours formula is {job.esthours}-{job.actualhours}. I want it to be blank if there is no estimated hours. I know that I can't use the sum of estimated hours in my formula but not sure what formulas to use.
Sample Report

You need to add a condition to suppress your formula in case the first cfield value is null. You can do it in two ways:
1) Add the condition in your Remaining Hours formula. Try this if you want blank also in your detail sections. Right-Click -> Suppress -> add there the next condition:
if(isnull({job.esthours}))
2) Add the condition in your Remaining Hours Summary. This is better if you wish to show negative values of Remaining Values in your Details Section for some reason. Right-Click -> Suppress -> add there the next condition:
if(isnull(sum({job.esthours})))
And yes, you can use the estimated hours summary, , you can find it in your Formula workshop, in the Report Fields tree

Related

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.

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

Hide rows with no values in hierarchial grouping in crystal reports

I have a crystal report - showing some financial data. As normal with financial data we have several general ledger accounts - which are grouped hierarchically. We are using grouping in Crystal report with some totals on hierarchical groups.
There are some rows where the values are zero. The groups also have total of zero as a result of this. We need to hide these rows. If we try to check the sum of the field - on the group level - it hides all the parent rows (since they themselves do not have any value - only values are derived from the child rows).
Need some way to do this in crystal?
You can suppress rows base on a condition.
In the menu go to Report->Suppress Expert...
Select the details line then select the formula button next to Suppress
You only need to put the condition that will be true to suppress the line
{[Your value field]} = 0
For groups, you will need to find the sum of your total for that particular group
SUM({[Your value field]}, {[field you are using to grouped by]}) = 0

Crystal Reports, and running totals

I am designing a report in which a Running Balance column adds itself to Debit and subtracts the answer from Credit column on every row. Here in this example I have started calculating from 1st of January. In this case, my Running Balance column will have zero.
Now my client wants to have a look at records from 17 January to the end. In that case, my cumulative balance will NOT be zero at first but instead it will calculate cumulative balance for all the dates before 17 January, and present it as the starting balance for 17th of January. I am stuck at this point. How to add all the record before 17th of January and show their Total in a single row.
There are lots of different ways to achieve this, but here's one idea you might like to try.
Set the report selection criteria to include all records from 01/01.
Create 2 report detail sections.
In the first detail section just place the running total and maybe a label: "Starting Balance".
In the second detail section place your normal fields.
In the section expert use a formula to suppress the first detail section: {table.date} <> {?date parameter}
In the section expert use a formula to suppress the second detail section: {table.date} < {?date parameter}
Hope that helps.

Conditional group SUM in Crystal Reports

I've been doing some accounting reports and have been summing up my different currencies using a formula
IE
CanadianCommissionFormula
if {myData;1.CurrencyType} = "CDN" then
{myData;1.Commission}
else
0
CanadianCommissionSum
SUM({#CanadianCommissionFormula})
Then I'd just display the CanadianCommissionSum at the bottom of the report and things were great.
I've just come across the requirement to do this, but grouped by Sales Rep. I tried using my previous formula, but this sums for the whole report. Is there an easy way to sum like this, based on which group it's in?
You probably figured this out a year ago, but just in case, try this:
Change your CanadianCommissionSum formula to
SUM({#CanadianCommissionFormula},{SalesRep})
Put this formula in your SalesRep's Group Footer section.
This should now display properly.
Create a group based on the sales rep in the Crystal Report, and place the:
SUM({#CanadianCommissionFormula})
...in the footer of the group.
I would assume that rexem's suggestion should work but since you said it gives you a total all of the sales reps you could change the sum to running total. Before doing this I'd double check that you have your field in the correct footer section though.
To do the running total, group by Sales Rep, and then set up your running total to evaluate on every record and reset on the change of the group. Then you can put this running total in the group footer and it will show subtotals.
Hope this helps.