4D Write Pro now supports picture expressions

Automatically translated from English

This blog post explores a 4D Write Pro-related functionality which will help you with the creation of complex documents, programmatically. Documents that can be either printed or sent by email.

An expression can now be a Picture! Handling pictures in your 4D Write Pro documents is becoming easier, offering vast possibilities. From now on, any expression returning a picture can be inserted. The most obvious cases are fields and variables, but it goes also for 4D functions and, last but not least, your own methods!

An example is worth a thousand words

Example Database

In this first example, vPicture is a picture variable.

ST INSERT EXPRESSION(*;"WParea";"vPicture";ST Start highlight;ST End highlight)

In this second example, [DOC]SamplePict is a picture field.

ST INSERT EXPRESSION(*;"WParea";"[DOC]SamplePict";ST Start highlight;ST End highlight)

In this third example, ComputeBarChart is a 4D method. This method generates and returns a bar chart picture.

ST INSERT EXPRESSION(*;"WParea";"ComputeBarChart";ST Start highlight;ST End highlight)

For more details, please refer to the ST INSERT EXPRESSION documentation. Please note that before using a 4D method in an expression, you first need to allow the usage of this method using the SET ALLOWED METHODS command.

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.