Location (location)

The Location property specifies the URL for a document, such as an image, HTML file, PXML file, or PDF.

You can specify the URL using:
  • The Browser dialog. Click the ... button and select the document.
    Note: The path appears to be an absolute value, but this is true only if the project remains in the same location. If you copy the project elsewhere, this file URI is recalculated.
  • The RTL Expression Editor. The file path can be absolute or relative. The expression can use variables to allow the file to change during processing, such as when the image file name is stored in the database and the value can change for each row processed.

Type: String.

The value must be a URL supporting the protocols "http", "file", and "data", for example:

file:///C:/Users/John Doe/Genero Report Writer Files/samples/OfficeStoreRes/images/office_logo.svg

This property is mandatory. An error will occur if the value is not set.

You can find the Location property in the Image, Html, Pxml, or Pdf category of the Properties view.

Example

In the OrderReport demo application, open the OrderReport.4rp report and select the ImageBox2 element, as in Figure 1. The Location property uses the expression:

./images/database/"+orderline.product.prodpic.trim()
Figure: Select Image Box

Drawing shows how to select the ImageBox2 element in the OrderReport demo