Report combining data from 3 tables with a crosstab?

Ok, so, I'm self-taught in Access so sometimes efficient design withmore complex databases evades me.  I've spent a while searching thegroups and trying to apply different situations to this one, but Istill haven't found a solution.  I did previously ask a questionregarding the first two tables, but of course once I was able to applya solution to that, the person I'm doing this for wants something morecomplex.  I tried to build on what I did, but all my attempts havegiven unexpected results.  I'm missing something.Anyway, I have 3 tables (from a database I did not create):tblManagerManagerID (primary)ManagerDirectortblEmployeesEmployeeID (primary)ManagerID (foreign from tblManager)Status (this field has four options, A,B,C,D)tblCostsCostIDEmployeeID(foreign from tblEmployees)CostI need to create a report that looks like this:Manager         Director          A       B       C      D     CostJohn                Sally              1       0       0       2$100.00Jane                Bob               0       1       0       1$50.00                          Totals:        1       1       03       $150.00So, I know a crosstab query would need to be created to get the valuesfrom Status as a column header.   I was able to do that.  I also knowhow to create a query so that it groups by manager and director andsums the cost.  What I can't do, is combine the two and create areport that gives expected results.Any help is appreciated.
0
Nikki
3/29/2007 3:52:26 PM
access 16762 articles. 2 followers. Follow

1 Replies
844 Views

Similar Articles

[PageSpeed] 45

Yes!!  That's it!  Thanks so much!

On Mar 29, 3:41 pm, "Al Campagna" <alcampagna@msnewsgroups> wrote:
> Nikki,
>    Try this simpler method... since there are only 4 possible values for Status.  Just a
> normal Totals query will do it (no Crosstab)
>    Break ou the 4 values manually in the query behind the report, by creating 4 calculated
> "bound" controls
> CountA : IIf(Status = "A", 1, 0)
> CountB : IIf(Status = "B", 1, 0), etc....  for all A,B,C,D   Sum on those fields, by
> Director, right in th query.
> Then, on the report...
>
> Manager Group --------
>     [Manager]
> Detail------------
>     [Director]     [CountA]   ....etc................ [Cost]
> Manager Footer------------
>                     =Sum(CountB)                   =Sum(Cost)
>
> --
> hth
> Al Campagna . Candia Computer Consulting . Candia, NH USA
> Microsoft Access MVPhttp://home.comcast.net/~cccsolutions
>
> "Find a job that you love, and you'll never work a day in your life."
>
> "Nikki" <nicolemis...@gmail.com> wrote in message
>
> news:1175192464.839504.277300@p77g2000hsh.googlegroups.com...
>
>
>
> > Sorry for not explaining well.
>
> > The A, B, C, D are values in a drop down for the Status field.  The
> > numbers would be counts of how many of each status that manager and
> > director have.
>
> > Let me know if I'm still missing some details.
>
> > On Mar 29, 12:59 pm, "Al Campagna" <alcampagna@msnewsgroups> wrote:
> >> Nikki,
> >>    You wrote...> Status (this field has four options, A,B,C,D)
>
> >> Are those four separate fields with a value like 0 or 1 or 2 in each one?
>
> >> Or, or one field that can contain an "A" or "B" ... etc
>
> >> In other words, where do the values 0,1,2 come from?
>
> >> > Manager         Director          A       B       C      D     Cost
> >> > John                Sally              1       0       0       2      100.00
>
> >> Please describe in detail...
> >> --
> >> hth
> >> Al Campagna . Candia Computer Consulting . Candia, NH USA
> >> Microsoft Access MVPhttp://home.comcast.net/~cccsolutions
>
> >> "Find a job that you love, and you'll never work a day in your life."
>
> >> "Nikki" <nicolemis...@gmail.com> wrote in message
>
> >>news:1175183546.893071.94020@y80g2000hsf.googlegroups.com...
> >> <snip>
>
> >> > Anyway, I have 3 tables (from a database I did not create):
>
> >> > tblManager
> >> > ManagerID (primary)
> >> > Manager
> >> > Director
>
> >> > tblEmployees
> >> > EmployeeID (primary)
> >> > ManagerID (foreign from tblManager)
> >> > Status (this field has four options, A,B,C,D)
>
> >> > tblCosts
> >> > CostID
> >> > EmployeeID(foreign from tblEmployees)
> >> > Cost
>
> >> > I need to create a report that looks like this:
> >> > Manager         Director          A       B       C      D     Cost
> >> > John                Sally              1       0       0       2
> >> > $100.00
> >> > Jane                Bob               0       1       0       1
> >> > $50.00
> >> >                          Totals:        1       1       0
> >> > 3       $150.00
>
> >> > So, I know a crosstab query would need to be created to get the values
> >> > from Status as a column header.   I was able to do that.  I also know
> >> > how to create a query so that it groups by manager and director and
> >> > sums the cost.  What I can't do, is combine the two and create a
> >> > report that gives expected results.
>
> >> > Any help is appreciated.- Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


