473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MS Access - Report & Querry Building

I have to prepare Data Analysis Report. The data is of 12 months. I want Report in a Columnar Format and comparative type i.e Column should be Jan to Dec. and in a single row, amount should be displayed under each month column. The field in Table is only one. How to achieve this things. Pl. help me.

Format of Report is as under:
Receipts from Patients
----------------------------------
Paitent...Jan..Feb...Mar..Apr..May..June..Jul..Aug ..Sept..Oct.Nov..Dec..Total
-----------
1. xyz......5......10....7.....9.....6......12......1 0.....0....5......9......10.....11.... 94


In the table, there is only one field for Receipts from Patients. I want to bifurcate Receipts on each month basis and display in single row only. Also there is not certain that everytime there will be 12 months. It may be one month, two months etc. so column heading be displayed based on no. of months in the data.

I need the help immediately. Pl. help me. I am a novice in this field. Pl. explain elaborately, if possible.
Mar 9 '07 #1
8 1541
NeoPa
32,556 Expert Mod 16PB
Please post the MetaData of your tables. An example follows which you can use in your reply for proper formatting.


Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; AutoNumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
Mar 10 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
This can be done using a crosstab query.

For example ...
Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Count(Receipts) As NumReceipts
  2. SELECT PatientName, Count(Receipts) As TotalReceipts
  3. FROM tblPatients
  4. GROUP BY PatientName
  5. PIVOT Format(ReceiptDate, "mmm") 
  6. IN ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  7.  
Mary
Mar 10 '07 #3
NeoPa
32,556 Expert Mod 16PB
It can also be done without a CrossTab with a bunch of IIf()s, but you'd need to link it (LEFT JOIN) with a small table including all the months.
I suppose the IN() bit ensures that all months are included in the results?
Mar 10 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
It can also be done without a CrossTab with a bunch of IIf()s, but you'd need to link it (LEFT JOIN) with a small table including all the months.
I suppose the IN() bit ensures that all months are included in the results?
YUP!

That's 2for, I'm on a roll.
Mar 10 '07 #5
NeoPa
32,556 Expert Mod 16PB
The saddest bit is - I can hear the smugness in your laugh!
Mar 11 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
The saddest bit is - I can hear the smugness in your laugh!
Stop knocking me. I'm feeling all powerful. Sure it won't last though, Sigh!
Mar 11 '07 #7
NeoPa
32,556 Expert Mod 16PB
The CrossTab answer is grand.
I wasn't knocking to be sure - Just wished I used them more.
Mar 11 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
The CrossTab answer is grand.
I wasn't knocking to be sure - Just wished I used them more.
They are very powerful for this kind of thing.
Mar 11 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Thierry Schmitt | last post by:
Hello all, I m quite sure that s a common problem and even that the answer to it has been given somewhere, forgive my lack of perspicacity but here is my problem: In the vba code of a button on...
11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
17
by: rdemyan | last post by:
My app creates a building report. My users have requested that I provide functionality to e-mail these "building reports" to building managers once a month. So assuming that I have the...
5
by: jimc52 | last post by:
Hello Everyone: I am hoping one of the gurus here will give me some help. I have designed a form with some check boxes. I put the checkboxes there on the form so later I could use them as flags on...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
1
by: dbull4 | last post by:
HI I am trying to write a count querry where we can count the ratings on a school report. IE How many students in a year level got A's, B's C's etc. I have a rating table and use combo boxes to enter...
1
by: Webstorm | last post by:
Hi, I hope someone can help me sort this out a bit, Im completely lost. Here is the page I am working on: http://www.knzbusinessbrokers.com/default.asp I have 3 search critera that I need to...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.