Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

creating report from table

Posted on 2011-09-28
2
Medium Priority
?
223 Views
Last Modified: 2012-05-12
Hello,
have attached a sample db.
if you look at the table [tblFinal]
I need to create a report from that table- that displays like rptTest-but that works-
I created a crosstab query to create this report- but not sure this is how to do this-
in rptTest- i have a total field that is empty
i need a total field column to total all the weeks totals for each record.
and am trying to capture 1 week of data in report-
thankyou

db1.mdb
0
Comment
Question by:davetough
2 Comments
 
LVL 5

Accepted Solution

by:
Khalid Mehmood Awan earned 1000 total points
ID: 36776230
Try this query...


SELECT  name,  round( sum(totalhours) , 2)
FROM tblFinal Group by  name


You can use this query to create a report.
For testing this query Goto Create then Query Design then add table then right click on query name (small tab) and goto SQL view.
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 1000 total points
ID: 36812743
The issue with Crosstab "Reports" is that they hardcode the column headings

This means that if you run the report and 8/21/2011 is not in the dataset, the report will fail.
The same issuse arises when you have a new date, since it is not in the original report, it will fail.
See here for more info:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_24577123.html

You can create a "Dynamic" Crosstab report though...
http://support.microsoft.com/kb/328320
...But this is way too complex IMHO.

It might just be best to leave it as a crosstab query.

Finally an alternative may be to do this in a Pivot table.

JeffCoachman
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

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 …
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…
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 …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

885 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