cleoozo
Jan 4 2005, 09:35 AM
I am fairly new to Access, which will probably show in this post, and need some direction for a report that I need to do. I have been running a bimonthly report and using excel to post to our company's web site. I have recently converted the individual reports to Access and now need to do the same with the summary. How do I format a report that will bring in the "percent compliant" field from each individual report into one summary? I need to be able to compare each weeks values with previous reports.
Any help will be greatly appreciated.
armitageshanks
Jan 4 2005, 11:37 AM
Hi,
Have a look at the attached report (RptStatistics).
It is from a database that I have.
I use it to extract various statistical data from a pretty standard database, alot of it has been done using DCount.
It would be useful for you to have a look and see if this is the sort of thing you need to produce....
cleoozo
Jan 4 2005, 11:44 AM
Access will not open this report. It says it cannot find the toolbar 'report'.
armitageshanks
Jan 4 2005, 11:46 AM
Try going into it via design mode, this will give you all the criteria that calculates the percentages,etc.
The report has no data to work on, but the criteria in the text boxes should still be relevant.
cleoozo
Jan 4 2005, 12:21 PM
I will attach a small sample of what I am trying to do.
armitageshanks
Jan 5 2005, 03:38 AM
You should be able to do this from the report design that I've posted.
If you have a look at the criterias within the text boxes, this counts up:
So for instance, in TxtTotalBriefs :
=DCount("*","DSQryMain"," [CaseID]")
This counts (DCount) CaseID from DSQueryMain.DSQueryMain is based on my main table. Basically CaseID is an a figure of either 14 or 21, that is assigned to each record from TblMain. Each record has an entry in this field, so therefore each record is counted.
Next is Txt14ID:
=DCount("*","DSQryMain","CaseID = '14'")
This again counts CaseID, but only the records that equal 14.
To the right of that and up one, is Text25:
=[Txt14ID]/[TxtTotalBriefs]
Quite simple, this divides the total records,from TxtTotalBriefs and Text14ID. In the property of this field, the format is set to Percent. Therefore displaying a percentage.
As you've got alot of fields this may take a little while to do. Just copy and paste the text boxes and then change the fields.
So for instance, say your fields are from tblMain. With MedicalID (Primary Key) as a field, and MedicalReason (Text) as another.
From this is based a Query....
Then(TxtAll):
=DCount("*","QryMain","MedicalID")
This would count all the records.You could also use MedicalReason if this applied to all records.
Then(TxtPAP)
=DCount("*","QryMain","MedicalReason='PAP SMEAR'")
This counts all occurences of PAP smear in the field MedicalReason.
Then(TxtPAPPercent):
=[TxtPAP]/[TxtAll]
Set the format of this text box to percent.
This should do it!
It might also be worthwhile have a look at cross tab queries.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.