Crystal Reports - Total Count - crystal-reports

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.

Related

Crystal reports - Can't filter on custom formula number field

Crystal reports don't let me use a custom count formula field to filter which transactions to show in a manager report.
I'm creating a Crystal report that team leaders are supposed to take out to see on how many occasions their employees have reported in sick. A record is only supposed to show if that person has reported in sick 6 or more times the last 12 months.
The report shows a record (a page) for each employee belonging to the managers organisational unit. Below the employee information is a subreport where I show the transactions from the salary/time system. Using select expert, I have filtered out the transactions that is supposed to show. I have then created a database field that count which day was 12 months back from today, and filtered so that only the transactions falling into this period shows.
My last problem is that I only want to show the record that has a minimum of 6 such transactions during the period. I created a formula field named #Antal ("amount" in Swedish) that simply counts the distinct number of dates in the "from"-date for the salary transactions I'm showing (since a change of law 2019-01-01 we needed to create a new transaction type, so some of the occasions after 2019 may have two transactions referring to one sick leave, thus I'm counting the first day of the period instead), DistinctCount ({P_LSTAT.P_SXXX06})
Now, the subreport has a new column with Antal (amount) that counts the amount of the desired salary transaction. I then try to use the selection formula to only show records where {#Antal} >= 6 but I get the following error:
This formula cannot be used because it must be evaluated later
Is there any other (better) way of doing this, or am I simply missing something?
For your selection based on {#Antal} >= 6 you need to use the group selection formula, not the record selection formula. Record selection is used to select records which meet the criteria before reading in the data. Group selection is used to filter out entire groups of records based on summarised values, after the records have been read in and the summaries calculated - which sounds like exactly what you need here.
The value of a Formula Field is out of scope when the Select Expert is evaluated.
There is no process for calculating the value of a Formula Field before it is printed within the section of the report it is placed. The Select Expert is evaluated prior to any section of the report being printed, so at this time all Formula Fields are effectively Nothing.

Grand total with each summation in crystall report

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+

Calculating totals from formulas that represent different groups

I have a Crystal Report that shows different groups(or departments) utilizing the groups in Crystal Reports. I then used some formulas to calculate Attached and Unattached assets in each group. Now I wish to show a total for the column of Attached and Unattached, what is the best and simplest way to do this?
Update
Okay I have been able to use a running total on #countattached that gets me close to what I need, the only problem is that it wants to add the last group total to the next group. The report is set up so the Employee (I.E. Jane Doe) and under that Employees name are Groups that, that Employee adds reports too such as Parks, Water, Streets , Etc. those Groups have a field across from them for Attached and Unattached with a total for both together at the end for each Group. I need a total for each Group under the column of attached and Unattached..
CrystalReport
Okay I finally figured it out if you have a series of columns that have sums for individual groups(parks,streets,water) under employees all you need to do to calculate the totals of those groups is right take the formula that has the sum for those groups, , such as (#countAttached). Then do a Running Total in the Running total dialog box, you can then set it to reset after each individual that those groups apply to then you have a those totals for that column. You just repeat this process for any other Columns you have.

Add a Calculated Row For Custom Subtotaling

I'm trying to perform custom subtotaling on sales data to give a total for US and Non-US sales offices. My worksheet looks like the table labeled "current" and I am trying to make it look like the table labeled "desired result"
When I tried to group the sales centers as US and Non US the pill (dimension) was greyed out. After googling through a bunch of threads I found that grouping was not supported for secondary data sources. Is there anyway to do a manual calculation in the table calculations to add a row or do custom subtotaling?
Add a column for the country (assuming that you have the country in your data)
[see my example I had states and zip codes]
Then go to analysis > totals > check on show grand total and on add all subtotals
Visit Calculations totals - Grand total turn on for more information.

SSRS 2008 R2 - Group toggle aggregates

I'm working with a dataset where employee utilization is calculated as (Time Billed to X/Standard Billable hours). As such, to get the total billable percentage for an employee, I can just sum up the percentages billed to each client. However, I also want to be able to see the percentage of time billed by department.
I've currently got my data in a matrix with row groups Department-->Employee-->Client with 1 column group of "time sheet ending date". When I toggle the visibility of the client row group based on the employee row group, I get the correct totals at the client and the employee level. However, when I toggle the visibility of the employee row group based on the department row group, the department row group has the wrong totals. For example, if Department A has employee B with 90% utilization and employee C with 95% utilization, the toggled total at the department level is 185%....However, I am expecting to see 92.5%....any ideas????
You might just need to tweak the expression used to get the department total. I am unsure what expression exactly you used, but it should be of the form:
SUM(epmployeePercentageColumn)/COUNT(employeePercentageColumn)
obviously replace the "employeePercentageColumn" with whatever field or variable or expression that represents each of the employee percentages that come under the particular department.
If your current expression isn't in that form, try and tweak it.
Hope it Helps.