General information
Category:
Reports & Report designer
Hi Mark,
The data grouping I'm using works just great. The problem is that I can only count the visits, not the unique clients. When I use the technique you describe, the report counts all the rows of data in my cursor (as it should), so I can only get total visits.
Diana
>What code distinguishes children from adults? Do you have a data grouping on child/adult? It looks like you have a data grouping on Primary Insurance. You can do this without SQL by following my advice in my first reply to you. Put a field from the detail band in each group footer. Double click the field. Click the Calculations button. Check the COUNT box and make sure the RESET when grouping value changes is set to the correct grouping value.
>
>
>>The data looks something like this:
>>
>>ID Visit Date Primary Insurance Age
>>___ __________ _________________ ___
>>1 12/19/00 BC 12
>>1 12/20/00 BC 12
>>1 12/21/00 BC 12
>>2 12/18/00 MC 3
>>2 12/19/00 MC 3
>>3 12/17/00 007 24
>>4 12/17/00 BC 15
>>4 12/18/00 BC 15
>>4 12/19/00 BC 15
>>5 12/18/00 BC 36
>>5 12/19/00 BC 36
>>
>>The Report looks like this:
>>
>>Insurance report - clients by sponsor
>>
>>BC
>> Children:
>> 1 12/19/00
>> 1 12/20/00
>> 1 12/21/00
>> 4 12/17/00
>> 4 12/18/00
>> 4 12/19/00
>> Total Children (visits): 6
>>
>> Adults:
>> 5 12/18/00
>> 5 12/19/00
>> Total Adults (visits): 2
>>
>>Total BC Visits: 8
>>
>>etc...
>>
>>What I want to do is include in the subtotals the unduplicated counts. The ID refers to a client, so the subtotals above would be 2 children under BC and 1 adult under BC. I understand how to do an unduplicated count outside of the report using the count(distinct id) concept on the cursor I'm using for the report and just adding that variable to my report, but I would only then get a count of the individual clients at the bottom of my report. I'm wondering how to get the subtotals to show unduplicated counts. Using an array of variables that I calculate outside of the report seems to be the way to go, but I don't know how to let the report writer know which group is which variable (IE BC, 007, etc.)
>>
>>Diana
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only