[Solved] Changing Counter Start Value

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
One Big Yawn
Posts: 24
Joined: Sat Jul 14, 2012 6:09 am

[Solved] Changing Counter Start Value

Post by One Big Yawn »

I would like to assign each weekly report a sequential number based on the week it is produced (which will be generated based on parameters of beginning and end of the week, as there may be slight variation based on holidays). Our fiscal year begins June 1st, so it makes sense for that to be report 01.

Is there anyway to reset the counter based on the date? I thought I could use some sort of WEEK function, but this doesn't seem available in Base. :mrgreen:

Cheers
Last edited by One Big Yawn on Sat Aug 11, 2012 3:15 am, edited 1 time in total.
LibreOffice 3.5, MySQL 5.5, Windows 7
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Changing Counter Start Value

Post by eremmel »

Just a simple approach might be: populate a table with from/to dates and the week number. Use in the query the current_date to find the correct report/week number.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
Post Reply