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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summary Field (Count)

Status
Not open for further replies.

dboylan

Programmer
Jan 4, 2002
4
US
I have a summary report where I select records with a value of &quot;assigned&quot; in a field. I group on Assigned Group. This works well. Brings back 343 records, totals them by Assigned Group. What I need to do is do a Count of all records that have this &quot;Assigned&quot; value for less than 24 hours. Thanks to Naith for this calc - DateDiff('h',{HD_Ticket.Create-date},CurrentDate) < 24 (Produces Boolean)

I don't want this as part of my record selection but want it as part of my summary (Count) field in my Group footer along with a few other counts. For instance, out of 343 records, HD Staff has 30 with a value of Assigned. Of those 30, 24 have been opened in the last 24 hours and 5 greater than 24 hours. I need to have the group footer display:

HD Staff 30 24 x x x


where 30 is the sum count of all records, 24 the sum count of all records that have been opened in the last 24 hours, etc.

Dave
 
In your detail section you could create two formulas,
#1 Less than 24hr
if DateDiff('h',{HD_Ticket.Create-date},CurrentDate) < 24
then 1
else 0

#2 Over 24 hrs
if DateDiff('h',{HD_Ticket.Create-date},CurrentDate)>24
then 1
else 0

Then in your group section, do a count on these two formulas.

[flowerface]
 
Hi Crystalguru,
I have a similar issue, but my user wants me to put the Count Summaries on the Report Header.
I have tried unsuccesfully to do this. Any ideas ?
Please help.

Thanks.
 
Make sure the 2 formulas are in the detail section. Then right click on them to Insert ->Grand Total-> Choose Count.

You should be able to move the Grand Total Count to the Report Header Section. Crystal automatically places it in the Report Footer.

[flowerface]
 
Crystalguru,
I am aware of your solution but it doesn't work for me because of my report layout.

RH - ( Need to Dislay my Counts here )*
--
GH1 - Catalgue#
GH2 - (suppressed)
GH3 - Pack #, Dates etc. [ Created a running total count formula here ]
Detail ( Suppressed )
GF3 - Suppressed
GF2 - Suppressed
GF1 - Suppressed
---
The issue is that since my field where I am having my running total count is in the GH3, I can't use your solution to display on the RH.
I also have a formula here to count &quot;Items Ordered <= 20&quot; on GH3, that I display on the RF,but the user insists because of the length of the report, he needs the counts displayed on the Report Header.
I am really stuck here.
 
I think the only way you'll be able to do this in through a subreport where you recreate the report and collect the running total results in the group footers/or report footers of the subreport. You can then suppress the other subreport sections and display the subreport in the report header of your main report.

-LB
 
Mulema,

I know it's been since July, but did you get your report problem solved?

crystalguru
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top