?
Solved

Easy Method to convert from row to column format

Posted on 2014-01-26
3
Medium Priority
?
419 Views
Last Modified: 2014-03-03
I have a table with the following structure
  ProductID / ProductionDate / NumberProduced
  888               12/15/2013           25
  889               12/15/2013           17
  890               12/15/2013           19

  888               12/16/2013           12
  889               12/16/2013           30
 
  888               12/17/2013           75
  890               12/17/2013           50

I need to print a report that converts this from a row format to a columnar format
                      First          Second     Third
  Product      Date          Date          Date               Total
                     12/15/13   12/16/13  12/17/13
  888             25              12              75                   sum(888)
  889             17              30                                     sum(889)
  890             19                                50                   sum(890)
                     sum(15)     sum(16)    sum(17)         Total(sum)

The dates will be variable from 1-31 days (ability to run for whole month)
I had thought of  doing the following
  Create a query (will be modified by code for days 1-31). Query will place data in a work table with columns labeled from 1-31 (example column names: Day01Production, Day02Production, etc)
  Then my report or form will access the values in these fields to print or display.
  There are a couple of other fields that will need to be presented also. I just kept it simple
  Can this be done with a pivot table? I have worked with them in Excel. Not much experience with pivot and Access.
0
Comment
Question by:rodneygray
[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
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 total points
ID: 39810878
They're known as Crosstabs in Access. Essentially you create a Crosstab query, and then build a report using that Crosstab.

Here's an Office tutorial that might help:

http://office.microsoft.com/en-us/access-help/make-summary-data-easier-to-read-by-using-a-crosstab-query-HA010229577.aspx
0
 
LVL 10

Assisted Solution

by:Luke Chung
Luke Chung earned 1000 total points
ID: 39812006
Here's an example of Creating an Annual 12 Month Summary Report without VBA Code by Creatively Using a Microsoft Access Crosstab Query
http://www.fmsinc.com/MicrosoftAccess/query/crosstab-report/index.html

It's designed to handle any 12 month period. Could be adapted to handle days vs. months. A free sample database is included that you can download. Hope this helps.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39813837
Previous comments looks fine.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

741 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