Hello all again.
Here's my report
Grouped on Service Rep (SR)
SR Contr open - New Contr - Closed Contr - Amt paid
bob 121 12 17 9,250
bill 97 14 19 7,000
total 218 26 46 16,250
That is what I want the report to look like. I can create the report easily in Access by using 3 base queries and 1 master query but am a bit stumped on how to recreate it in CR 8.5.
I use no selection criteria as I have to examine all fields. I use 2 tables to get this information. Table 1 contains all information except payments which is on table 2. The common field between the 2 tables is [contract number].
Contract open is true when [contract closed] is ""
New contract is true when [contract recd] is {within parameter request}
Contract closed is true when [contract closed] is {within parameter request}
Amt Paid is true when [transaction date] is {within parameter request}
Here is what I tried to do:
Open contract formula:
If [closed date] is "" then [contract number] else "0"
Variations on recd and close like above with [contract number] printed if the true value is returned "0" if not.
Amt paid formula:
if [transaction date] >= (Minimum({?Date Range for Report})) and [transaction date] <= (Maximum({?Date Range for Report}))
then [transaction amount] else 0
So, here's my problem:
I figured to get an accurate count of open, closed, and recieved I could do a distinct count formula and subtract 1 from the total to get an accurate count since it would post the [contract number] or a 0. Distinct Count -1 (to eliminate zeros) should work but it doesn't. On short term counts with few reps it works fine. However, for long term counts it finds something extra in there and the distinct count is off by 2 instead of 1. This error only appears in the total field and not in the rep field.
I had also thought to use 1 and 0 and just sum the columns but since a contract can have several transactions in the transaction table that leads to multimpl 1's being added for the same rep. i.e. if bob had 3 transactions on a closed contract using 1's and 0's would count that as 3 instead of just 1.
Sorry for the long post but I wanted to accuratly explain my problem. So, any help? Thanks.
Here's my report
Grouped on Service Rep (SR)
SR Contr open - New Contr - Closed Contr - Amt paid
bob 121 12 17 9,250
bill 97 14 19 7,000
total 218 26 46 16,250
That is what I want the report to look like. I can create the report easily in Access by using 3 base queries and 1 master query but am a bit stumped on how to recreate it in CR 8.5.
I use no selection criteria as I have to examine all fields. I use 2 tables to get this information. Table 1 contains all information except payments which is on table 2. The common field between the 2 tables is [contract number].
Contract open is true when [contract closed] is ""
New contract is true when [contract recd] is {within parameter request}
Contract closed is true when [contract closed] is {within parameter request}
Amt Paid is true when [transaction date] is {within parameter request}
Here is what I tried to do:
Open contract formula:
If [closed date] is "" then [contract number] else "0"
Variations on recd and close like above with [contract number] printed if the true value is returned "0" if not.
Amt paid formula:
if [transaction date] >= (Minimum({?Date Range for Report})) and [transaction date] <= (Maximum({?Date Range for Report}))
then [transaction amount] else 0
So, here's my problem:
I figured to get an accurate count of open, closed, and recieved I could do a distinct count formula and subtract 1 from the total to get an accurate count since it would post the [contract number] or a 0. Distinct Count -1 (to eliminate zeros) should work but it doesn't. On short term counts with few reps it works fine. However, for long term counts it finds something extra in there and the distinct count is off by 2 instead of 1. This error only appears in the total field and not in the rep field.
I had also thought to use 1 and 0 and just sum the columns but since a contract can have several transactions in the transaction table that leads to multimpl 1's being added for the same rep. i.e. if bob had 3 transactions on a closed contract using 1's and 0's would count that as 3 instead of just 1.
Sorry for the long post but I wanted to accuratly explain my problem. So, any help? Thanks.