0
Nikki
3/30/2007 7:39:51 PM
Reply:

Similar Artilces:

Need more Reports
GP does not provide detailed reports itself. reports such as sales by customer, best selling items, inventory valuation and so... Also the reports that it provides are not in good design and format (not useful). Is there any report package from third party that can be purchased or there is any other solution to get in depth reports and analysis? Sure Since Great Plains cannot possibly be all things to all people, get to know the layout of the Great Plains database and where all of the data is stored. Then roll your own reports using the native Report Writer, SQL Reporting Services, Cryst...

Customized CRM Report with Reporting Services
I have written a customized report in Reporting Services using SQL Server 2005. I need to use a date as one of my query parameters. I am using three parameters, one being UserName, 2) Customer, and 3) Date. I want the report to filter on the username, then customer, then date in order to provide a specific report for 1 customer and 1 date only. I changed the select for the date to: Select Distinct Convert (varchar, new_tripdate,101) in order to cut the time out of view. When I run the report, I first select the username, then I am provided with a list of customers for that user, but the...

Sales Report #3
Hi All Is there any sales report to show detailes like Store-total Sales-Cash Sales-Credit-Span-customer- Change Item/customer -Discount. Cash Sales-Credit-Span: is tender type. Change Item/customer : like one customer change item and total amount for backing item 200$ (e.g). Is there any one he have report like that? Thanks for help M. Own ...

conditional formatting for more than 3 conditions
Hi, Is there any solution for the following : I have six type of conditions, if any condition is met, cell colour should be yellow. For example, if cell value is any one of the following : DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 All cells containing above should show yellow colour in the file. Please help. Thanks, Jai formula is =or(c1="data1",c1="data2",etc) or =or(c1={"data1","data2"}) -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett@gmail.com "Jai" <Jai@discussions.microsoft.com> wrote i...

W-2 Tax Reporting Figures Not Accurate
I use Money to monitor all of my financial situations. This year, I decided to see how it did with supplying tax information. "Poorly" is the answer. I would expect the 'Tax Line Manager / W-2 / Your salary' and the 'Tax Software Report / W-2 / Your salary' to show a figure that matches my 'W-2 / Box 1' statement information. They do not. The reason is that the 'W-2 / Box 1' statement figure has pre-tax retirement contributions subtracted from the wages. When I enter my paycheck information into Money, I categorize retirement contributions no...

Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types"
This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C75210.F27A6390 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have installed Excel 2007, and I can't create any chart, the message=20 "Some chart types cannot be combined with other chart types. Select a = different chart types" keeps poping up, are there any settings that i have miss out? thank you regards kh ------=_NextPart_000_000E_01C75210.F27A6390 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quo...

Blank networth reports
Hi, Whenever I run the net worth reports, I get the hourglass for a second or two, then loading but it never renders. Other reports (Transactions, loans, cap gains, etc.) run fine. I converted from Quicken. In microsoft.public.money, <anonymous@discussions.microsoft.com> wrote: >Hi, Whenever I run the net worth reports, I get the >hourglass for a second or two, then loading but it never >renders. Other reports (Transactions, loans, cap gains, >etc.) run fine. Perhaps customize the report to a different time frame, and then reset the report? Tried all dates. >...

Data within a cell
If names are in cells as "last name, first name, middle initial" can a macro be run to change the order to "first name, middle initial, last name"? A formula will do Assuming you have spaces between commas and names, =MID(A2,FIND(",",A2)+2,FIND(",",A2,FIND(",",A2)))&RIGHT(A2,FIND(",",A2,FIND(",",A2)))&", "&LEFT(A2,FIND(",",A2)-1) Then just copy down. If you want this more permanent, copy the cells with formulas, right click, paste special. -- Best Regards, Luke M *Remember to click &q...

