[Base] Can we connect a macro to a report?

Hi,

I've got a working report in Base (connected to a Query, the data source
being a Calc sheet).

This is an accounting report that groups data according to some code in
a column. A subtotal amount is accumulated for each group. I'm being
asked to add this subtotal in letters as well.

I've also got a macro that does just that, translating numbers into
letters. But, to date, I haven't found any mean to connect a report
field to a macro. I've looked at custom functions and can't find any
option anywhere.

So my question is: is this possible? And, if it is, how?

Thanks in advance,

You may want to look at LibreOffice Extension "numbertext" at http://extensions.libreoffice.org/extension-center/numbertext-1

NUMBERTEXT and MONEYTEXT are spreadsheet functions for number to number name and currency name conversion for more than 30 languages.

I am assuming that as a part of a Calc operation, it can be imported into base as a file field.

Not tried it myself but hope it helps.

It is possible to use Calc as reporting engine. Hit F4 and drag your
query onto a spreadsheet cell. When the database content changed, click
any cell in that import range and call menu:Data>Refresh.
The page layout is a bit tricky but with Calc's page preview you can
build amazing cell grid reports with sufficient formatting options,
calculations, conditional formattings, simple interactive filters, sort
orders and charts.

Thank Andreas, I know of that feature but I fail to see how, using Calc
data range, I can impose (random) page breaks when the group column
value changes.

Having the group field in A, column labels in first row.
Remove all manual page breaks
Add a calculated field outside the print area.
X3: =$A3=$A4
Search and select all 0 results in column X.
Insert page breaks.
And yes, you can write a simple Calc macro and add it to this Calc
document or template.