Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2005

Tip: Looking for answers? Try searching our database.

set report fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nick I - 26 Oct 2005 17:25 GMT
I have a report from a crosstab in which I have month's accross the top, and
percentages by employee as rows. Here is the SQL of the query:

TRANSFORM Avg([PRODUCTIVE_TIME]/[STAFF_TIME]) AS Expr1
SELECT MastrPhoneStatsTbl.USERID, MastrPhoneStatsTbl.LASTNAME,
MastrPhoneStatsTbl.FIRSTNAME, MastrPhoneStatsTbl.TEAM_NAME
FROM MastrPhoneStatsTbl
WHERE (((MastrPhoneStatsTbl.TEAM_NAME) Like "CC TEAM*"))
GROUP BY MastrPhoneStatsTbl.USERID, MastrPhoneStatsTbl.LASTNAME,
MastrPhoneStatsTbl.FIRSTNAME, MastrPhoneStatsTbl.TEAM_NAME
PIVOT Month(MastrPhoneStatsTbl!DATE);

I am pivoting by Month, so the data looks like this

                    1        2         3           4
John Smith    90%   80%   90%       91%

My problem is I want all of the months of the year to show up in the report
even if there is no data for them yet (so I don't have to keep manually
adding fields in the report). Is there a way to do this?

Thanks!
Allen Browne - 26 Oct 2005 17:34 GMT
Open your crosstab query in design view.
Open the Properties box (View menu).
Enter all the valid values beside the Column Headings property:
       1, 2, 3, ... 12

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have a report from a crosstab in which I have month's accross the top,
>and
[quoted text clipped - 20 lines]
>
> Thanks!
Nick I - 26 Oct 2005 19:21 GMT
Wow, that was easy. Thanks!!!

> Open your crosstab query in design view.
> Open the Properties box (View menu).
[quoted text clipped - 25 lines]
> >
> > Thanks!
John Spencer - 26 Oct 2005 17:35 GMT
Try adding the known column values to the query

TRANSFORM Avg([PRODUCTIVE_TIME]/[STAFF_TIME]) AS Expr1
SELECT MastrPhoneStatsTbl.USERID, MastrPhoneStatsTbl.LASTNAME,
MastrPhoneStatsTbl.FIRSTNAME, MastrPhoneStatsTbl.TEAM_NAME
FROM MastrPhoneStatsTbl
WHERE (((MastrPhoneStatsTbl.TEAM_NAME) Like "CC TEAM*"))
GROUP BY MastrPhoneStatsTbl.USERID, MastrPhoneStatsTbl.LASTNAME,
MastrPhoneStatsTbl.FIRSTNAME, MastrPhoneStatsTbl.TEAM_NAME
PIVOT Month(MastrPhoneStatsTbl!DATE) IN (1,2,3,4,5,6,7,8,9,10,11,12)

>I have a report from a crosstab in which I have month's accross the top,
>and
[quoted text clipped - 20 lines]
>
> Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.