Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique counts - subtotals
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00455221
Message ID:
00455317
Views:
33
Hi Diana,

While lots of thing could be done in Report Writer itself, it's usually a good practice to prepare necessary data before hand in one big cursor. This way you would be sure, you get, what you want.

I'd take this route, but YMMV.

Good luck.



>Thanks Mark, for the reply. However, this technique gives me not a unique count but a full count of all the visits for all the users. I'm sorry I did not make this more clear. I'm trying to get an unduplicated count from a table of visits of the clients who made those visits. I understand how to get a grand total by simply counting up the distinct ids before I even run the report, but I'm wondering if it's possible within the report to get an unduplicated count within the groupings using the group headers.
>
>Diana
>
>>>I'm trying to figure out how to give my clients a count of individuals from a report that shows visits. I understand the concept of:
>>>select count(distinct id) from mycursor into array aCount,
>>>
>>>but that only gives me the grand total. On my report I've got groups of Insurance Sponsors and then within those, groups of age ranges. I would like to give distinct counts within those groups. I'm assuming I can add variables to my report - aCount for one, but how do I refer to the group header variables? I'm thinking my subtotal counting variable would be updated at the 'on entry' part of the group header and would look something like:
>>>
>>>select count(distinct id) from mycursor into array aCount where nprimary = nprimary.
>>>
>>>The group header breakpoint is nprimary. I know this expression won't work because the report shouldn't know the difference between the nprimary references. Anyone have any ideas?
>>>
>>>TIA
>>>Diana
>>
>>Create a data grouping in your report. Copy one of the fields from the detail band into the group summary. Double-click on the field in the group summary band. Click the Calculations button. Check the Count box.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform