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.

../../_images/OEReportLayout.png

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

NumRowsPerPage

set upon construction

integer greater than 0

columns per page

NumColsPerPage

set upon construction

integer greater than 0

page width

GetPageWidth

SetPageWidth / SetPageSize / SetPageOrientation

floating point number / OEPageSize / OEPageOrientation

page height

GetPageHeight

SetPageHeight / SetPageSize / SetPageOrientation

floating point number / OEPageSize / OEPageOrientation

page margins

GetPageMargin

SetPageMargin / SetPageMargins

OEMargin

cell gap

GetCellGap

SetCellGap

floating point number

header height

GetHeaderHeight

SetHeaderHeight

floating point number

header width

GetHeaderWidth

N/A

floating point number

footer height

GetFooterHeight

SetFooterHeight

floating point number

footer width

GetFooterWidth

N/A

floating point number

See also

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.

Default parameters of OEReportOptions

Property

Default value

rows per page

3

columns per page

2

page width

OEGetPageWidth ( OEPageSize_US_Letter )

page height

OEGetPageHeight ( OEPageSize_US_Letter )

margins

20.0 (for each margins: top, bottom, left and right)

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)
Example of report generation with default options (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_Default-1.png ../../_images/OEReportOptions_Default-2.png
OEReportOptions(rhs: OEReportOptions) -> OEReportOptions

Copy constructor.

GetCellGap

GetCellGap() -> float

Returns the space between the cells of the report.

See also

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.

GetFooterHeight

GetFooterHeight() -> float

Returns the height of the footer at the bottom of each page.

GetFooterWidth

GetFooterWidth() -> float

Returns the width of the footer at the bottom of each page.

GetHeaderHeight

GetHeaderHeight() -> float

Returns the height of the header at the top of each page.

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.

GetPageMargin

GetPageMargin(margin: int) -> float

Returns the size of a specific page margin of the report.

margin

This value has to be from the OEMargin namespace.

GetPageWidth

GetPageWidth() -> float

Returns the width of the page of the report.

NumColsPerPage

NumColsPerPage() -> int

Returns the number of columns on each grid page of the report.

NumRowsPerPage

NumRowsPerPage() -> int

Returns the number of rows on each grid page of the report.

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)
Example of using the SetCellGap method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetCellGap-1.png ../../_images/OEReportOptions_SetCellGap-2.png

See also

SetFooterHeight

SetFooterHeight(height: float) -> None

Sets the height of the footer at the bottom of each page.

height

This value has to be a non-negative number.

Note

0.0 means that a footer is not going to be created on the pages.

Example (Figure: Example of using the SetFooterHeight method)

opts = oedepict.OEReportOptions(3, 2)
opts.SetFooterHeight(100)
Example of using the SetFooterHeight method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetFooterHeight-1.png ../../_images/OEReportOptions_SetFooterHeight-2.png

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)
Example of using the SetHeaderHeight method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetHeaderHeight-1.png ../../_images/OEReportOptions_SetHeaderHeight-2.png

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)
Example of using the SetPageHeight method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageHeight-1.png ../../_images/OEReportOptions_SetPageHeight-2.png

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 OEMargin namespace.

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)
Example of using the SetPageMargin method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageMargin-1.png ../../_images/OEReportOptions_SetPageMargin-2.png

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)
Example of using the SetPageMargins method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageMargins-1.png ../../_images/OEReportOptions_SetPageMargins-2.png

SetPageOrientation

SetPageOrientation(orientation: int) -> None

Sets the orientation of the pages of the report.

orientation

This value has to be from the OEPageOrientation namespace.

Example (Figure: Example of using the SetPageOrientation method)

opts = oedepict.OEReportOptions(3, 2)
opts.SetPageOrientation(oedepict.OEPageOrientation_Landscape)
Example of using the SetPageOrientation method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageOrientation-1.png ../../_images/OEReportOptions_SetPageOrientation-2.png

SetPageSize

SetPageSize(pagesize: int) -> None

Sets the width and height of the pages of the report.

pagesize

This value has to be from the OEPageSize namespace.

Example (Figure: Example of using the SetPageSize method)

opts = oedepict.OEReportOptions(3, 2)
opts.SetPageSize(oedepict.OEPageSize_US_Legal)
Example of using the SetPageSize method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageSize-1.png ../../_images/OEReportOptions_SetPageSize-2.png

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)
Example of using the SetPageWidth method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageWidth-1.png ../../_images/OEReportOptions_SetPageWidth-2.png