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!

COUNT TOTALS ON THE REPORT 2

Status
Not open for further replies.

cristi22

MIS
Aug 17, 2005
155
US
Really, appreciate your help!

CRYSTAL 8
DB2 (back end)

This following data indicates that there were 2 checks issued.

My report shows only 1…. L

Code:
CHECK     CHECK_STATUS ISSUED_DATE WHT_TYPE WHT_AMT     AMT_NET      STATE         
--------- ------------ ----------- -------- ----------- ------------ ---------------
515092    V            06/10/2005  FEDM            0.00      -405.14 GA             
515092    V            06/10/2005  FICA          -25.12      -405.14 GA             
515092    V            06/10/2005  GAS           -24.31      -405.14 GA             
515092    V            06/10/2005  MED            -5.87      -405.14 GA             
515092    P2           06/10/2005  FEDM            0.00       405.14 GA             
515092    P2           06/10/2005  FICA           25.12       405.14 GA             
515092    P2           06/10/2005  GAS            24.31       405.14 GA             
515092    P2           06/10/2005  MED             5.87       405.14 GA

My report is grouped by STATE, ISSUED_DATE, CHECK_STATUS & CHECK
Neither count distinct or running total would work

If the check number is the same but status is diffident, the count should be reset

The count should be = 2 in this case

Is there a way to set up a formula with variables?
Something like:

Code:
Dim a As Number
If check_status = "V" then a = countdistinct (check) else
If "P2" then countdistinct (check)……

Thanks all!
 
Since you didn't state WHERE you want ti display thhis count, it's hard to be certain of the solution.

I'd reverse the grouping for:

CHECK_STATUS & CHECK

You can then right click the CHECK_STATUS field in the details and select insert->summary->distinct count and select the check field for where to place the distinct count.

-k
 
thanks for a fast response!

I need to display the summary for every state & on the report summary

I can't use distinct - it'll give me a count of 1
How do I reverse the grouping w/o messing up the report?
 
In your report design canvas, click and drag the section you want moved. In this case, click and hold the check group and drag it above the status. or vice-versa

-lw
 
Another approach would be to create a formula of:

{table.checkstatus} + " - " +{table.check}

Now base a Running Total on the distinct of this formula, and have it reset at State.

You can then create another as the grand total by setting the reset to never.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top