Solved

How format report from query results

Posted on 2014-01-16
3
407 Views
Last Modified: 2014-01-18
If you look at the sample screen shot I attached...

I am trying to figure out how to develop a report using the data.  But the report has to be formatted like:  (the field listing month = the name of the month)

                                                Jan     Feb     Mar     Apr      May     etc.-------

CountofCountOfID
SumOfListingPending
SumOfListingSold
etc. (These will be labels
on the report)

In other words, the months have to be displayed horizontally.  How can I do this?

--Steve
queryscreenshot.jpg
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 39786318
You need a CrossTab report. Essentially you first create a Crosstab query, and then create a report based on that query.

See this MSFT article for more information: http://office.microsoft.com/en-us/access-help/create-a-crosstab-report-HP005187407.aspx

Be sure to make your query as complete as possible and be careful with column naming, since that can cause quite a bit of grief later on. See this MSFT blog posting for more info:

http://blogs.office.com/b/microsoft-access/archive/2012/05/23/using-crosstab-queries-in-reports.aspx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39789696
Another workaround would be to simply insert the Crosstab query into a report as a sub report.

I am no expert on crosstab queries, but I am not sure getting multiple summaries on the bottom of he query/report will be easy.

Also note that your source data must be somehow filtered for a year, ...else each month will contain the data for all years (For example; the January column will contain data from 2012, 2013, 2014, ...etc)
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 39789830
I am sorry, I did not realize that one of Scott's posts included a link for inserting the crosstab query as a report...
:-(

But here is one more if you are feeling bold...

You could also build a report and include aggregate functions
It may look tedious, but once you get the first month done, all you need to do is copy all the summary textboxes for that month and increment the month value in the formula by 1
This may be an option if you want more control over how you format the report...
(I did this for a co-worker because they wanted to do things like conditional formatting ...etc, with the output (They also wanted sums of the summaries, so it really got complex...

The bottom line is that since a crosstab query "dynamically" creates the columns each time it is run, (based on the current data), you cannot "easily" create a Crosstab Report.
In a report, the columns are hardcoded.

What Scott posted are the standard ways to create true "crosstab" Reports
My suggestion here is another to get the same output, with a "simulated" crosstab. (it may run a bit slower than Scott's suggestions

..take from his what you like...
...and enjoy the weekend

JeffCoachman

Sample attached
Access-EEQ-28340433-Aggregate-Si.mdb
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question