Dynamic Xtab Reports

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Can someone point me to, or offer a way to create a
dynamic report off a cross tab query, i'd like to summate
the labor hours by start/end date.

thanks for any help!

jeff
 
If the dates are your column headings then you don't need to create dynamic
headings. Consider creating a report that has a specific number of dates.
Assuming you want 14 dates that end on the date entered by a user in
Forms!frmDate!txtEndDate.
Your column heading expression would be
ColHead:"Day" & DateDiff("d",[DateFld], Forms!frmDate!txtEndDate)
Make sure you set the Query|Parameters
Forms!frmDate!txtEndDate DateTime
and then set the Column Headings property of the query to:
"Day0","Day1",..."Day9"
Day0 will have the values from the EndDate and Day9 will be 9 days earlier.
Your report columns/fields will always be the same names. The dates they
represent will change. To create column headings in your report, use text
boxes with control sources like:
=DateAdd("d",-0,Forms!frmDate!txtEndDate)
=DateAdd("d",-1,Forms!frmDate!txtEndDate)
=DateAdd("d",-2,Forms!frmDate!txtEndDate)
etc
 
Hi Duane,

Brilliant!!!! I've been trying to figure out how to do this for ages. I'm
know I'm pushing my luck here but is it at all possible to have the actual
dates as the captions or am I missing something?

Cheers,


--
SharkSYA
Duane Hookom said:
If the dates are your column headings then you don't need to create dynamic
headings. Consider creating a report that has a specific number of dates.
Assuming you want 14 dates that end on the date entered by a user in
Forms!frmDate!txtEndDate.
Your column heading expression would be
ColHead:"Day" & DateDiff("d",[DateFld], Forms!frmDate!txtEndDate)
Make sure you set the Query|Parameters
Forms!frmDate!txtEndDate DateTime
and then set the Column Headings property of the query to:
"Day0","Day1",..."Day9"
Day0 will have the values from the EndDate and Day9 will be 9 days earlier.
Your report columns/fields will always be the same names. The dates they
represent will change. To create column headings in your report, use text
boxes with control sources like:
=DateAdd("d",-0,Forms!frmDate!txtEndDate)
=DateAdd("d",-1,Forms!frmDate!txtEndDate)
=DateAdd("d",-2,Forms!frmDate!txtEndDate)
etc

--
Duane Hookom
Microsoft Access MVP


Jeff said:
Can someone point me to, or offer a way to create a
dynamic report off a cross tab query, i'd like to summate
the labor hours by start/end date.

thanks for any help!

jeff
 
The column "captions" are the text boxes that I mentioned previously.

--
Duane Hookom
MS Access MVP


SharkSYA said:
Hi Duane,

Brilliant!!!! I've been trying to figure out how to do this for ages. I'm
know I'm pushing my luck here but is it at all possible to have the actual
dates as the captions or am I missing something?

Cheers,


--
SharkSYA
Duane Hookom said:
If the dates are your column headings then you don't need to create dynamic
headings. Consider creating a report that has a specific number of dates.
Assuming you want 14 dates that end on the date entered by a user in
Forms!frmDate!txtEndDate.
Your column heading expression would be
ColHead:"Day" & DateDiff("d",[DateFld], Forms!frmDate!txtEndDate)
Make sure you set the Query|Parameters
Forms!frmDate!txtEndDate DateTime
and then set the Column Headings property of the query to:
"Day0","Day1",..."Day9"
Day0 will have the values from the EndDate and Day9 will be 9 days earlier.
Your report columns/fields will always be the same names. The dates they
represent will change. To create column headings in your report, use text
boxes with control sources like:
=DateAdd("d",-0,Forms!frmDate!txtEndDate)
=DateAdd("d",-1,Forms!frmDate!txtEndDate)
=DateAdd("d",-2,Forms!frmDate!txtEndDate)
etc

--
Duane Hookom
Microsoft Access MVP


Jeff said:
Can someone point me to, or offer a way to create a
dynamic report off a cross tab query, i'd like to summate
the labor hours by start/end date.

thanks for any help!

jeff
 
Back
Top