Jump to content

Grand Total Problem


This topic is 8629 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi--

I created a layout which contains a header, a trailing sub-summary, and a trailing Grand Summary. In the file, I have a series of items ordered by the client. Each item is assigned to a particular Category. The purpose of the layout is to show the client the Totals for each Category, and then a Grand Total. As well, the client needs the Totals for each Category to be Rounded. So I created the following fields:

Item Total: a calculation field which is the total for each item.

Total Amount: Summary = Total of Item Total

Total Amount Calc: Calculation = Round(GetSummary(Total Amount, Category), -2)

I Then created the trailing sub-summary when sorted by Category and placed both the Category and Total Amount Calc fields within the sub-summary part.

This successfully rounds out the Totals in each Category.

However, I have not been able to successfully create a Grand Total field which totals the amounts given by the Total Amount Calc field to be placed in the trailing Grand Summary part. Does anyone know of a way to do this?

Thank you!

Best Regards,

Jeffrey Ellis

------------------

--

Jeffrey Ellis

Groundlevel Software

[email protected]

Link to comment
Share on other sites

Place your Total Amount field in the Grand Summary part. That field can do double-duty, showing sub-totals when in a sub-summary part and grand totals when in a grand summary part.

Chuck

Link to comment
Share on other sites

Hi, Chuck--

Yes, I tried that. Unfortunately, if you wre to look at another layout in list mode you would see:

Item Category Item Total Total Amount Calc

Filter Equipment 457.00 1400.00

Heater Equipment 300.00 1400.00

And so on. So the Total Amount Calc field, or a summary of that field would give you not the total that you see in preview mode, but the complete total of Total Amount Calc in ALL records...being much more than the actual amounts.

Best Regards,

Jeffrey

------------------

--

Jeffrey Ellis

Groundlevel Software

[email protected]

Link to comment
Share on other sites

quote:

Originally posted by rlinsurf:

Total Amount: Summary = Total of Item Total

Total Amount Calc: Calculation = Round(GetSummary(Total Amount, Category), -2)

I Then created the trailing sub-summary when sorted by Category and placed both the Category and Total Amount Calc fields within the sub-summary part.

This successfully rounds out the Totals in each Category.

However, I have not been able to successfully create a Grand Total field which totals the amounts given by the Total Amount Calc field to be placed in the trailing Grand Summary

Your "Total Amount Calc" field will NEVER give you a Grand Summary. The GetSummary function should really be called GetSubSummary because it requires a break field as a parameter and that explicitly prevent it from calcing to a grand summary.

Use normal summary fields in your SubSummary and Grand Summary parts. Save the GetSummary calculations for use in other parts, or when you are not displaying the summary parts. This is what the function was designed for.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

Hi, All--

I just wanted to thank you for all your fine suggestions. I also wanted to pass on thsi very simple solution sent by Paul haskell which solves this problem beautifully:

<<All you need, if I understand your problem, is the Total Amount field. Place

the field in both the sub-summary and grand total part. Sort your database

by category and print or preview.

You can round the numbers with number formatting in the layout, or round the

calculation for item total (preferably the latter).

Bye.

-=-=-=-=-=-=-=-

Paul Haskell

Ram Design

-=-=-=-=-=-=-=->>

------------------

--

Jeffrey Ellis

Groundlevel Software

[email protected]

Link to comment
Share on other sites

You need a second Total Amount field just for the Grand Summary part. The calculation for this field would be:

Total Amount Calc: Calculation = Round(GetSummary(Total Amount, Total Amount), -2)

The Total Amount field replaces the break field to give you the GetSummary result over the entire found set. -bd

Link to comment
Share on other sites

This topic is 8629 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.