VFP 7.0
I have a data file with 2 datatype fields and 10 numeric fields
I can sum the numeric fields in a report but cannot count where numeric value > 0.00 -- it ignores the statement '> 0.00' & just counts every record
& I cannot get a query to work either!
I really need to export a cross tab to excel looking like this:

data group 1- subgroup1 ---countnumfield1 --- sumnumfield1 ---
countnumfield2 -- sumnumfield2 --- countnumfield3 --sumnumfield3 & so on!

I need to count & sum only where the numericvalue is > 0.00

Thank you big time!



Joe Robison
--
Datamail
Kansas City MO 64114
816-523-0222

Re: How to summarize & count by Cindy

Cindy
Thu Aug 05 08:37:28 CDT 2004

Hi Joe,

Try something like Summing IIF(Value > 0, 1, 0) as your report variable.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden@mvps.org www.cindywinegarden.com


"Joe Robison" <JoeRobison@discussions.microsoft.com> wrote in message
news:BDFB26CC-4046-4904-9EF2-4FA86735C4D7@microsoft.com...
> VFP 7.0
> I have a data file with 2 datatype fields and 10 numeric fields
> I can sum the numeric fields in a report but cannot count where numeric
> value > 0.00 -- it ignores the statement '> 0.00' & just counts every
> record
> & I cannot get a query to work either!
> I really need to export a cross tab to excel looking like this:
>
> data group 1- subgroup1 ---countnumfield1 --- sumnumfield1 ---
> countnumfield2 -- sumnumfield2 --- countnumfield3 --sumnumfield3 & so on!
>
> I need to count & sum only where the numericvalue is > 0.00




Re: How to summarize & count by TonySper

TonySper
Thu Aug 05 10:45:51 CDT 2004

Count to howmany for hourfee > 0.00 Works for me.
TonySper

"Joe Robison" <JoeRobison@discussions.microsoft.com> wrote in message
news:BDFB26CC-4046-4904-9EF2-4FA86735C4D7@microsoft.com...
VFP 7.0
I have a data file with 2 datatype fields and 10 numeric fields
I can sum the numeric fields in a report but cannot count where
numeric value > 0.00 -- it ignores the statement '> 0.00' & just
counts every record
& I cannot get a query to work either!
I really need to export a cross tab to excel looking like this:

data group 1- subgroup1 ---countnumfield1 --- sumnumfield1 ---
countnumfield2 -- sumnumfield2 --- countnumfield3 --sumnumfield3 & so
on!

I need to count & sum only where the numericvalue is > 0.00

Thank you big time!



Joe Robison
--
Datamail
Kansas City MO 64114
816-523-0222



RE: How to summarize & count by JoeRobison

JoeRobison
Thu Aug 05 16:19:02 CDT 2004

I am a neophyte & do not really understand how to establish variables,
remember them & then use them in a crosstab or report

I understand the count to statement but do not know what to do with the
variable

Thanks
Joe

Re: How to summarize & count by Sietse

Sietse
Thu Aug 05 17:18:03 CDT 2004

Hi Joe,

>I really need to export a cross tab to excel looking like this:

>data group 1- subgroup1 ---countnumfield1 ---
umnumfield1 ---countnumfield2 -- sumnumfield2 ---
countnumfield3 --sumnumfield3 & so on!

Sounds like you just want to create a query like this:

SELECT datagroup1, subgroup1, SUM(nField1), SUM(nField2), SUM(nField3),....
, SUM(nField10) FROM tablename INTO CURSOR csrResult ORDER BY datagroup1,
subgroup1 GROUP BY datagroup1, subgroup1

COPY TO Result TYPE XL5
HTH,

Sietse Wijnker


HTH,
Sietse Wijnker



"Joe Robison" <JoeRobison@discussions.microsoft.com> wrote in message
news:48F62994-7E6F-454B-9924-B549FD4C205D@microsoft.com...
> I am a neophyte & do not really understand how to establish variables,
> remember them & then use them in a crosstab or report
>
> I understand the count to statement but do not know what to do with the
> variable
>
> Thanks
> Joe