Problem with totals in report


G

Guest

Hello there,

I have the following problem, I have created an report on base of the
ordertotal report from the northwind database. A User can select two date's
and all the order information between those two dates will be shown.
In the report I show for each record the orderid, article, prijs per item,
amount of items, VAT ammount (percentage), Ammount of VAT on the item
(valuta) , total price without VAT, total price with VAT. The last three
items in the report are unbound items with a formula. Now I can't get an
total result on one of the unbound formula's in the footer of the report.
Instead I get an parameter to be filled in. I cant get around this problem,
so any help would be apreachiated. When I want to do the calculating in the
Query i use for the report I get an error message :

YOU ARE TRYING TO PERFORM A QUERY FROM WHICH THE GIVEN EXPRESSION ORDER.ID
NO PART IS OF AN STATIC FUNCTION..
This appears only when I do the calculation also i the query, this has
nothing to to with the order id

here's the query:

PARAMETERS [Forms]![frmomzetrapportage]![Begindatum] DateTime,
[Forms]![frmomzetrapportage]![Einddatum] DateTime;
SELECT Orders.[Order-id], Orders.Orderdatum, Orderinformatie.Productnummer,
Orderinformatie.Hoeveelheid, Orderinformatie.[Prijs per eenheid],
Producten.[BTW Tarief], Producten.[Bedrag ex BTW], Producten.[BTW Bedrag]
FROM Producten INNER JOIN (Orders INNER JOIN Orderinformatie ON
Orders.[Order-id] = Orderinformatie.[Order-id]) ON Producten.Productnummer =
Orderinformatie.Productnummer
WHERE (((Orders.Orderdatum) Is Not Null And (Orders.Orderdatum) Between
[Forms]![frmomzetrapportage]![Begindatum] And
[Forms]![frmomzetrapportage]![Einddatum]));


thanks in advance
 
Ad

Advertisements

G

Guest

You can't Sum() a control name. You can Sum() an expression. You can possibly
use the expression used in your "unbound items with a formula".

Someone might be able to help if you posted the Control Sources of the
controls you want to sum.
 
Ad

Advertisements

G

Guest

Hi there Duan,

I've solved it already. I have put the different formula's in the underlying
query. Now they are summable in the report. But thanks for the thinking.

Duane Hookom said:
You can't Sum() a control name. You can Sum() an expression. You can possibly
use the expression used in your "unbound items with a formula".

Soomeone might be able to help if you posted the Control Sources of the
controls you want to sum.

--
Duane Hookom
Microsoft Access MVP


Peter said:
Hello there,

I have the following problem, I have created an report on base of the
ordertotal report from the northwind database. A User can select two date's
and all the order information between those two dates will be shown.
In the report I show for each record the orderid, article, prijs per item,
amount of items, VAT ammount (percentage), Ammount of VAT on the item
(valuta) , total price without VAT, total price with VAT. The last three
items in the report are unbound items with a formula. Now I can't get an
total result on one of the unbound formula's in the footer of the report.
Instead I get an parameter to be filled in. I cant get around this problem,
so any help would be apreachiated. When I want to do the calculating in the
Query i use for the report I get an error message :

YOU ARE TRYING TO PERFORM A QUERY FROM WHICH THE GIVEN EXPRESSION ORDER.ID
NO PART IS OF AN STATIC FUNCTION..
This appears only when I do the calculation also i the query, this has
nothing to to with the order id

here's the query:

PARAMETERS [Forms]![frmomzetrapportage]![Begindatum] DateTime,
[Forms]![frmomzetrapportage]![Einddatum] DateTime;
SELECT Orders.[Order-id], Orders.Orderdatum, Orderinformatie.Productnummer,
Orderinformatie.Hoeveelheid, Orderinformatie.[Prijs per eenheid],
Producten.[BTW Tarief], Producten.[Bedrag ex BTW], Producten.[BTW Bedrag]
FROM Producten INNER JOIN (Orders INNER JOIN Orderinformatie ON
Orders.[Order-id] = Orderinformatie.[Order-id]) ON Producten.Productnummer =
Orderinformatie.Productnummer
WHERE (((Orders.Orderdatum) Is Not Null And (Orders.Orderdatum) Between
[Forms]![frmomzetrapportage]![Begindatum] And
[Forms]![frmomzetrapportage]![Einddatum]));


thanks in advance
 

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