Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counts
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Counts
Miscellaneous
Thread ID:
00304595
Message ID:
00304595
Views:
54
I'm trying to create a variable in the vfp5.0 report writer to add rows of figures, which are acutally variables created from a field containg character data, (ie: "P", "S", "C", or blank)

This report has a data grouping, and this group is based on a field called "booked_to", which represents a stallions name.

I'm trying to count the number of mares booked to each stallion.

ie:

Stallion: Paid Syn Comp Total

Arturo 25 25 5 55

Big Towner 25 25 0 55 **wrong total, should be 50


I have one field called p_s_c, and it is a character field, one character in length.

It can have values of "P", "S", "C", or blank.

My report has four columns:
1. "Name" = name of horse
2. "Paid" = "P"
3. "SYN" = "S"
4. "COMP" = "C"

the variable for the second column is named "mpaid", and here is the code in the "value to store in variable" expression builder box, "iif(mastertemp.p_s_c = "P",1,0)".

The "calculate option group" is set to "sum".

The same goes for the rest.

The report lists the numbers in the "Paid", "Syn", and "Comp" fields correctly, but still adds mares for Big Towner that have no entry.

In other words there are 55 mares booked to Big Towner, but five of those mares do not have any dat in the p_s_c field. They are not counted in the "Comp" column, but are counted in the "Total" column, why?

Any suggestions.

Thanks,

Jim Harvey
jharvey@netrax.net
Next
Reply
Map
View

Click here to load this message in the networking platform