Help needed for displaying dynamic data

W

WB

I am developing a report that seems to be growing in complexity and I am now
faced with the most difficult part.

I have a transaction report that displays each transaction as a group.
Inside the group the detail section displays the associated line-items for
the particular transaction. Each line item is flagged as service or retail.

I want the total for each of these (service and retail) to display in the
footer. This is where I am having trouble. I have written an if else
statement in the detail format section that tests if the retail flag is
true. if it is true then I place the Line Total in an unbound text box
called txtRetailTotal. The problem is I don't seem to get anything but an
error when I put the following control and control data in the footer:
textbox98 ( control data is =Sum([txtRetailTotal]) ) My thought was this
should just total, for all the transactions, the amount of the retail line
items.

I hope I have clearly explained my problem and any suggestions are greatly
appreciated.

WB
 
M

Marshall Barton

WB said:
I am developing a report that seems to be growing in complexity and I am now
faced with the most difficult part.

I have a transaction report that displays each transaction as a group.
Inside the group the detail section displays the associated line-items for
the particular transaction. Each line item is flagged as service or retail.

I want the total for each of these (service and retail) to display in the
footer. This is where I am having trouble. I have written an if else
statement in the detail format section that tests if the retail flag is
true. if it is true then I place the Line Total in an unbound text box
called txtRetailTotal. The problem is I don't seem to get anything but an
error when I put the following control and control data in the footer:
textbox98 ( control data is =Sum([txtRetailTotal]) ) My thought was this
should just total, for all the transactions, the amount of the retail line
items.

You can not use aggregate functions on controls in the
report, they can only work with fields in the report's
record source table/query.

I think you may want to get rid of the code and use a text
box in the footer with an expression something like:

=Sum(IIf([Retail] = True, [Line Total], 0)

make sure to use your own field names in place of the names
I guessed at.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top