4D Write Pro: Document Creation by Programming

Automatically translated from English

One common usage of 4D Write was to create documents automatically, such as invoices, reports, orders, based on templates created or designed by the end user.

4D Write Pro v16 will support this usage with the new concept of bookmarks, that can be used to easily build new documents section by section.

Instead of using many separate documents as in 4D Write, it is now possible to use one complete document. The user selects ranges inside the document (like header line, invoice item, etc.) and gives them a name, i.e. bookmarks them. As a developer, you do not need to identify the range and copy them manually; you simply select document parts by using the named bookmarks.

4D Write Pro bookmarks

To ease the dynamic creation of documents by programming, the WP New command has been improved so that you can create a new document from a range. You can then re-inject the created document in another document using the WP INSERT DOCUMENT new command.

It is also possible now to get the total number of pages of a document using WP Get page count as well as inserting a line/section/page break in the document with three different modes (prepend, replace, append) using the WP INSERT BREAK command.

A video illustrating these features can be watched here:

The demo database that has been used for the video above as well as an example demonstrating how to use the new commands are available:

Demo Database

Example Database

To get all details about new commands and the bookmark concept, please take a look at the 4D Write Pro v16 reference manual:

Roland Lannuzel

• Product Owner & 4D Expert •

After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.

Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.