eXtender SOP Reports
Hello. We are using a modified version of the eXtender SOP Blank Packing Slip Form. It was modified years ago by an outside consultant. For the first time, we need to use the "Print Customer Item" option, and notice this does not work on our modified report (it works fine on the non-modified version of the same eXtender report). I am being a little lazy here and hoping someone can tell me how to turn this "feature" off or on in modifier :) Thank you, in advance. M. ...

Data Validation #11
Is it possible to have a data validation list to control the out come of another column? For example: Columns A B 1 1 name1 2 2 name2 3 3 name3 4 4 name4 5 5 name5 6 6 name6 with the above example, what I am asking is it possible to select the number in column A and have it automatically place in column B the name that belongs to that number? I hope this is clear. Thank You, Chris -- zero635 ------------------------------------------------------------------------ zero635's Profile: http://www.excelforum...

Reports are not being shown MM07
Hi, pals! When I try to see the Monthly Reports (any month) in MM07, I get a popup saying: ------------------------------------------------------------- "File Download Do you want to open or save this file? Name: moneygen.htm Type: Firefox Document, 1,03KB From: C:\Users\yadayada [open] [Save] [Cancel] -------------------------------------------------------------- If I click OPEN, it opens the report in Firefox (!), while the Money windows says: "Navigation to the webpage was canceled. What you can try: - Retype the address" Anyone has seen it before? How to make Money o...

#Name? prints on a report when date shows up on preview
Access 2003 SP 2 Windows XP SP 2 I have created a report (rptFuelmanByForeman) that is based on a Query (qryFuelmanByForeman). I have created a form to select (or enter) a date range that then filters the report based on that date range and populates transactions between those dates. I have created two text boxes on the report that display the start date (txtStartDT) and end date (txtEndDT) entered in the date select form. The control source on the date boxes on the report is "=Forms.frmFuelmanByForeman.txtEndDate" & "...txtStartDate". In Preview mode, the dates d...

In a report, is there any way a record will change color if it's different from the previous record
Hi, I am working on a project where I need to color code the report so it will distinguish if the previous record is different from the current record. Because the record will have many similar record, so I am trying to group the record so it's easier to look. In a report, is there any way a record will change color if it's different from the previous record. Thanks for your help. richiecheng@gmail.com wrote: >Hi, I am working on a project where I need to color code the report so >it will distinguish if the previous record is different from the >current record. Because...

Excel XP Pivot Table
How do I convert Excel XP Pivot Table in Excel 2000 What problems are you having with the pivot table in Excel 2000? If it's too big, open it in Excel 2002, move some of the fields into the page area, then try to open in Excel 2000. bsantona wrote: > How do I convert Excel XP Pivot Table in Excel 2000 -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Saving Reports
Hi, Is there a simple way to save advanced reports for use on a monthly or weekly basis. I can produce a dynamic report but can't find a way to save this as a template so it can be run on a regular basis. Having to select all the criterea each time you want to run the report is a little annoying, I must be missing something here...? Thanks Nik Once you select all the required criteria for your search, you could click on the 'Save As' button to save the search results with some specific names. For other users to view this search result, go to the 'Saved Views' tab, ...

Launching Reports from the Submit Order Button in 4.0
My client has several retail locations and they are using CRM in conjunction with their POS system. Therefore, CRM Orders has received a lot of customization to make it as slim, trim, and "Mouse-Click-Free" as possible. In the spirit of reducing even more mouse clicks, they have asked if we could launch a custom report (Basically the Order Report, renamed "Order Receipt") when the "Submit Order" button (re-named by Scribe's CRM to GP Integration) is clicked. The Receipt would render and then be printed for the cusomter. The report is context sensitive...

Insert row, table to table
Hi, As I cannot use INSERT INTO with values specified to WHERE. I have created an interim temporary table where the record contains two text strings.Now I want to be able to take those text strings and append to the correct table where the record is set by an ID number. First_Name = Fred Last_Name = Jones Its a new contact so it is too be added to a customer with an ID = 1375 Now I can't use the following sql statement strsql = "INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) " _ & " VALUES (""" & strFirst & "&...

To view, specifically Units in one report
I have report with a Reporting Tree (9 Unit), when the report is generated, I select only two unit, but I need that the drill down show one report with these unit only If you want multiple units in a single report you will need to use the column layout with unit restrictions on multiple columns Leslie "Pedro" wrote: > I have report with a Reporting Tree (9 Unit), when the report is generated, I > select only two unit, but I need that the drill down show one report with > these unit only Leslie; Each Column layout have the unit restrictions Thanks :-) "Lesl...

