Skip to Content
0
Former Member
Jun 09, 2007 at 01:14 AM

Count of fields for a specific date

15 Views

Hi.

I have a report that is running on parameter field of date range. I have the report grouped by that same date range. The dates showing up on my report are payroll dates. So since there are two payrolls in one month I see both. For example:

5/8

5/18

I then have another group below the above date for "Type" of check "amount" and "count". So the report looks something like this when I run it:

5/8

Type#1 $5000.00 / 100 people

Type #2 - $6000.00 / 85 people

5/18

Type#1 $5300 /102 people

Type#2 $6600 /60 people

Grand Total: $22900

So far, everything works great and this is all good.

I now want to add two fields to the report (without changing my main report data (above) and since the fields are from the same table, I created a subreport for each field. I have an "added to payroll date" and a "taken off payroll date" field. And since I just want a count per payroll date of the number of people added/taken away, I created a subreport for each date (they exist in the same table).

I linked the subreports to the main report by checkdate since that is what it is grouped on... and I did a "count" formula to provide me with the count of people. (I also added a group to the subreports so the records are grouped by checkdate.

The total number for MAY is correct, but it is not putting the correct # of added and taken off in the respective check date?

Confused yet?

Its doing this:

5/8 added 50 / taken away 60

Type#1 $5000.00 / 100 people

Type #2 - $6000.00 / 85 people

5/18 added 100/taken away 20

Type#1 $5300 /102 people

Type#2 $6600 /60 people

Grand Total: $22900

The total # of Added "150" in this example is correct, but it is distributed incorrectly... same for the taken away. What am I doing wrong?

Also, can anyone think of another way of doing this outside of the two subreports I just created since my report runs really really slow now?

Your help is much appreciated

Thanks

Using Crystal-8