Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting distinct fields in data grouping report
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00521590
Message ID:
00521611
Views:
18
>Hi readers!,
>
> I have a data group report where I need to count how distinct shipments I made, but I don't know how to create a variable that only increments when a data group changes. Important do not use a view.
>
>My table:
> shipment lot qty
> 1511 123A 210
> 1511 121 100
> 1512 125 300
> 1513 145 300
> 1513 124 280
>
>I got the next result in my report
>
> Shipment qty
> 1511 310
> 1512 300
> 1513 580
>
> Total Shipments -> 5 (wrong must be 3 !)
> Qty -> 1190
>
>Regards
>Martin

If you set up a report that groups on 'Shipment', then you can use the Report menu tab to create a variable for your report called say 'UniqueShipments' and check the count option in the calculate box. Then pick the group that the count will be reset for. In your case Shipment. This should work if you use the variable in your report.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform