rlinsurf Posted December 8, 2000 Posted December 8, 2000 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]
Chuck Posted December 8, 2000 Posted December 8, 2000 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
rlinsurf Posted December 8, 2000 Author Posted December 8, 2000 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]
Kurt Knippel Posted December 8, 2000 Posted December 8, 2000 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 =-=-=-=-=-=-=-=-=-=-=-=-=
rlinsurf Posted December 8, 2000 Author Posted December 8, 2000 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]
rlinsurf Posted December 8, 2000 Author Posted December 8, 2000 Sorry, I forgot to say, I used the first suggestion of simply formatting the Total Amount Summary Field, using "-2" under Fixed number of decimal places for both the sub-summary part and the trailing grand summary. This solved the problem. ------------------ -- Jeffrey Ellis Groundlevel Software [email protected]
LiveOak Posted December 9, 2000 Posted December 9, 2000 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
rlinsurf Posted December 12, 2000 Author Posted December 12, 2000 Thanks, bd! Jeffrey ------------------ -- Jeffrey Ellis Groundlevel Software [email protected]
Recommended Posts
This topic is 9000 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 accountSign in
Already have an account? Sign in here.
Sign In Now