473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dates Headings In Crosstab Report

13 New Member
hi,

I have a crosstab query that views all the vacation days for employees between two dates parameter,
the column headings of the query is the all the dates between the parameters even if they are nulls

I need to design a report for that query where the headings to be dynamic for dates in the headings and doesn't exceed 31 days.
Expand|Select|Wrap|Line Numbers
  1. PARAMETERS d DateTime, b DateTime;
  2. TRANSFORM Sum(Vaclist.Period) AS SumOfPeriod
  3. SELECT Vaclist.EmpID, Vaclist.Vactype, Sum((nnz([period]))) AS Total
  4. FROM (qryEmployeeWorkDates LEFT JOIN Vaclist ON (qryEmployeeWorkDates.DateOfPeriod = Vaclist.VacDate) AND (qryEmployeeWorkDates.EmpID = Vaclist.EmpID)) LEFT JOIN tbl_VacType ON Vaclist.VacTypeID = tbl_VacType.VacTypeID
  5. WHERE (((qryEmployeeWorkDates.DateOfPeriod) Between [d] And [b]))
  6. GROUP BY Vaclist.EmpID, tbl_VacType.Vactype, Vaclist.Vactype
  7. PIVOT qryEmployeeWorkDates.DateOfPeriod;
I attached an image that describes what I need to do

I really appreciate your help

Attached Images
File Type: jpg Vacation.jpg (94.2 KB, 323 views)
Oct 12 '12 #1
4 1740
twinnyfo
3,653 Recognized Expert Moderator Specialist
ProjectNow,

One idea is to have a separate table, called, for example, tblDateAdd, with one field, AddToDate. This table would have 30 records in it. Those 31 records are merely the numbers 0-30. Then, in your CrossTab query, add that table, with no relationships. However, your column heading will be the StartDate (I think that is your d variable) + AddToDate. This will give you 31 dates, starting with your StartDate and ending with StartDate + 30. Then, you should be able to format the dates in whatever way you need.

You may have to tweak things in order toget the exact results you need with your data, but this should get you mocing in the right direction.

Hope this idea helps.
Oct 15 '12 #2
Projectnow
13 New Member
thank you for your reply
one more question is there a way to color the column of the days off
Oct 15 '12 #3
twinnyfo
3,653 Recognized Expert Moderator Specialist
I don't know what version of Access you are using, but on the Form or Report, you should be able to use some type of Conditional Formatting.
Oct 15 '12 #4
Projectnow
13 New Member
thank you very much for your reply
I attached an image on my first post in this thread, I used unbound controls for this report, so I can't figure out how to handle coloring the column of the days off and holidays

any help would be appreciated
thank you very much
Oct 15 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
17629
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
1
4076
by: mtech1 | last post by:
Access 2002 I am trying to create a dynamic crosstab report that parameters come from 3 different forms. I get runtime error 3070 - The Microsoft Jet database engine does not recognize...
12
6623
by: jkearns | last post by:
Hello, I made a report from a crosstab query following the steps onlined in MSDN's Solutions.mdb example. I now have a dynamic crosstab report (great!), but with one minor problem. I cannot get...
1
1164
by: Bill Nguyen | last post by:
I used the following formula in my crosstab report. WeekdayName (DayOfWeek ({selling.s_sell_date}),true,2) for column and selling.sellGallons for the summarized value. I wanted the week to...
2
1791
by: billfindley | last post by:
I have a fairly simple crosstab query that I would like to use as the basis of a report: TRANSFORM Max(CStr() & "-" & ) AS Details SELECT .Camera FROM WHERE (((.FileDate)>=#4/30/2007# And...
6
3147
by: Johnny BeGood | last post by:
Hi All, Any guidance on how to generate a crosstab report, have searched everwhere, well almost, no joy. Any help gratefuly accepted Cheers
2
1863
by: Ecohouse | last post by:
I'm using Access 2002. I'm creating a report dynamically using a crosstab query. I found the code for this on the Microsoft site. I noticed that the report doesn't go past six pages. How can I...
3
3478
by: Niranjan | last post by:
I want create a report based on the crosstab query which normally returns about 50 - 60 columns. The columns have names of the counties and they keep changing for every session. Is there a way to...
14
7825
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor. I have one crosstab query (Query1) which...
11
6159
ollyb303
by: ollyb303 | last post by:
Hello, I am using a dynamic crosstab report to track performance statistics for my company and I have hit a problem. I would like the option to track stats daily (for the last 7 complete...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.