cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports totals/subtotals

joe_mancini
Explorer
0 Kudos

I'm working on a client/matter detail report that totals up the billable hours and amounts by timekeeper, per client and within a data range. The data is grouped by client and then matter. The data for the date range entered will display all data for that period entered. I also need to display the hours/amounts for just the last month in the entered date range. For example, if I enter 10/1/2015 thru 1/31/2016, I need to see only the billed time and amounts for 1/1/2016 thru 1/31/2016. I can correctly display and sum up the time/amounts correctly for the entire date range.

For the last month, I can display the individual time/amounts for each client and matter number correctly, but I cannot figure out how to sum the values for the entire client when there is more than 1 matter for a client. I originally tried to display this data within the main report but with no success. I have the monthly data showing in a subreport but have not been able to calculate the totals for the monthly data. I've attached a screen grab of the data where you can see the bold Running Total field is calculating per matter and not per client. The running total is on the Client group. The running total is set to Evaluate on Change of Client Group, and I reset when the client is not equal to the previous client. Any ideas on what I am doing wrong?

The columns would correspond to the screen grab as:

Client Number          Client Name          Monthly Recorded Hours  Monthly Record Value     All Recorded Hours     Monthly Recorded Value

   Matter Number                    

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Joe,

Change the 'Evaluate' to 'For each Record'.

Change the reset to 'On Change of Group' > Client Group.

Place the Running Total on the Client Group Footer.

-Abhilash

joe_mancini
Explorer
0 Kudos

Hi Abhilash - I think I tried that before, but I just tried that again and the running total ends up summing up per matter number, and not per client number. In other words, I should be getting 1.20 for the client sum, but I'm getting 0.6 for each matter number. I placed the running total field on the 1st group, the client number.

Here's the running total setup which looks correct to me.

abhilash_kumar
Active Contributor
0 Kudos

Would you be able to send the .rpt file 'with saved data' to my e-mail (my e-mail is in my profile)?

-Abhilash

joe_mancini
Explorer
0 Kudos

I've replied to your email address.

abhilash_kumar
Active Contributor
0 Kudos

Hi Joe,

Here's what you need to do:

1) Inside the subreport, create a formula with this code and place it on the Group Footer:

shared numbervar hrs := hrs + {#Running Total Field You created};

'';

2) Back in the Main Report, create a formula with this code and place this on the Client Group:

shared numbervar hrs;

3) Create one last formula to reset the values and place this on the Group Header #1:

shared numbervar hrs := 0;

-Abhilash

joe_mancini
Explorer
0 Kudos

Works great! I had tried something similar to this but was not able to get it to work just right. This takes care of exactly what I needed. Thanks.

Joe

Answers (0)