Ask Your Question

Create Nice Report

asked 2020-05-28 15:52:32 +0100

Tripple Delta gravatar image

updated 2020-05-29 08:32:10 +0100


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?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-05-29 00:48:17 +0100

Ratslinger gravatar image

updated 2020-05-30 01:57:44 +0100


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

edit flag offensive delete link more


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.C:\fakepath\odb78-Invoice-pt4c.odb

Tripple Delta gravatar imageTripple Delta ( 2020-05-29 08:30:50 +0100 )edit


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

Or even better:

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

Tripple Delta gravatar imageTripple Delta ( 2020-05-29 11:38:13 +0100 )edit

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

Tripple Delta gravatar imageTripple Delta ( 2020-05-29 11:43:31 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-05-28 15:52:32 +0100

Seen: 67 times

Last updated: May 30 '20