View Single Post
  #12  
Old June 20th, 2009, 09:37 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default getting a report from a crosstab query

The previous link explained how to display the actual dates as column
headings in your report. You use text boxes with control sources like:
=DateAdd("d",-6,Forms!frmDate!txtEndDate)
=DateAdd("d",-5,Forms!frmDate!txtEndDate)
=DateAdd("d",-4,Forms!frmDate!txtEndDate)
=DateAdd("d",-3,Forms!frmDate!txtEndDate)
=DateAdd("d",-2,Forms!frmDate!txtEndDate)
=DateAdd("d",-1,Forms!frmDate!txtEndDate)
=DateAdd("d",-0,Forms!frmDate!txtEndDate)

--
Duane Hookom
Microsoft Access MVP


"abourg8646 via AccessMonster.com" wrote:

that worked great but is there any way to display the date instead of DO,D1,
D2

Duane Hookom wrote:
Let's assume you want 7 days of the schedule ending on Forms!frmDate!txtEndDate

PARAMETERS Forms!frmDate!txtEndDate DateTime;
TRANSFORM First([Employee Query].Schedule) AS FirstOfSchedule
SELECT [Employee Name], Shift, Post, [Time]
FROM [Employee Query]
GROUP BY [Employee Name], Shift, Post, [Time]
PIVOT "D" & DateDiff("d",[Date],Forms!frmDate!txtEndDate)
IN ("D6","D5","D4","D3","D2","D1","D0") ;

cam you give me an example other then the on on Tek-tips. That one looks like
greek to me

[quoted text clipped - 6 lines]
GROUP BY [Employee Name], Shift, Post, [Time]
PIVOT [Employee Query].[Date];


--
Arthur Bourgeois Jr

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200906/1