small business reports ...
Dear all Hope this is the right group. Can Mone 2002 create a Trial Balance report? Is there a list of reports availabe in 2006 (Small Business edition) that is accessible somewhere, as I have not been able to locate any such list, and is a Trial Balance one of them. While I am happy using Money and have been for some time, when it comes to reviewing my files the person doing so is a certified accountant and Quick Books user and would like me to convert, I have continued to resist however he continues to press for these accounting reports. Can Money 2002 and or 2006 Small Business ...

how to split data into columns and arrange the resulting data
I have data in cells A2, A3 and A4 as below: 1, 2, 4, 5, 7, 8 1, 2, 3, 4 2, 3, 4 I want to split into columns (which I did using Data > Text to Columns option). But I also want the data to "automatically" fall under appropriate heading (1, 2, 3, 4, 5, 6, 7, 8) which are in respecive cells A1:H1. Thank you in advance How about an alternative: With your data in A2:Axx, put this formula in B2: =","&SUBSTITUTE(A2," ","")&"," Then B2 will look like: ,1,2,4,5,7,8, Then put this in C2 and drag across as far as you need. =IF...

Help with getting data from a worksheet
Hi, I have 2 excel sheets username sheet --------------- it contains just usernames in one column main sheet ----------- i want to chose from a listbox, combobox, or whatever one or mor usernames from the username sheet. How can i do that?? another question: I want to be sure that every username has one instance only can you help be? BogN -- Bog ----------------------------------------------------------------------- BogN's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3497 View this thread: http://www.excelforum.com/showthread.php?threadid=54717 BogN w...

Plugging data from non-open Workbooks
Hello, I have a number of databases stored on Excel Workbooks and I want to create another workbook to get information from those databases. I will make reference to a number of the databases with the following: COUNTIF("worksheet name followed by filename", "=blablabla") but I don't want to open them as they are like each 5Mb in size and I have to refer like 10 of them on a worksheet. I've tried opening one of the database and then reference it by point-and-clicking and then closing it. The formula works fine when the file is open. When it's closed and I tr...

Reporting Error ==> very urgent
Hi All, We have installed CRM 4.0 for our organization. We ahd our CRM and SQL on different servers and decided to use Mcirosoft Outlook client. The problem is when we try to generate reports we are unable to get any reports. We always getting an error stating "REPORTING ERROR REPORT CANT BE DISPLAYED" it also stats that to contact Microsoft for details. We are struck with this error for 3 days and the issue is bulging in alarming propositions. Kindly advice me to resolve and overcome this issue. Thanks a lot in advance. elays - ...

Report writer
Hello, I am trying to add the transaction distribution details onto a copy of the PM Blank Document in Report Writer in GP 9. Would you pls advise as I can add the fields containing the data but the data is not appearing on the report. Thanks your comments are appreciated. -- chj@jup Once you were done modifying the report, did you give access to the mdoified report under Security? -- Lyle U chj wrote: > Hello, > > I am trying to add the transaction distribution details onto a copy > of the PM Blank Document in Report Writer in GP 9. Would you pls > advise as I c...

Windows XP Professional SP 3 With RMS POS freezing up
We have 2 registers they are: Register #1:Windows XP Professional SP 3RAM: 2GBRMS: v2.0.0128 Register #2: Windows XP Professional SP 3RAM: 2GBRMS: v2.0.0128 we would have errors: (Database connection loast, application will close error#2147467259) 4-5 times a day when using POS I was advised to do the following: -Checked SO Admin DB configuration for Register #1 (Main server)Server Name: (local)Database Name: CardinalDB-Changed Surface Area Configuration for Services and Connections to Local connections only on the server's Microsoft SQL Server 2005 Configuration Tools-Made sure that th...