473,664 Members | 3,035 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
ScheduleStaffMe mber Primary Key Number (Lookup to Staff Table)
ScheduleStaffSh ift Primary Key Number (Lookup to ListOfShifts table)
ScheduleStaffRo le Number (Lookup to ListOfPosition table)
ScheduleStatus Text
ScheduleStaffSh iftStart Date/Time
ScheduleStaffSh iftEnd Date/Time

Table - Staff
ID Primary Key AutoNumber
StaffName Text
Role Number (lookup to ListOfStaffRole table)
PreferredArea Number (lookup to ListOfAreas table)
PrimaryContactN umber Text
FTEStatus Number (lookup to ListOfFTE table)
PreferredShift Number (lookup to ListOfPreferred Shift table)
PreferredHours Number (lookup to ListOfPreferred Hours 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
ShiftDescriptio n Text
StartTime Text
EndTime Text
Duration Number

Table - ListOfPosition
ID Primary Key AutoNumber
Position Text
Dec 27 '12 #1
8 2517
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
17657
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
4089
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
6641
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 display as 0 0.0;;"";"" --> Both NULL and 0 values show up blank
1
1176
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? Thanks a million;
6
3160
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
1869
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
1367
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
3487
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
7841
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, as value Date, total:where, criteria between and - this is taken from a form,
11
6185
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 following code to construct the query: strXT = "TRANSFORM Sum(Query2.STAT) AS SumOfSTAT " & _...
0
8861
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7375
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4185
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2764
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
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.