473,651 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CrossTab report question

I have a fairly simple crosstab query that I would like to use as the
basis of a report:

TRANSFORM Max(CStr([numberoffiles]) & "-" & [Comments]) AS Details
SELECT [D99-AuditHistory].Camera
FROM [D99-AuditHistory]
WHERE ((([D99-AuditHistory].FileDate)>=#4/30/2007# And ([D99-
AuditHistory].FileDate)<=#5/3/2007#))
GROUP BY [D99-AuditHistory].Camera
PIVOT [D99-AuditHistory].FileDate;

The query and report will always return only 3 dynamic columns (the
last three dates of historical info - hard coded into the query).

The report wizard works fine if I am willing to create a new report
each time the dates change (every run).

All I need to be able to do is set the "control source" property of my
three detail section text boxes to query.fields(1) / query.fields(2) /
query.fields(3) . This would solve the problem of the fieldnames
changing based on the query results.

I hope to set the column headings to query.fields(1) .NAME /
query.fields(2) .NAME / query.fields(3) .NAME.

I have tried many different syntax's for the control source, but have
not stumbled upon the right combination. Any ideas would be greatly
appreciated.

I am using Access 2007.

Thanks in advance.

May 4 '07 #1
2 1805
Work on your source query, replace [Filedate] with a calculated number of
days from the starting date. Add an "IN" clause after PIVOT to list each day
column in your report. In the report calculate the date from the starting
date and relative days.

<bi*********@ya hoo.comwrote in message
news:11******** **************@ l77g2000hsb.goo glegroups.com.. .
I have a fairly simple crosstab query that I would like to use as the
basis of a report:

TRANSFORM Max(CStr([numberoffiles]) & "-" & [Comments]) AS Details
SELECT [D99-AuditHistory].Camera
FROM [D99-AuditHistory]
WHERE ((([D99-AuditHistory].FileDate)>=#4/30/2007# And ([D99-
AuditHistory].FileDate)<=#5/3/2007#))
GROUP BY [D99-AuditHistory].Camera
PIVOT [D99-AuditHistory].FileDate;

The query and report will always return only 3 dynamic columns (the
last three dates of historical info - hard coded into the query).

The report wizard works fine if I am willing to create a new report
each time the dates change (every run).

All I need to be able to do is set the "control source" property of my
three detail section text boxes to query.fields(1) / query.fields(2) /
query.fields(3) . This would solve the problem of the fieldnames
changing based on the query results.

I hope to set the column headings to query.fields(1) .NAME /
query.fields(2) .NAME / query.fields(3) .NAME.

I have tried many different syntax's for the control source, but have
not stumbled upon the right combination. Any ideas would be greatly
appreciated.

I am using Access 2007.

Thanks in advance.

May 4 '07 #2
Thanks for the advice Ron. I will look into your approach.
On May 4, 2:09 pm, "paii, Ron" <p...@packairin c.comwrote:
Work on your source query, replace [Filedate] with a calculated number of
days from the starting date. Add an "IN" clause after PIVOT to list each day
column in your report. In the report calculate the date from the starting
date and relative days.

<billfind...@ya hoo.comwrote in message

news:11******** **************@ l77g2000hsb.goo glegroups.com.. .
I have a fairly simple crosstab query that I would like to use as the
basis of a report:
TRANSFORM Max(CStr([numberoffiles]) & "-" & [Comments]) AS Details
SELECT [D99-AuditHistory].Camera
FROM [D99-AuditHistory]
WHERE ((([D99-AuditHistory].FileDate)>=#4/30/2007# And ([D99-
AuditHistory].FileDate)<=#5/3/2007#))
GROUP BY [D99-AuditHistory].Camera
PIVOT [D99-AuditHistory].FileDate;
The query and report will always return only 3 dynamic columns (the
last three dates of historical info - hard coded into the query).
The report wizard works fine if I am willing to create a new report
each time the dates change (every run).
All I need to be able to do is set the "control source" property of my
three detail section text boxes to query.fields(1) / query.fields(2) /
query.fields(3) . This would solve the problem of the fieldnames
changing based on the query results.
I hope to set the column headings to query.fields(1) .NAME /
query.fields(2) .NAME / query.fields(3) .NAME.
I have tried many different syntax's for the control source, but have
not stumbled upon the right combination. Any ideas would be greatly
appreciated.
I am using Access 2007.
Thanks in advance.- Hide quoted text -

- Show quoted text -

May 8 '07 #3

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

Similar topics

8
7564
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 pretty much like this: ITEM DESC UM 12/02 1/03 2/03 3/03 ...ETC. 1 Solution ...
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
4
2087
by: No Spam | last post by:
Dear Access 2000 users, I have a crosstab query that puts together certain information perfectly. It has a criteria that is based on a form that limits how many columns are returned based on the date selected. Here's the problem: The report that the crosstab query feeds was initially created to show all the dates and thus, all 26 columns. However, since I modified the crosstab query to only return up to what is selected on the...
2
3039
by: Sherman H. | last post by:
I have a few questions for crosstab and popup form questions: 1. I created a crosstab as follows: IT Financial Operation John 21 22 22 Mary 15 17 16 Joe 28 29 31 For some other instances, the Operation column was not created because the
15
4392
by: Richard Hollenbeck | last post by:
I tried to ask this question before on the 14th of January but I never got a reply. I'm still struggling with the problem. I'll try to rephrase the question: I have a crosstab query with rows of students and columns of activities and the data are the students' scores in each activity. No problem, almost. The problem is that there are five classes at the moment and will be more classes (or courses) in future semesters. I don't want...
2
2931
by: deejayquai | last post by:
Hi I'm trying to produce a report based on a dynamic crosstab. Ultimately i'd like the report to actually become a sub report within a student end of year record of achievement. The dynamic sub-report will capture what grades the student has achieved in a list of different subjects and the reason I need it to be dynamic is that students take different subjects. Basically I've been trying to doctor the KB article on dynamic
2
2535
by: scott.k.fraley | last post by:
....and the SELECT thats trying to pull from said Query doesn't like it one bit! ;) I'm working on this project (in Access 2002) and there is a report who's RecordSource is the following SELECT; SELECT xTab.FirstOfPRIORITZTN_STATUS_NAME, xTab., iif(IsNull( xTab. ), 0, xTab.) AS ,
8
6072
by: Penny | last post by:
(Access 2003 Multiuser Split DB, Windows XP Pro) Hi All, I would really appreciate just some basic tips on how to make a Crosstab Form based on a Crosstab Query. The query always has the same number of records(generated from a table of predefined 'timeslots'). The number of columns(one for each Consultant) varies depending on how many of the Consultants have a yes/no field('Participates') set to yes. Therefore the Crosstab query...
6
4459
by: tizmagik | last post by:
I am having a lot of difficulty generating a CrossTab Query based report. I have looked online for several tutorials and whatnot but I have not been able to really find what I'm looking for, nor have I been able to adapt other people's solutions/tips to fit what I need. If anyone could please help me with the following it would be really appreciated, thank you! I need to generate a Report (say: repCrossTab) that grabs it's data from the...
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,
0
8361
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8278
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8807
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...
0
8701
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
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
7299
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...
0
5615
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();...
1
2701
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
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.