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

record summaries

Status
Not open for further replies.

jvolden

IS-IT--Management
Jan 26, 2005
77
US
I have a report that is reading in thousands of records and then sorts them by and filters them using my formulas. I am trying to create a summary of all the incidents (records) that are displayed in the report. All I seem able to do is create a summery that counts all the incidents in the field, not just the ones I have displaying in the report. How can I keep track of only the number of incidents being displayed after being filtered?
Hope this makes sense, if not let me know what else you need to know.
Thank you.
 
Filtering should occur PRIOR to rows being returned to your report. This is generally done by using the Report->Edit Selection Formulas->Record or Group. Once this is set, then Crystal will construct SQL (check it under Database->Show SQL Query) and pass it to the database, including your filtering. This results in faster reports and eliminates the need to filter in the report.

For additional help post technical information:

Crystal version
Database/connectivity used
Example data
Expected output

You might also check my FAQ on optimizing SQL pass through if you have a SQL type of database:

faq767-3825

-k
 
If you are suppressing records, then create running totals using the expert where you count your {table.field}, evaluate using a formula where you enter the opposite of your suppression criteria, reset on change of group or never.

If you are using group selection instead of suppression, use running totals which count your {table.field}, evaluate for each record, reset on change of group or never (no need to add in anything related to your group selection criteria).

-LB
 
Thank you for your help. I have a group selection formula (count ({%inc_no}, {%upper}) >= 2) that stops from displaying a serial number group if it has less than two incidents affiliated with the serial. When I do a record count it is also counting the incidents that are not being displayed due to this formula. U built my own record count formula:
numberVar y;

if
count ({%inc_no}, {%upper}) >= 2 and
{@my_queue_field} and
{%upper} <> "" and
{probsummarym1.open_time} in {?Start Date} to {?End Date} and
{probsummarym1.category} <> "request"
then
y := y + 1;
;
y;

But when I am unable to select this formula field to do a summary on the get the count value. If I place it in the report it will count the fields correctly, but I want the count number in the report header. Is there a way to make "y" available to another field? Any other suggestions?
 
If you used the running total expert, you would only need to choose a recurring field, count, evaluate for each record, reset never (as long as you are using no suppression in addition to group selection).

But whether you use the expert or your own manual running total formula, you can only display the result in the report footer--because the result is only available after all records are evaluated. So to get the result in the report header, you would need to save your report as a subreport and insert it in the report header of the original report, suppressing all subreport sections except the report footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top