Reports¶
Applications
Typically used to print reports related to the operation of a Q Application, for example, process data, statistical data, etc.
Configure the object
Set the layout
The page layout setting concerns all the report pages.
In Page size, set the desired format.
In Page orientation set the desired orientation.
In Left margin, Top margin, Right margin and Bottom margin, set the desired margins in centimeters. .. note:: when adding objects in Header, Sections and Footer by setting a value for the page margins they are automatically placed within the set margins.
Add a section for graphic or text content
In the Report object, right-click Sections, then click New and select Panel section.
Right-click the Panel Section object, select New, then select the desired graphical object.
Repeat the previous step for all the desired graphical objects.
Customize the appearance, size and position of graphical objects through their properties.
Add graphic or text content
In the Report object, right-click Sections, then click New and select Panel section.
Right-click the Panel Section object, select New, then select the desired graphical object.
Repeat the previous step for all the desired graphical objects.
Customize the appearance, size and position of graphical objects through their properties.
Add a Data grid
If you want to add a table that presents data from a database in the report, do the following:
In the Report object, right-click Sections, then click New and select Data grid section.
In the Data grid section object properties, set the source of the data to be displayed and the desired columns (see Data grid).
Note
in the PDF, the table size and column width are automatically set based on the width of the Data grid.
Properties¶
Name |
BrowseName |
DataType |
Description |
---|---|---|---|
Page size | PageSize |
Document page layout format |
|
Page orientation | PageOrientation |
Vertical or horizontal orientation of the layout |
|
Page width | PageWidth |
Width of the document page |
|
Page height | PageHeight |
Height of the document page |
|
Width |
|||
Height |
|||
LeftMargin |
|||
RightMargin |
|||
TopMargin |
|||
BottomMargin |
|||
Visible |
|||
Enabled |
|||
Opacity |
|||
Rotation |
|||
StyleSheet |
|||
ContentAlignment |
|||
HorizontalAlignment |
|||
VerticalAlignment |
|||
Page count | PageCount |
Print reference of the total number of pages in the report |
|
Page number | PageNumber |
Print reference of the current page number |
|
Print time | PrintDateTime |
Print reference of the print date and time |
|
Header | Header |
Report header, repeated on each page |
|
Sections | Sections |
Sections of the report, that is, Panel Section, Data Grid Section and Page Break objects |
|
Footer |
Report footer, repeated on each page |
Methods¶
Generate PDF¶
BrowseName: GeneratePdf
Generates the report in PDF format and saves it in the file system.
InputArguments
Name |
DataType |
Description |
---|---|---|
OutputPath |
ResourceUri |
Location in the file system where the report PDF and relative filename is to be saved (e.g., %APPLICATIONDIR%/MyReport.pdf) |
LocaleId |
String |
Locale of the report (e.g., translations, unit of measurement, formatting). |
OutputArguments
Name |
DataType |
Description |
---|---|---|
OperationId |
Guid |
Events¶
PDF generated¶
BrowseName: GeneratePdfCompletedEvent
The Generate PDF method of a Report object was run.