473,441 Members | 2,512 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,441 software developers and data experts.

Help in generating a report

I have a query, like the following:

(Assumption: an ID will not have an entry in both "Meal" and "Daily" on
the same date; it can only have an entry in either "meal" or "Daily"
per date)

(Calculation: Total = Meal * 15
OR
Total = Daily * 9)
(Autonumber as primary key [hidden])
================================================== =================
ID | Name | Date | Meal | Daily | Total
| | | Allowance | Allowance | Allowance
================================================== =================
13738 | Ismail | 2/11 | | 1 | 9
15899 | Sugu | 3/11 | | 1 | 9
16210 | Musa | 3/11 | | 1 | 9
16210 | Musa | 3/11 | | 1 | 9
16213 | Ithnin | 4/11 | 1 | | 15
16213 | Ithnin | 4/11 | 1 | | 15
16213 | Ithnin | 5/11 | 1 | | 15
================================================== =================

I have to generate a report such as below (the user first have to
select a date range):

(Example) Date Range: Begin: 3/11
End : 5/11
================================================== ==========================
No | Name | ID | Total Daily | Total Meal | Total
| | | Allowance | Allowance |Allowance
================================================== ==========================
1 | Sugu | 15899 | 1 | | 9
2 | Musa | 16210 | 2 | | 18
3 | Ithnin | 16213 | | 3 | 45
| | | | |
================================================== ==========================
Total | 3 | 3 | 72
================================================== ==========================

The reports is supposed to select the IDs and its associated name
amongst the date range from the query , then sum each IDs respective
Daily Allowances or Meal Allowances, and then display the Total
Allowance (based on the calculations above). It will also display a
grand total of Daily Allowances, Meal Allowances and Total Allowances.

How do I create this report? Any ideas?

(Also let me know if I did not explain anything properly.)

Thank you

Dec 19 '05 #1
6 2122
If it were me, I'd first write a query to select the data with the
parameters you discussed. Once your query is retrieving the data you
wish to have in your report, you can base the report off of your query.
At that point all you will have to do is format the report's fields the
way you want them to look.

Dec 19 '05 #2
How exactly do I do that?

Dec 20 '05 #3
Once you have your query written, you can create a report and set its
Record Source to your query's name. Then you drag the fields from the
Field List to where you want them to appear on your report.

Dec 20 '05 #4
How do I calculate the sum for the Total Daily Allowance, etc. in the
query??

Dec 23 '05 #5
#1: Use the Sum() function.
#2: Write your own database. I'm happy to answer questions, but I'm not
going to write your entire application for you. Use Google.

Dec 23 '05 #6
Aravind:

Try this query:
SELECT ID, Name, Nz(Sum([MealAllowance]),0) AS MealTotal,
Nz(Sum([DailyAllowance]),0) AS DailyTotal, Nz(Sum(TotalAllowance),0) AS
SumOfTotalAllowance
FROM tblAllowances
WHERE (((Date) Between [Enter Begin Date] And [Enter End Date]))
GROUP BY ID, Name;

I'm using the NZ function to convert empty fields to 0 so you can use
them to make grand totals on your report. You'll have to change
'tblAllowances' to the name of your query that built the table you
showed us. For information on how to do these types of queries, you
should look in help for 'customizing queries' and find out about
creating a totals query.

Once your query is grabbing and totalling the way you want, then write
a report that's based on your new query. If you use the wizard, it
should give you guidance on how to create grand totals on the report.

HTH,
Jana

Dec 23 '05 #7

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

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
5
by: Bec | last post by:
I'm in desperate need of your help.. I need to build an access database and have NO idea how to do this.. Not even where to start.. It IS for school, and am not asking anyone to do my...
4
by: Robin Tucker | last post by:
Firstly, I'm using the .NET version (with VB) here, not the full version, I have no idea if this is possible - I would like to change the colour of a rectangular box in the report depending on...
0
by: RJN | last post by:
Hi, I'm new to crystal report and require a help urgently. My requirement is something like this. I have a main report from where I call 2 subreports, say summary and details. The main...
1
by: RJN | last post by:
Hi, I'm new to crystal report and require a help urgently. My requirement is something like this. I have a main report from where I call 2 subreports, say summary and details. The main...
0
by: Aswanth | last post by:
I'm Generating Reports in SSRS-2005.. Previously I got the Data from One Database & Generated Reports.. Now I used to get the Data from Two Different Databases(ie Database-1 & Database-2) & to...
0
by: Aswanth | last post by:
I'm Working with Asp.Net with C#.. & I'm Generating Reports in SSRS-2005.. Till Now I'm Generating Reports in SSRS-2005 with Stored Procedure.. in Which I'm Generating Reports for One...
2
by: veer | last post by:
hi i made program in which i am generating the report of a ms-table database it works fine only on my computer and generatin the reports but when i run this exe on any computer the whole programe...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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...
0
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...
0
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...

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.