Create Nice Report


When designing a nice report I can add a textfield and the data for example is =InvoiceID

Or this: =InvoiceDate , and then format that field to show only the year, like YY.

This is also possible: [=InvoiceDate]&[=InvoiceID]

In the last example, is there a way to format the field InvoiceDate so it only shows the year combined with InvoiceID?



This should work (tested with my files & fields):

YEAR([InvoiceDate]) & " - " &  [InvoiceID]

producing this (used name not ID):

image description

Can easily do this with Function Wizard - use ellipsis at end of data field.

Of course you can eliminate the spaces and hyphen between fields or replace with something else.


If looking for two digit year this may be better:

RIGHT(YEAR([InvoiceDate]);2)  &  [InvoiceID]

Edit 2020-05/29:

This may make locating the Function Wizard clearer:

image description

This doesn’t seem to work for me.
Looking for a Function Wizard, I found this in LibreOffice Calc, not in LibreOffice Base.
I attached an example where I added a testfield in rpt_Invoice-pt2.odb78-Invoice-pt4c.odb


YEAR([InvoiceDate])-2000 & “-” &[InvoiceID]

Or even better:

RIGHT(YEAR([InvoiceDate]);2) & “-” &[InvoiceID]

I just notices I misplaced my brackets. Your solution was correct.