Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Grouping and Sums 1

Status
Not open for further replies.

dmc874

Technical User
Sep 3, 2001
7
US
I am creating a report for a internet blocking database. I want to run it every night and get a report of the activity for that day. I have the following formula that will give the the totals for everything since the database hase been purged but cannot figure out how to only get results for when {Connections.Access_Time} = CurrentDate
I am using CR7 and an Access database soon to be converted to SQL

numberVar atotal := Sum ({Connections.Duration}, {Workstations.IP_Address});
numberVar ahours := truncate(atotal/3600);
numbervar aremains := Remainder(atotal, 3600);
numberVar amins := truncate(aremains/60);
numberVar aseconds := aremains - (amins * 60);


if amins < 10 and aseconds < 10 then
ToText(ahours,0) + &quot;:0&quot; + ToText(amins,0) + &quot;:0&quot; + ToText(aseconds,0)
else if amins < 10 then
ToText(ahours,0) + &quot;:0&quot; + ToText(amins,0) + &quot;:&quot; + ToText(aseconds,0)
else if aseconds < 10 then
ToText(ahours,0) + &quot;:&quot; + ToText(amins,0) + &quot;:0&quot; + ToText(aseconds,0)
else
ToText(ahours,0) + &quot;:&quot; + ToText(amins,0) + &quot;:&quot; + ToText(aseconds,0)

Thanks
Dave
 
The report selection criteria should state

{Connections.Access_Time} = CurrentDate

Hth,
Geoff
 
Thank you very much for your help. I am pretty new at this, so where/how do I set the criteria?

Thanks
Dave
 
Hi Dave,

From within CR7

Report...
Edit Selection Criteria... Record

insert the formula in there

Save and refresh the report

Hth,
Geoff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top