473,569 Members | 2,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Row Headings in a Crosstab Query

Hi everybody,



When executing a Crosstab Query I see only rows (defined in a row heading) that have values (defined in value field) in at least one column (defined as column headings). How can I make a Crosstab Query that shows all rows, regardless they have values in column headings.

For instance, the result that I get now is like this





AreaID Class_1_ID Class_2_Val_1 Class_2_val_2 Total_Class_1_I D

1 2 10 20 30

1 3 5 15 20

2 1 6 30 36

2 2 10 10

2 3 20 20 40

3 1 10 10 20

3 2 15 15 30

3 3 10 10 20

4 1 15 20 35

4 3 10 15 25



AreaID, Class_1_ID and Total_Class_1_I D are Row Headings;

Class_2 is the Column Heading

The Value field is defined as expression: Count(..



So, for the Area 1, in Class_1_ID=1 there are no values for neither column in Crosstab result, so it is not shown. For the Area 4 there are no values for Class_1_ID=2 for neither column in Crosstab result, so the whole row is not shown. Of course, the Class_1_ID values are prederfined and limited (there are classes 1, 2 and 3)



Is there a way to show these rows? Or can this be solved in a Report based on this Crosstab Query? Something like Column Headings property that can be defined in a Query properties dialog box, but for rows?



Thanking you in advance,



Nesha







Feb 19 '06 #1
2 2927
Dear Nenad:

I take it your second column "Class_1_ID " is key to understanding what you mean. It does not always have all 3 values, 1, 2, and 3.

The fix is not withing the crosstab, but in having an underlying query that provides all these combinations. I suggest it needs to be a cross-product to do this.

If what this means is not clear to you, I could give you the code for it, but that would require I first see much more detail of what you have. Expecially, I need to know the tables that list every AreaID and, independently, every Class_1_ID.

Tom Ellison

"Nenad Markovic" <ma****@EUnet.y u> wrote in message news:dt******** **@news.eunet.y u...
Hi everybody,



When executing a Crosstab Query I see only rows (defined in a row heading) that have values (defined in value field) in at least one column (defined as column headings). How can I make a Crosstab Query that shows all rows, regardless they have values in column headings.

For instance, the result that I get now is like this





AreaID Class_1_ID Class_2_Val_1 Class_2_val_2 Total_Class_1_I D

1 2 10 20 30

1 3 5 15 20

2 1 6 30 36

2 2 10 10

2 3 20 20 40

3 1 10 10 20

3 2 15 15 30

3 3 10 10 20

4 1 15 20 35

4 3 10 15 25



AreaID, Class_1_ID and Total_Class_1_I D are Row Headings;

Class_2 is the Column Heading

The Value field is defined as expression: Count(..



So, for the Area 1, in Class_1_ID=1 there are no values for neither column in Crosstab result, so it is not shown. For the Area 4 there are no values for Class_1_ID=2 for neither column in Crosstab result, so the whole row is not shown. Of course, the Class_1_ID values are prederfined and limited (there are classes 1, 2 and 3)



Is there a way to show these rows? Or can this be solved in a Report based on this Crosstab Query? Something like Column Headings property that can be defined in a Query properties dialog box, but for rows?



Thanking you in advance,



Nesha







Feb 21 '06 #2

"Nenad Markovic" <ma****@EUnet.y u> schrieb im Newsbeitrag news:dt******** **@news.eunet.y u...
Hi everybody,



When executing a Crosstab Query I see only rows (defined in a row heading) that have values (defined in value field) in at least one column (defined as column headings). How can I make a Crosstab Query that shows all rows, regardless they have values in column headings.

For instance, the result that I get now is like this





AreaID Class_1_ID Class_2_Val_1 Class_2_val_2 Total_Class_1_I D

1 2 10 20 30

1 3 5 15 20

2 1 6 30 36

2 2 10 10

2 3 20 20 40

3 1 10 10 20

3 2 15 15 30

3 3 10 10 20

4 1 15 20 35

4 3 10 15 25



AreaID, Class_1_ID and Total_Class_1_I D are Row Headings;

Class_2 is the Column Heading

The Value field is defined as expression: Count(..



So, for the Area 1, in Class_1_ID=1 there are no values for neither column in Crosstab result, so it is not shown. For the Area 4 there are no values for Class_1_ID=2 for neither column in Crosstab result, so the whole row is not shown. Of course, the Class_1_ID values are prederfined and limited (there are classes 1, 2 and 3)



Is there a way to show these rows? Or can this be solved in a Report based on this Crosstab Query? Something like Column Headings property that can be defined in a Query properties dialog box, but for rows?



Thanking you in advance,



Nesha







Mar 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
7558
by: Donna Sabol | last post by:
First, I should start by saying I am creating a database to be used by some very impatient, non-computer literate people. It needs to be seameless in it's operation from their point of view. I want them to do as little as possible when they run their reports. I have a crosstab query that displays usage of items for each month. It looks...
4
5313
by: pw | last post by:
Hi, I have month names (coming from a field in a table) as the column heading in an Access 97 crosstab query. It is being sorted alphabetically. This will not do. The only way that I know to get around it is to use month numbers instead, but I'd rather have the names appear. Any ideas?
1
2290
by: Steve | last post by:
I have looked through the newsgroup for an answer to this but haven't been able to find anything resembling my situation. What I want to do is relatively simple, I think. I have a crosstab query that is bound to a report I am creating. I would like the column headings to be the name of the correspoding field name. For example, I have...
3
4159
by: Paula | last post by:
I need to do a summary using a crosstab query. The data has a Date field (Not named "Date"). I can do the Row Heading and Value but am having trouble with the Column Heading. The summary Columns needs to read like: Sept01 to Aug02 Sept02 to Aug03 Sept03 to Aug04 Can anyone give me a recommendation on how to get from the Date...
1
1935
by: maria obrien | last post by:
FYI Mr/Ms McDermott. sorry if i'm giving too much info and thank you for replying to my query. hope this will make my problem clearer. The term_cont table contains the contact records (with contact codes) which I count per primary code (from stud_basic), per secondary code (from stud_basic) and multiply with their relevant weights. Hope...
3
9231
by: Lee | last post by:
I have a crosstab query that lists the number of patients(DECnum)by County. County is my Row Heading. Currently, the Column heading is Age in months, which is set at one month intervals. I would like to reduce the number of columns by specifying age groupings. For example, Column 1 shoud cover ages 0 to 6 months, Column 2: 7 to 18 months,...
4
2608
by: Jean | last post by:
Hello, can the following be done? I have a one-rowed query, with the following column headings and values: M-1 M-5 M-7 B-C-1 B-D-2 B-D-4 E-5 R-4 --- --- --- ----- ----- ----- --- --- 4 5 1 2 1 3 7 3
3
5394
by: Col | last post by:
My table has rows that list type of pay with YTD pay for each as well as an employee ID number. I want to make the type of pay the column headings and have each row contain an employee id# and the YTD amount for each type of pay. Currently each type of pay is a different records - need the employee ID as one records with all types of pay...
4
2309
by: odavison | last post by:
I'm currently running a crosstab query that displays the total amounts of Appointments that each Consultant. Currently it is Consultant ID as the Rows, and Appointment Date as the top headings, grouped by Date (rather than month etc.) But it is giving me a random order of dates going up numerically by day and no more. Is there any way of...
0
7698
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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. ...
1
7673
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...
0
7970
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
6284
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
5513
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
5219
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...
0
3653
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...
0
937
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.