Mail Merge with Grouping

Hello,
I need to mail merge with grouping feature i.e. I wish to generate invoice bills of customers and if there are more than one rows of a customer, it should be on the same page. Is there any way to achieve this in libreoffice writer or if it is not currently available, I would like to quote feature request in next release.

Thanks
Girish Sharma

Database reports can produce invoices with grouped items in the page header and tabular content in the details section plus some fixed labels.
Problems:

  1. DIfficult text layout. Writer’s database fields have variable width and inherit the surrounding character style.
  2. Unless you pull all the content out of database records, you have to do manual additions in a merged output document before printing.
  3. Unusual user interface where the invoice model is embedded in a Base document.

In many cases (with lesser aesthetic ambitions) Calc is a better report engine.
For a single invoice you can easily link the horizontal receipient record to a non-printable area and reference this record in the (vertical) address field in the print range.
Linked database ranges can be set up with automatically adjusting formula ranges. No macro required.
Multiple invoice printing would require some macro code (very simple, few lines of code).

P.S. Tutorial: Registered databases in Calc

This a typical job for a more sophisticated tool than "simple mail merge.

You should consider stuffing your business data into a database. LO has an interface to various databases (embedded or not, like SQLite, PostgreSQL, MariaDB, MySQL, …). The interface component is called Base. It comes with a pretty easy-to-use powerful report generator. It can create Writer documents from database records in a similar way as mail merge.

Mail merge implies an existing Base document, even if that document is linked to a file based database (text, sheets, dBase). Reports and dynamic import ranges work with all types of (pseudo-)databases.
There is one issue with spreadsheet databases though. You have to restart the whole office suite before you see modified data on database level.

Actually, I am replacing the need of report writer software because I think report writing and mail merge are almost same. For the sake of learning, I found this link :
https://support.microsoft.com/en-au/topic/how-to-use-mail-merge-to-create-a-list-sorted-by-category-in-word-2000-8a37d361-665d-edde-0ac8-d4bd7e700331
and it worked. So I think similar user friend functionality will boost the productivity of LO too.

How is that more user friendly than LibreOffice? The only difference is that MS iis guessing the content of some “data file” whereas LO is explicitly connected to some tabular data source which may be a file or a true database. Once set up (less than a minute), Writer’s “data file” is always a database document.
P.S. and yes, MS does the grouping in that strange scripting language. A Base report does this more user friendly.