473,513 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a report like a crosstab report

25 New Member
I have information in my scheduling table that I need to report out in a crosstab format with the staff members as the rows and the dates as the columns. I've created a crosstab report query that gives me the information in the exact format I need, but the problem is that since the columns are based on a dynamic value that changes (schedule date), I can't manipulate the information into the format I need. The request is to break down the schedule into specific segments based on the staff member's role in the department by location, so I'd need a report for all RN's scheduled at Station A, all LPN's scheduled at Station A . . . all within one document for a selected amount of time (one day, two days, one week, two weeks, four weeks, six weeks).

Basically, I'd like to take data in the format:
Mouse, Micky 12/23/2012 1900-0700
Mouse, Minnie 12/23/2012 0700-1500
Mouse, Micky 12/24/2012 1900-0700
Mouse, Minnie 12/24/2012 0700-1500
Mouse, Micky 12/25/2012 1900-0700
Mouse, Minnie 12/25/2012 0700-1500

and convert it to:
RN Schedule
12/23/2012 12/24/2012 12/25/2012
Mouse, Micky 1900-0700 1900-0700 1900-0700

LPN Schedule
12/23/2012 12/24/2012 12/25/2012
Mouse, Minnie 0700-1500 0700-1500 0700-1500

(since Micky is an RN identified in the staff table and Minnie is an LPN)

Here's the format of the relevent tables:

Table - Schedule
CreateDateTime Date/Time
ScheduleDate Primary Key Date/Time
ScheduleStaffMember Primary Key Number (Lookup to Staff Table)
ScheduleStaffShift Primary Key Number (Lookup to ListOfShifts table)
ScheduleStaffRole Number (Lookup to ListOfPosition table)
ScheduleStatus Text
ScheduleStaffShiftStart Date/Time
ScheduleStaffShiftEnd Date/Time

Table - Staff
ID Primary Key AutoNumber
StaffName Text
Role Number (lookup to ListOfStaffRole table)
PreferredArea Number (lookup to ListOfAreas table)
PrimaryContactNumber Text
FTEStatus Number (lookup to ListOfFTE table)
PreferredShift Number (lookup to ListOfPreferredShift table)
PreferredHours Number (lookup to ListOfPreferredHours table)
HireDate DateTime
DeployDate DateTime
Agency Yes/No
Traveler Yes/No
ActiveStatus Yes/No
DistantEmployee Yes/No
Wave Number (lookup to Wave table)

Table - ListOfShifts
ID Primary Key AutoNumber
ShiftDescription Text
StartTime Text
EndTime Text
Duration Number

Table - ListOfPosition
ID Primary Key AutoNumber
Position Text
Dec 27 '12 #1
8 2506
zmbd
5,501 Recognized Expert Moderator Expert
We just had a question like this not very long ago... let me see if I can re-locate the thread.
Dec 27 '12 #2
zmbd
5,501 Recognized Expert Moderator Expert
This isn't the thread I was thinking of; however, I have it in a list I use so this should get you started. http://bytes.com/topic/access/answer...text-box-value

Of relavance to your question take a look at post #2, #18, and #24.
Dec 27 '12 #3
MLEBL
25 New Member
I think this is good if I wanted to create graphs, but the system will not allow a crosstab query to be the basis for a subreport on a report or form. Any other direction?
Dec 28 '12 #4
Rabbit
12,516 Recognized Expert Moderator MVP
While the content of that thread is for a graph, the solution of dynamically updating the fields to represent the differing columns applies to your situation.
Dec 28 '12 #5
zmbd
5,501 Recognized Expert Moderator Expert
The link to the example database in Roger's library deals specifically with your issue.
Dec 29 '12 #6
MLEBL
25 New Member
I've realized that there's an additional component to the report, the role the staff member is expected to fulfill. So I would need a crosstab report with rows for the staff member, columns for the dates, and values for the role and shift. Is there any way to create a crosstab query with two values?
Dec 31 '12 #7
zmbd
5,501 Recognized Expert Moderator Expert
Crosstab query techniques
Dec 31 '12 #8
MLEBL
25 New Member
Got it! I was thinking of it as two separate values instead of combining the values into one field. Now I'm just working on getting the correct format on the report based on the indicated criteria (single staff member, schedule for a day, week, two weeks . . .). I'll review the information provided. Thanks for all of your assistance with this!
Dec 31 '12 #9

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

Similar topics

1
17633
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 Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
1
4079
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 'Forms!frmDefaults!ProviderID' as a valid field name or expression, and debug takes me to line 60 below. Any Suggestions Would Be Truly Appreciated!
12
6626
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 access to show NULL and 0 values seperately. I've tried the following Format properties in my text box: 0.0;;0;"" --> Both NULL and 0 values...
1
1166
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 begin with Monday (2), the colum heading display correctly, but the data in the column came from Sunday instead of Monday's! How can I fix this?...
6
3149
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 make the report go past six pages? Also is there a way to sort the total column in descending order? Thanks in advance for the help.
0
1365
by: chona | last post by:
hello, Is there a way that I can set the row height in a crystal report crosstab to be dynamic. Like the height of the row should depend on the data inside the cell. Please help!
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 program a dynamic multi-page crosstab report?
14
7826
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 has the following fields: SPID (supervisor ID), total:group by, as row heading Date, total:group by, as column heading Calls handled, total:sum,...
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 days), weekly (for the last 6 weeks) and monthly (for the last 6 complete months). Daily and monthly are not causing me a problem - I have used the...
0
7178
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7565
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7543
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5704
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5103
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3242
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
473
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.