counting specific entries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

here is my info....
report with detail
2 Footers
1 page footer
1 report footer
the 2 footers create lines like this;
4066 5 E 282 $253.80
4066 4 L 2061 $1854.90
4066 2343 $2108.70
4067 3 E 457 $411.30
4067 5 L 2195 $1975.50
4067 2652 $2386.80

I need a way to total in the report footer the totals from the E's and a
total from the L's. If i try to just create a textbox with =Sum ( [text61] )
on the Report Footer, i always get prompted for text61 value on the start of
the report being run.
Thanks
 
ld-runner said:
here is my info....
report with detail
2 Footers
1 page footer
1 report footer
the 2 footers create lines like this;
4066 5 E 282 $253.80
4066 4 L 2061 $1854.90
4066 2343 $2108.70
4067 3 E 457 $411.30
4067 5 L 2195 $1975.50
4067 2652 $2386.80

I need a way to total in the report footer the totals from the E's and a
total from the L's. If i try to just create a textbox with =Sum ( [text61] )
on the Report Footer, i always get prompted for text61 value on the start of
the report being run.


The aggregate fnctions only operate on **fields** in the
form/report's record source table/query, so that's why you
are having a problem with that.

I think the Report Footer text box can use expressions like:

=Sum(IIf(xxx = "L", amount, 0))
 
thanks, my solution was this...
=Sum(Abs([loaded]="E")*[pay_distance])
and
=Sum(Abs([loaded]="L")*[pay_distance])

Marshall Barton said:
ld-runner said:
here is my info....
report with detail
2 Footers
1 page footer
1 report footer
the 2 footers create lines like this;
4066 5 E 282 $253.80
4066 4 L 2061 $1854.90
4066 2343 $2108.70
4067 3 E 457 $411.30
4067 5 L 2195 $1975.50
4067 2652 $2386.80

I need a way to total in the report footer the totals from the E's and a
total from the L's. If i try to just create a textbox with =Sum ( [text61] )
on the Report Footer, i always get prompted for text61 value on the start of
the report being run.


The aggregate fnctions only operate on **fields** in the
form/report's record source table/query, so that's why you
are having a problem with that.

I think the Report Footer text box can use expressions like:

=Sum(IIf(xxx = "L", amount, 0))
 
That's a little more obscure than the one I posted.
However, they are equivalent so it's your call.

I do have to wonder why you posted the question when you
already had an answer or was it the case that you found an
answer after you posted and forgot to close out your thread?
--
Marsh
MVP [MS Access]


ld-runner said:
thanks, my solution was this...
=Sum(Abs([loaded]="E")*[pay_distance])
and
=Sum(Abs([loaded]="L")*[pay_distance])

ld-runner said:
here is my info....
report with detail
2 Footers
1 page footer
1 report footer
the 2 footers create lines like this;
4066 5 E 282 $253.80
4066 4 L 2061 $1854.90
4066 2343 $2108.70
4067 3 E 457 $411.30
4067 5 L 2195 $1975.50
4067 2652 $2386.80

I need a way to total in the report footer the totals from the E's and a
total from the L's. If i try to just create a textbox with =Sum ( [text61] )
on the Report Footer, i always get prompted for text61 value on the start of
the report being run.
Marshall Barton said:
The aggregate fnctions only operate on **fields** in the
form/report's record source table/query, so that's why you
are having a problem with that.

I think the Report Footer text box can use expressions like:

=Sum(IIf(xxx = "L", amount, 0))
 
Back
Top