Location (location)

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

In the Properties view, this property is the Location property in the Image, Html, Pxml, or Pdf category.

Type: String (URL).

Location values must be valid URLs supporting the protocols "http", "file", and "data", for example:

file:///C:/Users/John Doe/Genero Report Writer Files/samples/OfficeStoreRes/images/office_logo.svg
You can specify the URL using:
  • The Browser window. 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 Expression Editor. Use an RTL expression to provide the document name. The file path can be absolute or relative, and it can use variables. For example: ./images/database/"+orderline.product.prodpic.trim()

Variables (RTL expressions) can be used if the file will change during processing, such as when the image file name is stored in the database and the value can change for each row processed. This is demonstrated in the "OrderReport.4rp" where the "ImageBox2" element has the expression "./images/database/"+orderline.product.prodpic.trim()"