kafka1 wrote:
I have created a form and report but have not been able to get totals or
counts. I assume this is done via a query but my experimentation has got me
nowhere so far. Help, please!
The simple and maybe worthless answer is - there is both a COUNT and SUM function for queries. ( assuming you are using any of the relational database engines - a default Base database is one of these )

Have you looked up the function SUM, tried to use it and couldn't get it to work? ( The fact that an aggregate function, COUNT and SUM being two such, must exist in a query of only aggregate or grouping functions is a bit hard to get around at times. )

Is the problem that you can't tie the result into the form? This usually means a Form->SubForm->SubForm structure. ( Is the problem that you don't know how to add that second level SubForm? )

Is it that you want the Total value generated prior to a new record being posted to the database? ( In this case you need to use a script, called from an event on the form )

Totals in reporti- For a Report Wizard report then yes a query is the absolute best way. If a Report Builder report then usually you want to use the functions in the report engine instead of a query in the database.

I really don't mean to put you off, but there is no ONE way to do this, which way really depends on the context.

Also, I would strongly recommend a search on any of the web forums, the Base lists on all of them have been quite active since the OO.o 2.0 release and these specific questions in the different contexts (Sub totals / Totals on forms and reports ) have plenty of examples on them already.

Still if you can expand a bit on the problems you are having it will be easier to help you here.

Drew

--
OpenOffice.org User Community Forum: http://user.services.openoffice.org
United States PostgreSQL Association: http://www.postgresql.us/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to