Report Calculations

J

J. Trucking

Hello All,

I am having some problems in writing calculations into my reports. I
have a query to which I have created a couple of my own expressions
(Expr1, Expr2, Expr3). These expressions calculate production values
for each record in the query. For example, Expr1 takes a field
relating to "Tonnes" and divides is by the "Hours" field to get
"Tonnes/Hour". I have inserted these expressions into the report and
when I run the query, everything works perfectly. The problem I am
having is that, in the report, I would like to take the "Tonnes/Hour"
for each record, and take the average of all of the "Tonnes/Hour"
displayed in the report. I tried to do this by creating a text box in
the footer of the report and having its value as: =Avg([Expr1]). As
soon as I do this, and try to run the query, I get an error that reads
"The expression is typed incorrectly or is too complex..." and the
report won't be generated. Any ideas where I'vegone wrong. Like I
said, when I remove the calculations that I created in the report,
everything works fine so I'm guessing my problem lies within the
report. As well, when I generate the report, sometimes it sets itself
up under "Portrait" layout, instead of "Landscape". I use a user
input form to run the query and preview the report. Is there some
code I can type in to always have the report preview in landscape
settings?

Thanks in advance,

John
 
K

KARL DEWEY

If you Expr1 is in the report then change it the footer textbox to
=Avg(Tonnes/Hour).
 

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