4D Write Pro commands optimized again!
As each new version is released, we take into account the feedback we receive from our customers on the general use of 4D Write Pro and its commands. While remaining 100% compatible, some commands and language functions are evolving!
Some commands, whose syntax have been improved in 4D 20 R8, now allow the use of modern parameters such as objects or collections. Others are now functions, making them easier to use. Finally, a number of new functions have been created. All this will make your code simpler, more generic and easier to maintain!
New Option for the Command Formulas from string!
As a 4D developer, you’ve probably already created and used formulas. They can be created via two commands, Formula and Formula from string. The latter has just been enhanced in 4D v20 R3 to be used without limits from components!
4D Write Pro: Assign Names to Formulas
In 4D Write Pro documents, formulas are crucial and contribute significantly to their functionality. Previously, these formulas could be represented as values, expressions, or symbols.
However, to further enhance the user experience and improve readability, an exciting new feature with 4D v20 R3 has been introduced: the ability to assign names to formulas. This latest enhancement allows users to quickly identify and comprehend the purpose of each formula within the document.
4D Write Pro: User-friendly Display of Formulas
Formulas are an integral part of 4D Write Pro documents. They allow the integration of a lot of information coming from the database. Creating documents and templates that include formulas, combined to physical constraints (number of pages, paper size), can lead to non-wysiwyg designs. A new mode of displaying formulas is now available to facilitate this design.
Use 4D Write Pro to Create & Print a Batch of Documents
Whatever your business, you must create listings, inventories, tracking sheets, product sheets, invoices, and many other documents. These documents are usually printed or saved in PDF for archiving.
4D Write Pro is the ideal tool to create all your documents. Here is a list of several features available in 4D Write Pro that can help you make beautiful documents for printing:
- page layout and margin management for printing,
- pdf export,
- document protection,
- table creation,
- table formatting with repeated headers,
- definition of a data context,
- inserting ORDA formulas in a table (new in 4D v19 R6).
Using these different features, here are some examples of documents produced.
The Use of Formulas in Collections & Callback Commands
When you use collections with a member method that needs a callback method, many of you have asked us for a more straightforward way.
You asked; we delivered!
Starting with 4D v19 R6, 4D allows you to use a formula to define a callback in the collection member functions, the EXECUTE METHOD IN SUBFORM, CALL FORM, and CALL WORKER commands. If you can reduce your code to a simple expression, you can pass it directly into the formula without using a method.
4D Write Pro: Dynamically Fill Tables with Entity Selections & Collections
As developers, we often create complex and advanced 4D Write Pro documents. We may generate tables that need to be filled from a data source, and we may not be sure of the exact rows and columns. Manually filling the tables with data every time is a laborious task. We heard you, and here is where data context comes as an invaluable option, opening the world of ORDA and object-oriented development to 4D Write Pro documents.
It is now possible to define a “datasource” for the tables of 4D Write Pro. Whether it is an entity selection or a collection, this “datasource” will automatically feed the rows of these tables.
Let’s delve into the details!
4D Write Pro: Where are my formulas?
When a 4D Write Pro document contains external elements resulting from expressions or formulas, they are visible when the “Display expressions” mode is used. Still, they are blended into the text when the values are displayed. This is what you want for a final document, but it is sometimes useful to easily view these calculated values while writing the document. Well, 4D v19 R3 is giving you new display options for this purpose!
4D Write Pro – More control when using formulas
As a 4D Write Pro user, you’ve most likely used expressions (or more recently, formulas) to automatically fill in certain parts of your documents. These formulas can return “raw” text or images. In the case of text, they may contain line breaks. The question is how should these line breaks be handled when they are processed inside 4D Write Pro documents? This blog post provides the answers … keep reading!
4D Write Pro and formulas
With 4D v18 R2, 4D Write Pro is able to manage formula objects inside documents. To do so, four new commands have been created: WP Get formulas, WP Insert formula, WP Compute formulas, and WP Freeze formulas. They all can be used with intuitive targets like document, body, headers, etc. And as you may have guessed from the command names, formulas are no longer text expressions but powerful formula objects!
Contact us
Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!
* Your privacy is very important to us. Please click here to view our Policy