Ask Your Question
0

How would I get a report to accumulate the totals, but only for a specific period and the record required.(LO Base)

asked 2016-04-16 11:12:55 +0100

aL gravatar image

Hello I will start by mentioning that I am new to this kind of thing let alone sql queries etc. I was looking to get my business admin and accounts in order so decided to create a database using LO. Thanks to a few forums and The frugal computer guy, I have got so far with it and am quite pleased with it so far. I hope to make things more automatic in the future but for the moment typing the majority of date into create what i need will suffice.

I am trying to Generate some Pay Slips for my employees, and have managed to get the relevant tables, forms and a query built to produce the report. I have also got a report roughly designed and data being produced as I wish. I am struggling with the Year to Date Totals, where as I can get the employee totals calculated using an additional query and sorting by employee, but I wish to be able to calculate to totals with regards to the pay period, so when/if I need to print a payslip for an employee from a past period it does not show the present total. I can live with having the employees entire year showing in the result set to allow the accumulation part to work but am trying not to have to have a separate query and report for each employee, which I am thinking could be one way to achieve their gross totals, by sorting the report by period.

If anyone could spare a little time to help me with this issue it would be much appreciated. i have tried to upload a copy of my DB but need 3 points?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-05-02 22:57:29 +0100

Ratslinger gravatar image

updated 2016-05-03 01:00:27 +0100

Sorry for the time lapse in answering this. A parametrised Query may help you. You can duplicate your original Query and use a parameter to select only a single employee. You will have one Query for normal use & one for select employees. See Parameter Queries on that page.

Here is a test I ran. When the Query is run & a parameter input is necessary, the dialog will appear. Multiple parameters will bring a dialog up for each.

sample parameter

Be careful with dates. DB's usually need the internal format of YYYY-MM-DD. In this particular case I used 2016-04-16 for the value (although another test allowed 4/16/16). I know dates in SQL statements are strict.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2016-04-16 11:12:55 +0100

Seen: 428 times

Last updated: May 03 '16