If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Sums in report
Hi
I'm no expert with reports : I have a query selecting groups of items - having their own itemID so to speak - I have managed to list these in a way so that each group of Items is listed in its own "table" in the report. [Name] - [Description]- [Price] Item1 socks 25 Item1 trousers 90 Item1 handkerchiefs 34 Sum [Name] - [Description]- [Price] Item2 coffins 334 Item2 tires 626 Sum ....... [Total Sum] I just want to sum up each of these distinct tables - the price - and put it in below each of them. I've only managed to sum up the price row of the entire query - with the DSUM-routine. I recon it should be possible to take only the Item1-items and sum them up, putting it in below the first table - and then the Item2 and so forth. Is there a really easy way to do this? Or would I need to make a recordset of all the items - and put it into the [criteria]-argument in the DSum-routine? I know I could make queries to sum up each of them - but then I would have to make a new query for each new type of ItemID the user would want to add to the database - if you know what I mean. I want it to be dynamic. I would want something like =DSum("[price]";"myQuery";"Where [nameInQuery] = [nameInReport]) Hope someone is able to help regards Vegard |
#2
|
|||
|
|||
Sums in report
DSum() is very rarely required in reports. To sum Price in a group footer,
use and expression like: =Sum([Price]) or maybe =Sum([Price] * [Quantity]) -- Duane Hookom MS Access MVP -- "Veggis" wrote in message ups.com... Hi I'm no expert with reports : I have a query selecting groups of items - having their own itemID so to speak - I have managed to list these in a way so that each group of Items is listed in its own "table" in the report. [Name] - [Description]- [Price] Item1 socks 25 Item1 trousers 90 Item1 handkerchiefs 34 Sum [Name] - [Description]- [Price] Item2 coffins 334 Item2 tires 626 Sum ...... [Total Sum] I just want to sum up each of these distinct tables - the price - and put it in below each of them. I've only managed to sum up the price row of the entire query - with the DSUM-routine. I recon it should be possible to take only the Item1-items and sum them up, putting it in below the first table - and then the Item2 and so forth. Is there a really easy way to do this? Or would I need to make a recordset of all the items - and put it into the [criteria]-argument in the DSum-routine? I know I could make queries to sum up each of them - but then I would have to make a new query for each new type of ItemID the user would want to add to the database - if you know what I mean. I want it to be dynamic. I would want something like =DSum("[price]";"myQuery";"Where [nameInQuery] = [nameInReport]) Hope someone is able to help regards Vegard |
#3
|
|||
|
|||
Sums in report
Thanks ! I'lll try that.
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Printing Reports Access 2002 Pleas Advise | Dermot | Database Design | 12 | October 5th, 2005 11:23 AM |
To Sharkbyte and all: Calculate a total values in group level | Ally | General Discussion | 6 | June 13th, 2005 08:16 PM |
Grouping and Sums issue (do it w/ Query or Report?) | rgrantz | Setting Up & Running Reports | 1 | December 13th, 2004 02:48 AM |
Save Report With CreateReport Coding Issue | Jeff Conrad | Setting Up & Running Reports | 8 | July 12th, 2004 08:39 AM |
Label | SRIT | General Discussion | 2 | June 22nd, 2004 09:42 PM |