REPORT2

#### Search Results

Search

# REPORT2

Like the REPORT control the REPORT2 control is used to create report output. The report may include text information and table information. It may also have style definitions such as colors and highlighting of certain cells. Both controls support the same Adapter interface. Different to the REPORT control, it does not require to additionally render the data in the HTML pages.

The following topics are covered below:

- Example

- Built-in Events

- Properties

## Example

The REPORT2 control provides an automated conversion of the report output into a PDF document, and it allows the user to directly print the report on the client's printer or upload the report to Natural. For more information, see corresponding examples in the Natural for Ajax demos.

## Built-in Events

value-of-reportprop.onGeneratePDF - Assign this event to a button, hot key or other control if you want to trigger the PDF generation under control of the application.

value-of-reportprop.onGeneratePrintVersion - Assign this event to a button, hot key or other control if you want to trigger printing under control of the application.

value-of-reportprop.onUploadPDF - Assign this event to a button, hot key or other control if you want to upload the generated PDF to the Natural server. The PDF content will be added to the NJX:OBJECTS cache with "onUploadPDF" as the `CONTENTID`.

## Properties

Basic
reportprop | Name of the server side data representation of the control. | Obligatory |
name | A report can be downloaded as pdf file. If you specify a value, this value will be used as file name of the pdf file. Otherwise a default file name is used. | Optional |
nameprop | Name of the adapter parameter that dynamically defines the name of the pdf file. A report can be downloaded as pdf file. Use this property to dynamically define the file name. | Optional |
withwhitespacehandling | Set this property to true if white spaces in some of your report fields - like line breaks and spaces - need to be preserved. This will generate the two additional fields WHITESPACEPRESERVE and TABSPACES in the Natural data structure. You can use these fields to customize the white space handling in the report. | Optional | true false

### On this page

- Example
- Built-in Events
- Properties