473,394 Members | 1,841 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,394 software developers and data experts.

Need help with Totals in reports

18
Hello,
I have a question about reports, it might be complicated but I will try to simplify what I need.
I have a table where some of many fields is "name" "date application rcvd" "date appointment given". "male or female" (Yes/No field).
I need to print reports to know:

1) How many applicants applied in a given month. I Just need the report to mention, April: 45 application received. 20 applications processed. 6 males. Is this possible??

2) The delay between "dateApplicationRcvd" and "dateApptGiven" in days, I don't care about working days, I just need to calculate the No of days it took to get appt.

Hope someone can help.
Thanks
Nour
Dec 14 '08 #1
4 1108
nico5038
3,080 Expert 2GB
About
1) How many applicants applied in a given month. I Just need the report to mention, April: 45 application received. 20 applications processed. 6 males. Is this possible??
You'll first have to indicate which date to use for the Male/Female.
A general approach will be to use a goup by query to total the dates per Year/Month.
One solution is to use:
Expand|Select|Wrap|Line Numbers
  1. select format([date application rcvd],"yyyy-mm") as YearMonth, count(*), 0 from tblX Group By format([date application rcvd],"yyyy-mm")
  2. UNION
  3. select format([date appointment given],"yyyy-mm") as YearMonth, 0, count(*) from tblX Group By format([date appointment given],"yyyy-mm")
  4.  
By using this query as the basis for a new group by on the YearMonth and taking the Sum() or Max().

About 2)
For the delay just subtract the dates in the report query like:
[dateApplicationRcvd] - [dateApptGiven]

Nic;o)
Dec 14 '08 #2
ADezii
8,834 Expert 8TB
@Nour469
Here is a couple of things to get you started:
  1. To calculate the number of Days it took to get an Application, assuming a Table Name of tblApplications:
    Expand|Select|Wrap|Line Numbers
    1. SELECT tblApplications.[Date Application Rcvd], tblApplications.[Date Application Given], 
    2. DateDiff("d",[Date Application Rcvd],[Date Application Given]) AS Delay
    3. FROM tblApplications;
  2. To calculate how many Applicants applied within any given Month, assuming a Table Name of tblApplications:
    Expand|Select|Wrap|Line Numbers
    1. SELECT Month([Date Application Rcvd]) AS [Month],
    2. Count(Month([Date Application Rcvd])) AS [Total Apps For Month]
    3. FROM tblApplications
    4. GROUP BY Month([Date Application Rcvd]);
  3. To calculate the number of Males/Females who applied in any given Month, assuming a Table Name of tblApplications:
    Expand|Select|Wrap|Line Numbers
    1. SELECT Month([Date Application Rcvd]) AS [Month], IIf([Male]=True,"Male","Female") AS Sex, 
    2. Count(IIf([Male]=True,"Male","Female")) AS [Count of Sex]
    3. FROM tblApplications
    4. WHERE (((tblApplications.[Date Application Rcvd]) Is Not Null))
    5. GROUP BY Month([Date Application Rcvd]), IIf([Male]=True,"Male","Female");

P.S. - SQL is not my area, better Replys will probably be forthcoming.
Dec 14 '08 #3
nico5038
3,080 Expert 2GB
Hmmm, what about a "year overlapping" dataset ADezii <LOL>

Nic;o)
Dec 14 '08 #4
ADezii
8,834 Expert 8TB
@nico5038
Please Nico, I already said that SQL is not my area! (LOL).
Dec 15 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Galina | last post by:
Hello I have a report, which lists records. Each record has money paid field. Money paid can be 0 or not 0. I calculate and print summary of money for a group in the group footer, as well as...
1
by: hs08846 | last post by:
What is the best way to get a field's sum on the bottom of a page and zero it out after printing at the end of every page.
1
by: Eli via AccessMonster.com | last post by:
I have a database of accepted and not accepted reports. If a report is accepted...there is a check box that is marked to show acceptance. When I run a query of "accepted reports" I get a number of...
6
by: KashMarsh | last post by:
Trying to show running totals on a report, except it needs to show one total amount and values being subtracted from it. For example, the report shows a Total Inventory amount (TotInvAmt). And...
1
by: CaptainDahlin | last post by:
I know the basics about access reports and putting page totals in the page footers. What I can't figure out is along with the current page total to display the previous page total: At the bottom...
3
by: brm6546545 | last post by:
I have a tblTax. It has fields InvoiceNum, TaxAuthority, TaxableTotal, NonTaxableTotal, TaxCollected. Sample data 1,county,10.00,0.00,0.40 1,city,10.00,0.00,0.10 2,state,0.00,15.00,0.15 ...
3
by: Daz | last post by:
Hi everyone. First of all, I would be interested to know if anyone knows of a decent plugin for IE that validates JavaScript. I am running IE 5, 5.5 and 6 through wine (Windows Emulator) on...
0
by: sidhuasp | last post by:
Hi everyone I am using a mainmenu witeh sitemap provider with folowing sitemap <siteMapNode> <siteMapNode url="" title="Master Data" description="Enter Master data" roles ="Admin,PM"> ...
2
by: hanshirley88 | last post by:
Hi, I am doing an expense and funding report which contains a list of consumers by Region and then by SiteID. For example, Region: NE Site: NEMV 1. Mary Doe 2. Len Willams
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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
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...
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...

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.