473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Report: Grouped by Fields

Hello

I have a table used to maintain information on Service Events.
Each record contains a Repair, Maint, and Battery checkbox
(bound/boolean).
Any one of these fields may be checked of left empty.

I want to generate one report that lists all the Repairs, then lists
all the Maint, and then
lists all the Battery events. I am not sure how to approach this.
Should I create seperate
subforms and insert them in the main report, or can it all be done in
the main report
somehow ?

ThankYou
Greg

Apr 23 '06 #1
3 1204
Ap******@gmail.com wrote:
Hello

I have a table used to maintain information on Service Events.
Each record contains a Repair, Maint, and Battery checkbox
(bound/boolean).
Any one of these fields may be checked of left empty.

I want to generate one report that lists all the Repairs, then lists
all the Maint, and then
lists all the Battery events. I am not sure how to approach this.
Should I create seperate
subforms and insert them in the main report, or can it all be done in
the main report
somehow ?

ThankYou
Greg

You could create a separate column. Ex:
Expr1:IIF(Repair,1,IIF(Maint,2,IIF(Battery,3,4)))
You could then sort on Expr1 and filter out those that are 4. This
would assume there can be only 1 type tho and if there are multiple
types for each record that would not work.

If you have multiples (battery and Repair for example on 1 record) then
you might be best to create a UNION query for the report recordsource. Ex:
Select * From Table1, "1" As Fix From Table1 _
Where Repair
UNION ALL
Select * From Table1, "2" As Fix From Table1 _
Where Maint
UNION ALL
Select * From Table1, "3" As Fix From Table1 _
Where Battery
Then in the report, using Sorting and Grouping sort on Fix as the
primary sort.
Apr 23 '06 #2
I do have multiples on the 1 record. So I will try the
Union query suggested for the report in conjunction with
the Sort/group on fix.

Thanks for the tip Salad
Greg

Apr 23 '06 #3

SALAD

It took me quite a while, but I finally understand what you suggested.
The code that follows, is what I wound up with, and it works perfectly.
Your advice, as usual, was right on target.

ThankYou
Greg

SELECT "REPAIR" As MyFix, * FROM [T-SERVICE] WHERE [RPR]
UNION ALL
SELECT "MAINTENANCE" As MyFix, * FROM [T-SERVICE] WHERE [MAINT]
UNION ALL
SELECT "CALIBRATE" As MyFix, * FROM [T-SERVICE] WHERE [CAL]
UNION ALL
SELECT "BATTERY" As MyFix, * FROM [T-SERVICE] WHERE [BAT]

This code is all placed in the Record Source of the Report.
The REPAIR label becomes placed in MyFix when RPR = True, Maint, etc...
The sorting and grouping dialog is to contain the MyFix label, and
select
the sort you want next to it. Set the group header to Yes. Then place a
TextBox in the MyFix group header which appears in the report and set
its
Control Source to MyFix.

Apr 26 '06 #4

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

Similar topics

0
by: CSDunn | last post by:
Hello, I have a format issue on an Access 2000 ADP report that I am going to attempt to explain from a 'ten thousand foot view' : I have an Access 2000 ADP report that has a SQL Server 2000...
1
by: Melissa | last post by:
Can anyone help me with this --- I have a grouped report with a subreport in the group footer and the report starts a new page for each group. The subreport is based on a query which has...
1
by: Megan | last post by:
quick summary: i'm having problems trying to group fields in a report in order to calculate percentages. to calculate percentages, i'm comparing the results from my grouped fields to the totals....
0
by: rjn | last post by:
Hi I have a main report in which I have inserted a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the...
2
by: jammer | last post by:
Hey All, I have a report based on a query that joins a 'parent' and 'child' table. Each row in the query corresponds to a row in the child table, with a few fields from the Parent table. At...
2
by: tom p | last post by:
Happy Friday, I have an access database. There are 2 main tables. tbl_Assignment_Data has fields populated by a form that the user provides input to. The fields in the above table are : Unit...
1
by: anubis2k7 | last post by:
Hi, I am having a problem with dynamically sorting/grouping data in my report at runtime. My problem is that when the report is run using sorting/grouping I am missing data. Specifically, my...
1
by: chipshot | last post by:
Hi. First time asking. I have an Access report grouped by and sub-grouped by . For some records, though, the field is empty. The report works properly. However, my problem is that the...
7
by: tsuedesu | last post by:
Hi, I am trying to create a report that will show the totals of a query. I have a table as follows Table :Sales Fields: CustName, Product, $Value, VolumeOrdered, DeliveredQuantity, Period ...
14
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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,...
0
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...

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.