Hi,
I've looked, read and studied a bunch of things, but I can't seem to get the information I want: How can I show the total value of the current form? I get the total of all forms, not the current one. Can someone tell me how to do this?
I want the listbox "Coûtant" in form "F_GestionBijou" to show the total of the current items selected. The names and various entries are all rubbish, I just want to get the structure to work. I'll deal with the actual values later.
Thank you.
[Solved] Show running total of value
Re: Show running total of value
With "o show the total of the current items selected" you mean the data of the grid? Put your Coûtant in the same (sub)form/formulaire with help of the Form Navigator.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
W11 22H2 (build 22621), LO 7.4.2.3(x64)
Re: Show running total of value
Thank you for your response. That is exactly what I mean. I've tried that, it gives the same result.
OpenOffice 4.1.3 on Windows 7
Re: Show running total of value
You need a different subform for this with the right query. See attachment.
- Attachments
-
- 002a.odb
- Sub-total
- (84.59 KiB) Downloaded 149 times
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
W11 22H2 (build 22621), LO 7.4.2.3(x64)
Re: Show running total of value
Perfect! Now I can use this elsewhere. Thank you!
OpenOffice 4.1.3 on Windows 7
Re: [Solved] Show running total of value
Please do not take the route of private message to discuss your (sub question).
When you get an error mention the error as well. People helping here have some technical experience but lack supernatural knowledge (there are other forums for that).
You should start study a few things about SQL like GROUP BY. Each SELECT-expression that is not an aggregation function (like SUM() ) should be part of the GROUP BY clause as well. So your query might become:
But this does not sum up anything and you need now a double relation on your sub form. I guess you need
I never design my SQL with the GUI interface for it is limited and I do not understand the logic. With the change you made to the query you missed the analogy between my example and what you did: no Function sum over your expression in Field.
When you get an error mention the error as well. People helping here have some technical experience but lack supernatural knowledge (there are other forums for that).
You should start study a few things about SQL like GROUP BY. Each SELECT-expression that is not an aggregation function (like SUM() ) should be part of the GROUP BY clause as well. So your query might become:
Code: Select all
SELECT sum("T_BijouDetail"."Qte" * ("T_Item"."PrixQte" / "T_Item"."QteAchat")) as "Price"
, "T_BijouDetail"."ID_Bijou"
, "T_Item"."ID"
FROM "T_BijouDetail", "T_Item"
WHERE "T_BijouDetail"."ID_Item" = "T_Item"."ID"
GROUP BY "T_BijouDetail"."ID_Bijou" , "T_Item"."ID"
Code: Select all
SELECT sum("T_BijouDetail"."Qte" * ("T_Item"."PrixQte" / "T_Item"."QteAchat")) as "Price"
, "T_BijouDetail"."ID_Bijou"
FROM "T_BijouDetail", "T_Item"
WHERE "T_BijouDetail"."ID_Item" = "T_Item"."ID"
GROUP BY "T_BijouDetail"."ID_Bijou"
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
W11 22H2 (build 22621), LO 7.4.2.3(x64)