OEReportOptions
class OEReportOptions
This class represents the OEReportOptions class that encapsulates properties that determine the layout of a OEReport object.
See Figure: Schematic representation of documents that can be created using the OEReport class.
Schematic representation of documents that can be created using the OEReport class
The OEReportOptions class stores the following properties:
Property
Get method
Set method
Corresponding namespace / class / type
rows per page
set upon construction
integer greater than 0
columns per page
set upon construction
integer greater than 0
page width
floating point number /
OEPageSize/OEPageOrientationpage height
floating point number /
OEPageSize/OEPageOrientationpage margins
cell gap
floating point number
header height
floating point number
header width
N/A
floating point number
footer height
floating point number
footer width
N/A
floating point number
See also
OEReport class
Constructors
OEReportOptions(rowsperpage: int = 3, colsperpage: int = 2) -> OEReportOptions
- rowsperpage
The number of rows on each grid page of the report.
- colsperpage
The number of columns on each grid page of the report.
Note
Both the number of rows and columns per page have to be greater than 0.
Property |
Default value |
|---|---|
rows per page |
3 |
columns per page |
2 |
page width |
|
page height |
|
margins |
|
cell gap |
5.0 |
header height |
0.0 (no header is generated by default) |
footer height |
0.0 (no footer is generated by default) |
Example (Figure: Example of report generation with default options)
opts = oedepict.OEReportOptions(3, 2)
|
|
OEReportOptions(rhs: OEReportOptions) -> OEReportOptions
Copy constructor.
GetCellGap
GetCellGap() -> float
Returns the space between the cells of the report.
See also
OEReportOptions.SetCellGapmethod
GetCellHeight
GetCellHeight() -> float
Returns the height of the cells on the grid pages of the report.
Note
The height of the cells depends on the number of rows per page, the top and bottom margins, header and footer heights, and the gap between the cells
GetCellWidth
GetCellWidth() -> float
Returns the width of the cells on the grid pages of the report.
Note
The width of the cells depends on the number of columns per page, the left and right margins, and the gap between the cells.
GetHeaderHeight
GetHeaderHeight() -> float
Returns the height of the header at the top of each page.
See also
GetHeaderWidth
GetHeaderWidth() -> float
Returns the width of the header at the top of each page.
GetPageHeight
GetPageHeight() -> float
Returns the height of the page of the report.
See also
GetPageMargin
GetPageMargin(margin: int) -> float
Returns the size of a specific page margin of the report.
- margin
This value has to be from the
OEMarginnamespace.
See also
GetPageWidth
GetPageWidth() -> float
Returns the width of the page of the report.
See also
OEReportOptions.SetPageWidthmethod
NumColsPerPage
NumColsPerPage() -> int
Returns the number of columns on each grid page of the report.
See also
NumRowsPerPage
NumRowsPerPage() -> int
Returns the number of rows on each grid page of the report.
See also
SetCellGap
SetCellGap(size: float) -> None
Sets the space between the cells of the report.
- size
This value has to be a non-negative number.
Example (Figure: Example of using the SetCellGap method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetCellGap(100)
|
|
See also
OEReportOptions.GetCellGapmethod
SetHeaderHeight
SetHeaderHeight(height: float) -> None
Sets the height of the header at the top of each page.
- height
This value has to be a non-negative number.
Note
0.0 means that a header is not going to be created on the pages.
Example (Figure: Example of using the SetHeaderHeight method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetHeaderHeight(100)
|
|
See also
SetPageHeight
SetPageHeight(height: float) -> None
Sets the height of the pages of the report.
- height
This number has to be greater than 0.0.
Example (Figure: Example of using the SetPageHeight method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetPageHeight(opts.GetPageHeight() * 0.50)
|
|
See also
OEReportOptions.SetPageSizemethodOEReportOptions.GetPageWidthmethod
SetPageMargin
SetPageMargin(margin: int, size: float) -> None
Sets the size of a specific page margin of the report.
- margin
This value has to be from the
OEMarginnamespace.- size
This value has to be a non-negative number.
Example (Figure: Example of using the SetPageMargin method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetPageMargin(oedepict.OEMargin_Left, 100)
opts.SetPageMargin(oedepict.OEMargin_Right, 100)
|
|
See also
SetPageMargins
SetPageMargins(size: float) -> None
Sets the size of all the margins of the report.
- size
This value has to be a non-negative number.
Example (Figure: Example of using the SetPageMargins method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetPageMargins(100)
|
|
See also
SetPageOrientation
SetPageOrientation(orientation: int) -> None
Sets the orientation of the pages of the report.
- orientation
This value has to be from the
OEPageOrientationnamespace.
Example (Figure: Example of using the SetPageOrientation method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetPageOrientation(oedepict.OEPageOrientation_Landscape)
|
|
See also
OEReportOptions.SetPageSizemethodOEReportOptions.SetPageWidthmethod
SetPageSize
SetPageSize(pagesize: int) -> None
Sets the width and height of the pages of the report.
- pagesize
This value has to be from the
OEPageSizenamespace.
Example (Figure: Example of using the SetPageSize method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetPageSize(oedepict.OEPageSize_US_Legal)
|
|
See also
OEReportOptions.SetPageWidthmethod
SetPageWidth
SetPageWidth(width: float) -> None
Sets the width of the pages of the report.
- width
This number has to be greater than 0.0.
Example (Figure: Example of using the SetPageWidth method)
opts = oedepict.OEReportOptions(3, 2)
opts.SetPageWidth(opts.GetPageWidth() * 0.50)
|
|
See also
OEReportOptions.SetPageSizemethod