Reports

Reports allow users to display their data using widgets informing the reader simply and objectively about all relevant issues, summarizing the key points of data analysis across a series of pages. Reports can be then exported as PDF files, making them simple to distribute and share.

To start customizing their reports, users need to select the Reports tabs located in the stage left panel. The exporting operation of a PDF report can be performed by using the Report event type linked to a widget.

Warning

Please bear in mind that only Plots, Table, Gauges, Images and Graphics widgets can be included in reports. Otherwise, your report won’t be exported.

To create a report and add a page to it, read the following prerequisites and follow these instructions below:

Prerequisites

Procedure

  1. Select the Reports tab.

  2. Click on the plus icon in the top-right corner of the Reports panel to create a new report in the view.

  3. Click the Add page icon in the reports toolbar to add a new page.

Note

Please note that, when users right-click in a page of a report, the page context menu will show only one option: Paste.


Report Auto-sizing

In Rulex Studio reports, the distance between widgets is maintained in proportion to the dimensions of the page when exporting the report, and this concept is known as relative distance. For example, if two plots are placed side by side on a report page, they will preserve their original relative distance in the exported report.

For more information on resizing widgets within a report, please click here.

Note

Please note that, initially, the table can appear with specific dimensions on the report page, but these dimensions may differ in the exported report. Since the exported PDF report does not include scrollbars, the table will automatically extend to display all available rows. This behavior applies only to height dimension of Table family widgets when exporting reports.

Just like other widgets, tables respect the relative distance mechanism. Therefore, any widget placed below a table will be repositioned in the exported PDF according to its original relative distance from the table.

Warning

If your table contains many columns that cannot be fully displayed on the report page, they won’t be fully visible in the exported PDF either. Please note that table widths in reports are fixed and cannot be adjusted.


Reports Toolbar

Located at the top of the report stage, the toolbar displays essential buttons for managing key report operations, as listed below:

  • backward Previous page: it navigates back to the previous page of the selected report.

  • forward Next page: it moves forward to the next page of the selected report.

  • zoomout Zoom out: it decreases the zoom level of the selected report page.

  • zoomin Zoom in: it increases the zoom level of the selected report page.

  • add Add page: it adds a blank page to the selected report.

  • delete Delete page: it deletes the selected page of the report.

  • preferences Preferences: it opens the report layout preferences, where the layout preferences of your report can be set.

Note

When users add a first page to a report, only the following icons are active: Zoom out, Zoom in, Add page, Delete page, and Preferences. All other icons will appear greyed out and cannot be selected. Additionally, when no pages have been added to a report, only the Add page and Preferences icons are visible.

Report layout preferences

The Report layout preferences window contains options enabling users to set their preferred layout settings for the selected report.

  • Page format: from this drop-down list users can choose the report format they wish. Possible options are:
    • A4 (default)

    • A3

    • Letter

    • Slide 16:9

    • Slide 4:3

  • Orientation: it defines the orientation of the current report. Possible values of the orientation are:
    • Landscape

    • Portrait (default)

  • Scale content if dimension change: if selected, this option resizes the content on the report pages to fit the new page format and orientation.

  • Show grid: if selected, gridlines are displayed in all pages of the selected report.

  • Snap to grid: if selected, reports will be moved following the lines of the underlying grid and users will be able to line up the widgets within their reports.

  • X axis step: it sets the width of columns on the report grid.

  • Y axis step: it sets the height of rows on the report grid.

  • Show guided lines: if selected, guided lines are displayed to help users position and align widgets in their reports.


Interactions in Reports Panel

The interactions within the Reports panel fall into two main categories: those that are available when right-clicking on a specific report and those that involve individual pages within the current report.

Reports Context Menu

By right-clicking any entry of the report list, a dedicated context menu appears, showing a list of possible operations on reports. In particular, the context menu contains the following entries:

  • Rename report: it renames the selected report.

  • Add new report: it adds a new report in the panel.

  • Open report layout: it opens the Report layout preferences window, where users can set their layout preferences for the current report.

  • Copy report: it copies the selected report.

  • Paste report: it pastes the selected report.

  • Delete report: it deletes the selected report.

  • Add new page: it adds a new page to the report.

Pages Interactions

To reach the list of operations available for pages within a report, users need to click the expand icon next to the corresponding report. This will display a list of all available pages within the selected report. By right-clicking on any page within the selected report, users can access the following options:

  • Copy page: it copies the selected page.

  • Paste page: it pastes the selected page.

  • Delete page: it deletes the selected page.

Note

Please note that the Paste page option can also be accessed via the reports context menu.


Report and Page GOLD Reference

Here the GOLD classes representing the Report and the Page objects:

class studio.report.Report(sessionlike=False, id=None, parent_id=None)

GOLD class to represent the list of PDF report templates. Each report is represented by a single Page instance. Moreover class Report inherits all the fields and methods of the BaseSlide class.

Property pages:

a dictionary which connects each report id with the Page class instance representing the single template.

add(label, layout, order=None, id=None)

Function to add a new Page instance, representing a new PDF template

Parameters:
  • label (text) – name of the new template

  • layout (dict) – base layout for the new instance

  • order (integer) – the new position of the template in the list of all templates, None for last position, defaults to None

  • id (text) – the eventual id to associate to the new template, None to generate one internally, defaults to None

alignPage(label, scope)

Function to change the current Page inside a Page instance

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • scope (text) – the name of the Page to make as the current one

baseAdd(label, layout, order=None, id=None)

Base function to add a new slide

Parameters:
  • label (text) – the name of the new slide

  • layout (dict) – the layout of the new slide. Must follow the general template presented here.

  • order (integer) – the position of the new slide, None for place it at the bottom, defaults to None

  • id (text) – the identifier of the new slide, None to generate it internally, defaults to None

Returns:

the id of the new slide

Return type:

text

baseCopy(label_orig=None, label_dest=None)

Base function to copy a slide

Parameters:
  • label_orig (text) – the slide to copy, None for the current one, defaults to None

  • label_dest (text) – the label of the new slide, defaults to None

Returns:

the name of the copied slide

Return type:

text

baseDelete(label=None, force=False)

Base function to delete a slide

Parameters:
  • label (text) – the name of the slide to delete

  • force (binary) – if True, eventual used checks are disable, defaults to False

baseGet(label=None, evalpar=False, valueasdict=True)

Base function to retrieve information about a slide

Parameters:
  • label (text) – the name of the slide to retrieve, None for the current one, defaults to None

  • evalpar (binary) – if True, the parametrization is evaluated taking into consideration eventual presence of variables in slide layout, defaults to False

Returns:

a dictionary in the form {"order": <integer>, "layout": <dict>, "id": <text>}

Return type:

dict

baseList(aslist=False)

Base function to list all the slides

Parameters:

aslist (binary) – if True output is returned as a list of dictionary, otherwise as a dictionary with key the name of the slides, defaults to False

Returns:

a list or a dictionary with base information about all the slides

Return type:

list or dict

baseLoad(id, db, table)

Base function to load the BaseSlide instance or its derivation from the working database

Parameters:
  • id (text) – the identifier of the BaseSlide instance or its derivation on the working database

  • db (Database) – the working database expressed as a Database instance

  • table (text) – the table where information about BaseSlide instance or its derivation are contained

Returns:

the vector of slides identifiers

Return type:

vector of text type

baseMove(label, order)

Base function to move a slide

Parameters:
  • label (text) – the name of the slide to move

  • order (integer) – the new position of the slide

baseRename(newname, oldname=None)

Base function to rename a slide

Parameters:
  • newname (text) – the new name of the slide

  • oldname (text) – the name of the slide to rename, None for the current one, defaults to None

baseRestoreSave()

Base function to reset situation to the last saved

baseSave(id_parent, db, maintable, maincolumn)

Base function to save BaseSlide information on the working db

Parameters:
  • id_parent (text) – the indentifier of the parent instance which contains the BaseSlide or its derivation

  • db (Database) – the working database expressed as a Database instance

  • maintable (text) – the table where to store information

  • maincolumn (text) – the primary key of the main table

Returns:

in case no slides are present it returns the list of slides present before

Return type:

vector of text type

baseSet(layout=None, order=None, label=None)

Base function to modify the slide layout, the position or the name

Parameters:
  • layout (dict) – if present, the new layout of the slide, defaults to None

  • order (integer) – if present, the new position of the slide, defaults to None

  • label (text) – if present, the new name of the slide, defaults to None

changeSessionlike(sessionlike)

Base function to change the field sessionlike

Parameters:

sessionlike (binary) – if True all base slide operation are connected to an Undo structure to record them and allow undo-redo operations, defaults to False

copy(label_dest=None, label_orig=None)

Function to copy a provided Page template in a new Page object

Parameters:
  • label_dest (text) – the name of the destination template, None to create internally from the original name, defaults to None

  • label_orig (text) – the name of the source template, None for the current one, defaults to None

copyPage(label, pagelist)

Function to copy pages inside a Page instance

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • pagelist (vector of text type) – vector of Page names to copy

createMultiGauge(vec_label_obj, vec_layout_obj, vec_page, vec_report, layers_dict, database, version=-1)

Function to add a series of gauges to different pages in different report and update the stored version on the working Database

Parameters:
  • vec_label_obj (vector of text type) – a vector containing all the names of the widgets to create

  • vec_layout_obj (list of dictionaries) – a list of dictionaries containing all the layouts of the pages to create

  • vec_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_report (vector of text type) – the names of the Page instance to modified

  • layers_dict (dict) – a dictionary describing the spatial distribution of widgets onto the Page Stage

  • database (Database) – the working Database expressed as an instance of the Database class

  • version (integer) – the version of the operation (used for backcompatibility), -1 for the latest, defaults to -1

createMultiGraphic(vec_label_obj, vec_layout_obj, vec_page, vec_report, layers_dict, database, version=-1)

Function to add a series of graphics to different pages in different report and update the stored version on the working Database

Parameters:
  • vec_label_obj (vector of text type) – a vector containing all the names of the widgets to create

  • vec_layout_obj (list of dictionaries) – a list of dictionaries containing all the layouts of the pages to create

  • vec_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_report (vector of text type) – the names of the Page instance to modified

  • layers_dict (dict) – a dictionary describing the spatial distribution of widgets onto the Page Stage

  • database (Database) – the working Database expressed as an instance of the Database class

  • version (integer) – the version of the operation (used for backcompatibility), -1 for the latest, defaults to -1

createMultiGridtable(vec_label_obj, vec_layout_obj, vec_page, vec_report, layers_dict, database, version=-1)

Function to add a series of gridtables to different pages in different report and update the stored version on the working Database

Parameters:
  • vec_label_obj (vector of text type) – a vector containing all the names of the widgets to create

  • vec_layout_obj (list of dictionaries) – a list of dictionaries containing all the layouts of the pages to create

  • vec_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_report (vector of text type) – the names of the Page instance to modified

  • layers_dict (dict) – a dictionary describing the spatial distribution of widgets onto the Page Stage

  • database (Database) – the working Database expressed as an instance of the Database class

  • version (integer) – the version of the operation (used for backcompatibility), -1 for the latest, defaults to -1

createMultiImage(vec_label_obj, vec_layout_obj, vec_page, vec_report, layers_dict, database, version=-1)

Function to add a series of images to different pages in different report and update the stored version on the working Database

Parameters:
  • vec_label_obj (vector of text type) – a vector containing all the names of the widgets to create

  • vec_layout_obj (list of dictionaries) – a list of dictionaries containing all the layouts of the pages to create

  • vec_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_report (vector of text type) – the names of the Page instance to modified

  • layers_dict (dict) – a dictionary describing the spatial distribution of widgets onto the Page Stage

  • database (Database) – the working Database expressed as an instance of the Database class

  • version (integer) – the version of the operation (used for backcompatibility), -1 for the latest, defaults to -1

createMultiObj(objtype, vec_label_obj, vec_layout_obj, vec_page, vec_report, layers_dict, database, version=-1)

Function to add a series of widget of the same kind to different pages in different report and update the stored version on the working Database

Parameters:
  • objtype (text) – the type of widget to create, one of plot, gridtable, gauge, graphic and image

  • vec_label_obj (vector of text type) – a vector containing all the names of the widgets to create

  • vec_layout_obj (list of dictionaries) – a list of dictionaries containing all the layouts of the pages to create

  • vec_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_report (vector of text type) – the names of the Page instance to modified

  • layers_dict (dict) – a dictionary describing the spatial distribution of widgets onto the Page Stage

  • database (Database) – the working Database expressed as an instance of the Database class

  • version (integer) – the version of the operation (used for backcompatibility), -1 for the latest, defaults to -1

createMultiPage(vec_label_page, vec_layout_page, vec_order_page, vec_report, database)

Function to add multiple pages to multiple report and update the stored version on the working Database

Parameters:
  • vec_label_page (vector of text type) – a vector containing all the names of the pages to create

  • vec_layout_page (list of dictionaries) – a list of dictionaries containing all the layouts of the pages to create

  • vec_order_page (vector of integers) – the orders of all the pages to create

  • vec_report (vector of text type) – the names of the Page instance to modified

  • database (Database) – the working Database expressed as an instance of the Database class

createMultiPlot(vec_label_obj, vec_layout_obj, vec_page, vec_report, layers_dict, database, version=-1)

Function to add a series of plots to different pages in different report and update the stored version on the working Database

Parameters:
  • vec_label_obj (vector of text type) – a vector containing all the names of the widgets to create

  • vec_layout_obj (list of dictionaries) – a list of dictionaries containing all the layouts of the pages to create

  • vec_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_report (vector of text type) – the names of the Page instance to modified

  • layers_dict (dict) – a dictionary describing the spatial distribution of widgets onto the Page Stage

  • database (Database) – the working Database expressed as an instance of the Database class

  • version (integer) – the version of the operation (used for backcompatibility), -1 for the latest, defaults to -1

createPage(label, label_page, layout_page, order_page=None, id_page=None)

Function to create a new Page into a Page instance

Parameters:
  • label (text) – the label of the Page instance where the Page need to be added

  • label_page (text) – the name of the new added page

  • layout_page (dict) – the layout of the new added page

  • order_page (integer) – the position of the new added Page into the list of pages of the same Page instance, None for insertion at the bottom, defaults to None

  • id_page (text) – the unique identifier of the new added page, None to generate it internally, defaults to None

delete(label=None, force=False)

Functoin to delete an existing Page instance

Parameters:
  • label (binary) – the name of the template to delete, None for the current one, defaults to None

  • force (binary) – NOT IMPLEMENTED YET if True security checks are skipped, defaults to False

deleteMultiGauge(label_report, vec_label_page, vec_label, database)

Function to delete a series of gauges from different pages in a single report and update the stored version on the working Database

Parameters:
  • label_report (text) – the name of the selected Page instance

  • vec_label_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_label (vector of text type) – a vector containing all the names of the widgets to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

deleteMultiGraphic(label_report, vec_label_page, vec_label, database)

Function to delete a series of graphics from different pages in a single report and update the stored version on the working Database

Parameters:
  • label_report (text) – the name of the selected Page instance

  • vec_label_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_label (vector of text type) – a vector containing all the names of the widgets to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

deleteMultiGridtable(label_report, vec_label_page, vec_label, database)

Function to delete a series of gridtables from different pages in a single report and update the stored version on the working Database

Parameters:
  • label_report (text) – the name of the selected Page instance

  • vec_label_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_label (vector of text type) – a vector containing all the names of the widgets to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

deleteMultiImage(label_report, vec_label_page, vec_label, database)

Function to delete a series of images from different pages in a single report and update the stored version on the working Database

Parameters:
  • label_report (text) – the name of the selected Page instance

  • vec_label_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_label (vector of text type) – a vector containing all the names of the widgets to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

deleteMultiObj(objtype, label_report, vec_label_page, vec_label, database)

Function to delete a series of widgets of the same kind from different pages in a single report and update the stored version on the working Database

Parameters:
  • objtype (text) – the type of widget to delete, one of plot, gridtable, gauge, graphic and image

  • label_report (text) – the name of the selected Page instance

  • vec_label_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_label (vector of text type) – a vector containing all the names of the widgets to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

deleteMultiPage(label_report, name, database)

Function to delete multiple pages from a report and update the stored version on the working Database

Parameters:
  • label_report (text) – the Page instance to modify

  • name (vector of text type) – the names of the pages to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

deleteMultiPlot(label_report, vec_label_page, vec_label, database)

Function to delete a series of plots from different pages in a single report and update the stored version on the working Database

Parameters:
  • label_report (text) – the name of the selected Page instance

  • vec_label_page (vector of text type) – a vector containing all the names of the pages to be modified

  • vec_label (vector of text type) – a vector containing all the names of the widgets to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

deletePage(label, pagelist, force=False)

Function to delete pages inside a Page instance

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • pagelist (vector of text type) – vector of Page names to delete

  • force (binary) – if True use check of the report are disable, defaults to False

deletePageOrder(label, id_page)

Function to delete a Page given its id

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • id_page (text) – the id of the internal page

get(label=None, valueasdict=True)

Function to get the information about a single Page instance

Parameters:

label (text) – the name of the considered template, None for the current one, defaults to None

getPage(label, label_page=None, evalpar=True, valueasdict=True)

Function to get information about a single Page inside a Page instance

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • label_page (text) – the name of the Page to inspect, None for the current one, defaults to None

Returns:

dictionary describing the selected page

Return type:

dict

getPageOrder(label, id_page)

Function to get the order of a Page given its id

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • id_page (text) – the id of the internal page

Returns:

the order of the page

Return type:

integer

getStage(label=None, pagedict=None, dataset=None, asdict=False, valueasdict=True, external=False)

Function to get the graphical description of report pages

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one, defaults to None

  • pagelist (vector of text type) – vector of Page names to draw, None for all, defaults to None

  • dataset (Dataset) – the Dataset instance to be used to draw the Page internal widget, defaults to None

Returns:

a dictionary with key the name of the Page and value its graphical JSON description

Return type:

dict

insertPageOrder(label, id_page, order)

Function to insert a Page with a given id in a particular position

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • id_page (text) – the id of the internal Page to be inserted

  • order (integer) – the position of the insertion

list(aslist=False)

Function to list the present Page template instances

Parameters:

aslist (binary) – if True the result is provided in a simplified dictionary form, otherwise a dictionary with a more complex structure is returned, defaults to False

Returns:

if aslist is False, a dictionary in this form {<label_report>:{"layout":{"pages":{<label_page>:<layout_page>}}}}, otherwise the form is {<label_report>:[{"label": <label_page>, ...<layout_page>}]}

Return type:

dict

listPage(label=None, aslist=False, evalpar=True)

Function to return the number and general information about pages contained into a Page instance

Parameters:
  • label (text) – the label of the Page instance, None for the current one, defaults to None

  • aslist (binary) – if True output will be a list of dictionaries each with the information about a single page, otherwise the output will be a dictionary with key the name of the Page and object its layout

Returns:

the list of pages and the information about them

Return type:

list or dict

load(id, db)

Function to load a Report class from a provided Database

Parameters:
  • id (text) – the unique identifier used in the Database to store the desired Report

  • db (Database) – the Database instance used for the Database connection

modifyMultiGauge(deletereports, deletepages, deletegauges, createreports, createpages, creategauges, layout, database)

Function to perform an overall change to the whole Report class on gauges and update the stored version on the working Database

Parameters:
  • deletereports (vector of text type) – the vector of names of Page instances where there are widgets to delete

  • deletepages (vector of text type) – the vector of names of pages where there are widgets to delete

  • deleteobjs (vector of text type) – the vector of names of widgets to delete

  • createreports (vector of text type) – the vector of names of Page instances where there are widgets to create

  • createpages (vector of text type) – the vector of names of pages where there are widgets to create

  • createobjs (vector of text type) – the vector of names of widgets to create

  • layout (list of dictionaries) – the list of dictionaries containing the layout of the widgets we are going to create

  • database (Database) – the working Database expressed as an instance of the Database class

modifyMultiGraphic(deletereports, deletepages, deletegraphics, createreports, createpages, creategraphics, layout, database)

Function to perform an overall change to the whole Report class on graphics and update the stored version on the working Database

Parameters:
  • deletereports (vector of text type) – the vector of names of Page instances where there are widgets to delete

  • deletepages (vector of text type) – the vector of names of pages where there are widgets to delete

  • deleteobjs (vector of text type) – the vector of names of widgets to delete

  • createreports (vector of text type) – the vector of names of Page instances where there are widgets to create

  • createpages (vector of text type) – the vector of names of pages where there are widgets to create

  • createobjs (vector of text type) – the vector of names of widgets to create

  • layout (list of dictionaries) – the list of dictionaries containing the layout of the widgets we are going to create

  • database (Database) – the working Database expressed as an instance of the Database class

modifyMultiGridtable(deletereports, deletepages, deletegridtables, createreports, createpages, creategridtables, layout, database)

Function to perform an overall change to the whole Report class on gridtables and update the stored version on the working Database

Parameters:
  • deletereports (vector of text type) – the vector of names of Page instances where there are widgets to delete

  • deletepages (vector of text type) – the vector of names of pages where there are widgets to delete

  • deleteobjs (vector of text type) – the vector of names of widgets to delete

  • createreports (vector of text type) – the vector of names of Page instances where there are widgets to create

  • createpages (vector of text type) – the vector of names of pages where there are widgets to create

  • createobjs (vector of text type) – the vector of names of widgets to create

  • layout (list of dictionaries) – the list of dictionaries containing the layout of the widgets we are going to create

  • database (Database) – the working Database expressed as an instance of the Database class

modifyMultiImage(deletereports, deletepages, deleteimages, createreports, createpages, createimages, layout, database)

Function to perform an overall change to the whole Report class on images and update the stored version on the working Database

Parameters:
  • deletereports (vector of text type) – the vector of names of Page instances where there are widgets to delete

  • deletepages (vector of text type) – the vector of names of pages where there are widgets to delete

  • deleteobjs (vector of text type) – the vector of names of widgets to delete

  • createreports (vector of text type) – the vector of names of Page instances where there are widgets to create

  • createpages (vector of text type) – the vector of names of pages where there are widgets to create

  • createobjs (vector of text type) – the vector of names of widgets to create

  • layout (list of dictionaries) – the list of dictionaries containing the layout of the widgets we are going to create

  • database (Database) – the working Database expressed as an instance of the Database class

modifyMultiObjReport(objtype, deletereports, deletepages, deleteobjs, createreports, createpages, createobjs, layout, database)

Function to perform an overall change to the whole Report class on a single type of widgets and update the stored version on the working Database

Parameters:
  • objtype (text) – the type of widgets to be modified, one of plot, gridtable, gauge, graphic and image

  • deletereports (vector of text type) – the vector of names of Page instances where there are widgets to delete

  • deletepages (vector of text type) – the vector of names of pages where there are widgets to delete

  • deleteobjs (vector of text type) – the vector of names of widgets to delete

  • createreports (vector of text type) – the vector of names of Page instances where there are widgets to create

  • createpages (vector of text type) – the vector of names of pages where there are widgets to create

  • createobjs (vector of text type) – the vector of names of widgets to create

  • layout (list of dictionaries) – the list of dictionaries containing the layout of the widgets we are going to create

  • database (Database) – the working Database expressed as an instance of the Database class

modifyMultiPage(deletereport, deletepage, createreport, createpage, layout, order)

Function to perform an overall change on the whole Report class about pages

Parameters:
  • deletereport (vector of text type) – the vector of names of Page instances where there are pages to delete

  • deletepage (vector of text type) – the vector of names of pages to be deleted

  • createreport (vector of text type) – the vector of names of Page instances where there are pages to create

  • createpage (vector of text type) – the vector of names of pages to be created

  • layout (list of dictionaries) – the layout of the pages to be created

  • order (vector of integers) – the order fo the Page to be created

modifyMultiPlot(deletereports, deletepages, deleteplots, createreports, createpages, createplots, layout, database)

Function to perform an overall change to the whole Report class on plots and update the stored version on the working Database

Parameters:
  • deletereports (vector of text type) – the vector of names of Page instances where there are widgets to delete

  • deletepages (vector of text type) – the vector of names of pages where there are widgets to delete

  • deleteobjs (vector of text type) – the vector of names of widgets to delete

  • createreports (vector of text type) – the vector of names of Page instances where there are widgets to create

  • createpages (vector of text type) – the vector of names of pages where there are widgets to create

  • createobjs (vector of text type) – the vector of names of widgets to create

  • layout (list of dictionaries) – the list of dictionaries containing the layout of the widgets we are going to create

  • database (Database) – the working Database expressed as an instance of the Database class

move(label, order)

Function to change the order of templates

Parameters:
  • label (text) – the name of the template to move

  • order (integer) – the new position of the template

movePage(label, pagelist, indexes)

Function to move pages inside a Page instance

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • pagelist (vector of text type) – vector of Page names to move

  • indexes (vector of integers) – final position of the moved pages

multiDelete(vec_label_report, database)

Function to delete multiple Page instances and update the stored version of the Database

Parameters:
  • vec_label_report (vector of text type) – the names of the Page instances to be deleted

  • database (Database) – the working Database expressed as an instance of the Database class

rename(newname, oldname=None)

Function to rename a Page instance

Parameters:
  • newname (text) – the new name for the template

  • oldname (text) – the original name for the template

renamePage(label, newname, oldname=None)

Function to rename a Page inside the Page instance

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • newname (text) – the new name of the internal Page to rename

  • oldname (text) – the old name of the internal Page to rename, None for the current one, defaults to None

restoreSave()

Function to restore last saved status

save(id_view, db)

Function to save on a Database the current Report structure

Parameters:
  • id (text) – the unique identifier associated to the current Report structure, in general the identifier of the View object

  • db (Database) – the working Database expressed as Database instance

set(layout=None, order=None, label=None)

Function to modify the layout of an already present Page instance

Parameters:
  • layout (dict) – the layout to set

  • order (integer) – the new position of the template in the list of all templates, None for last position, defaults to None

  • label (text) – name of the new template

setDirtyStatusView(dirty=True)

Function to set a status as dirty meaning modifications has been set which are not currently saved

Parameters:

dirty (binary) – the dirty status, defaults to True

setPage(label, layout_page=None, order_page=None, label_page=None)

Function to modify a selected Page inside a Page instance

Parameters:
  • label (text) – the name of the Page instance to select, None for the current one

  • layout_page (dict) – the new layout of the internal page, defaults to None

  • order_page (integer) – the order of the current page, defaults to None

  • label_page (text) – the name of the selected page, None for the current one, defaults to None

class studio.report.Page(sessionlike=False, id=None, parent_id=None, dirtyfunc=None)

GOLD class to represent a single PDF Report Template. Each Page is composed by a set of pages. Moreover class Report inherits all the fields and methods of the BaseDashboard class.

Property extrafunc:

a dictionary containing useful callbacks to be called

add(label, layout, order=None, id=None)

Function to add a new Page

Parameters:
  • label (text) – the name of the Page to be added

  • layout (dict) – the layout of the Page to be added

  • order (integer) – the position where to add the new page, None for the bottom, defaults to None

  • id (text) – the id of the new page, None to generate it internally, defaults to None

baseAdd(label, layout, order=None, id=None)

Base function to add a new slide

Parameters:
  • label (text) – the name of the new slide

  • layout (dict) – the layout of the new slide. Must follow the general template presented here.

  • order (integer) – the position of the new slide, None for place it at the bottom, defaults to None

  • id (text) – the identifier of the new slide, None to generate it internally, defaults to None

Returns:

the id of the new slide

Return type:

text

baseCopy(label_orig=None, label_dest=None)

Base function to copy a slide

Parameters:
  • label_orig (text) – the slide to copy, None for the current one, defaults to None

  • label_dest (text) – the label of the new slide, defaults to None

Returns:

the name of the copied slide

Return type:

text

baseDashAdd(label, layout, order=None, id=None)

Base dashboard function to add a new slide

Parameters:
  • label (text) – the name of the new slide

  • layout (dict) – the layout of the new slide. Must follow the general template presented here.

  • order (integer) – the position of the new slide, None for place it at the bottom, defaults to None

  • id (text) – the identifier of the new slide, None to generate it internally, defaults to None

baseDashCopy(label_dest=None, label_orig=None, exclude_obj=[], isdialog=False)

Base dashboard function to copy a slide

Parameters:
  • label_dest (text) – the name of the new copied slide, use None to generate it internally, defaults to None

  • label_orig (text) – the name of the original slide, None for the current one, defaults to None

  • exclude_obj – a vector of widget identifiers to exclude them from the copy, defaults to []

  • isdialog (binary) – if True the current copy is performed in the Studio Dialogs tab, defaults to False

Returns:

the name of the copied slide

Return type:

text

baseDashDelete(label=None, force=False)

Base dashboard function to delete a slide

Parameters:
  • label (text) – the name of the slide to delete

  • force (binary) – if True, eventual used checks are disable, defaults to False

baseDashLoad(id, db)

Base dashboard function to load a dashboard instance from the working database

Parameters:
  • id (text) – the identifier of the BaseDashboard instance or its derivation on the working database

  • db (Database) – the working database expressed as a Database instance

baseDashMove(label, order)

Base dashboard function to move a slide

Parameters:
  • label (text) – the name of the slide to move

  • order (integer) – the new position of the slide

baseDashRename(newname, oldname=None)

Base dashboard function to rename a slide

Parameters:
  • newname (text) – the new name of the slide

  • oldname (text) – the name of the slide to rename, None for the current one, defaults to None

baseDashRestoreSave()

Base dashboard function to reset to last save status

baseDashSave(id_view, db, table='r_dashboard', column='view_id')

Base dashboard function to store the whole dashboard on the working database

Parameters:
  • id_view (text) – the identifier of the view used to store the whole dashboard

  • db (Database) – the working database, expressed as a Database instance

  • table (text) – the table to be used for the store, defaults to r_dashboard

  • column (text) – the primary key of the storing table, defaults to view_id

Returns:

the vector of the slide identifier which are erased by the current store status

Return type:

vector of text type

baseDelete(label=None, force=False)

Base function to delete a slide

Parameters:
  • label (text) – the name of the slide to delete

  • force (binary) – if True, eventual used checks are disable, defaults to False

baseGet(label=None, evalpar=False, valueasdict=True)

Base function to retrieve information about a slide

Parameters:
  • label (text) – the name of the slide to retrieve, None for the current one, defaults to None

  • evalpar (binary) – if True, the parametrization is evaluated taking into consideration eventual presence of variables in slide layout, defaults to False

Returns:

a dictionary in the form {"order": <integer>, "layout": <dict>, "id": <text>}

Return type:

dict

baseGetStage(label, scope=None, dataset=None, asdict=False, valueasdict=True, external=False)

Function to get the stage description of a slide

Parameters:
  • label (text) – the name of a slide

  • scope (dict) – the dictionary of scope for the actions, None for a the whole slide, defaults to None

  • dataset (Dataset) – the Dataset instance to be used in evaluations

Returns:

the JSON representation of the slide stage expressed as a GOLD dictionary

Return type:

dict

baseList(aslist=False)

Base function to list all the slides

Parameters:

aslist (binary) – if True output is returned as a list of dictionary, otherwise as a dictionary with key the name of the slides, defaults to False

Returns:

a list or a dictionary with base information about all the slides

Return type:

list or dict

baseLoad(id, db, table)

Base function to load the BaseSlide instance or its derivation from the working database

Parameters:
  • id (text) – the identifier of the BaseSlide instance or its derivation on the working database

  • db (Database) – the working database expressed as a Database instance

  • table (text) – the table where information about BaseSlide instance or its derivation are contained

Returns:

the vector of slides identifiers

Return type:

vector of text type

baseMove(label, order)

Base function to move a slide

Parameters:
  • label (text) – the name of the slide to move

  • order (integer) – the new position of the slide

baseRename(newname, oldname=None)

Base function to rename a slide

Parameters:
  • newname (text) – the new name of the slide

  • oldname (text) – the name of the slide to rename, None for the current one, defaults to None

baseRestoreSave()

Base function to reset situation to the last saved

baseSave(id_parent, db, maintable, maincolumn)

Base function to save BaseSlide information on the working db

Parameters:
  • id_parent (text) – the indentifier of the parent instance which contains the BaseSlide or its derivation

  • db (Database) – the working database expressed as a Database instance

  • maintable (text) – the table where to store information

  • maincolumn (text) – the primary key of the main table

Returns:

in case no slides are present it returns the list of slides present before

Return type:

vector of text type

baseSet(layout=None, order=None, label=None)

Base function to modify the slide layout, the position or the name

Parameters:
  • layout (dict) – if present, the new layout of the slide, defaults to None

  • order (integer) – if present, the new position of the slide, defaults to None

  • label (text) – if present, the new name of the slide, defaults to None

changeSessionlike(sessionlike)

Base function to change the field sessionlike

Parameters:

sessionlike (binary) – if True all base slide operation are connected to an Undo structure to record them and allow undo-redo operations, defaults to False

copy(label_dest=None, label_orig=None)

Function to copy a page

Parameters:
  • label_dest (text) – the new created page, None for a auto generated name starting from the copied Page name, defaults to None

  • label_orig (text) – the Page to copy, None for the current one, defaults to None

Returns:

the name of the new page

Return type:

text

copyGauge(label_dash_orig, vec_label, vec_position, label_dash_dest=None, withlayout=True)

Function to copy gauges

Parameters:
  • label_dash_orig (text) – the slide on which the gauge to be copied is present

  • vec_label (vector of text type) – the name of the gauges to be copied

  • vec_position (list) – the position of the gauges to be copied. Position in the form {"x": x, "y": y, "z": z}

  • label_dash_dest (text) – the destination slide, use None for the current one, defaults to None

  • withlayout (binary) – if True also the single layout fields are copied, defaults to True

Returns:

a dictionary which associates to the name of the copied gauges the new widget labels

Return type:

dict

copyGraphic(label_dash_orig, vec_label, vec_position, label_dash_dest=None, withlayout=True)

Function to copy graphics

Parameters:
  • label_dash_orig (text) – the slide on which the graphic to be copied is present

  • vec_label (vector of text type) – the name of the graphics to be copied

  • vec_position (list) – the position of the graphics to be copied. Position in the form {"x": x, "y": y, "z": z}

  • label_dash_dest (text) – the destination slide, use None for the current one, defaults to None

  • withlayout (binary) – if True also the single layout fields are copied, defaults to True

Returns:

a dictionary which associates to the name of the copied graphics the new widget labels

Return type:

dict

copyGridtable(label_dash_orig, vec_label, vec_position, label_dash_dest=None, withlayout=True)

Function to copy gridtables

Parameters:
  • label_dash_orig (text) – the slide on which the gridtable to be copied is present

  • vec_label (vector of text type) – the name of the gridtables to be copied

  • vec_position (list) – the position of the gridtables to be copied. Position in the form {"x": x, "y": y, "z": z}

  • label_dash_dest (text) – the destination slide, use None for the current one, defaults to None

  • withlayout (binary) – if True also the single layout fields are copied, defaults to True

Returns:

a dictionary which associates to the name of the copied gridtables the new widget labels

Return type:

dict

copyImage(label_dash_orig, vec_label, vec_position, label_dash_dest=None, withlayout=True)

Function to copy images

Parameters:
  • label_dash_orig (text) – the slide on which the image to be copied is present

  • vec_label (vector of text type) – the name of the images to be copied

  • vec_position (list) – the position of the images to be copied. Position in the form {"x": x, "y": y, "z": z}

  • label_dash_dest (text) – the destination slide, use None for the current one, defaults to None

  • withlayout (binary) – if True also the single layout fields are copied, defaults to True

Returns:

a dictionary which associates to the name of the copied images the new widget labels

Return type:

dict

copyPlot(label_dash_orig, vec_label, vec_position, label_dash_dest=None, withlayout=True)

Function to copy plots

Parameters:
  • label_dash_orig (text) – the slide on which the plot to be copied is present

  • vec_label (vector of text type) – the name of the plots to be copied

  • vec_position (list) – the position of the plots to be copied. Position in the form {"x": x, "y": y, "z": z}

  • label_dash_dest (text) – the destination slide, use None for the current one, defaults to None

  • withlayout (binary) – if True also the single layout fields are copied, defaults to True

Returns:

a dictionary which associates to the name of the copied plots the new widget labels

Return type:

dict

copyWidgets(copyDict, posDict, getDict, label_dash=None, withlayout=True)

Function to copy widgets

Parameters:
  • objtype (text) – the widget family to the new widget

  • label_dash_orig (text) – the slide on which the widget to be copied is present

  • vec_label (vector of text type) – the name of the widgets to be copied

  • vec_position (list) – the position of the widgets to be copied. Position in the form {"x": x, "y": y, "z": z}

  • label_dash_dest (text) – the destination slide, use None for the current one, defaults to None

  • withlayout (binary) – if True also the single layout fields are copied, defaults to True

Returns:

a dictionary which associates to the name of the copied widgets the new widget labels

Return type:

dict

createGauge(label, layout, data=None, label_dash=None, id=None, layout_dash=None, **kwargs)

Function to create a gauge on a slide

Parameters:
  • label (text) – the name of the new gauge

  • layout (dict) – the layout of the new gauge. Schema of the following dictionary is contained in this page

  • data (list) – the output data of the gauge, if present, defaults to None

  • label_dash (text) – the slide on which the gauge needs to be created, use None for the current one, defaults to None

  • id (text) – the identifier of the new gauge, use None to generate it internally, defaults to None

  • layout_dash (dict) – the layout of the slide if the creation needs to update it, defaults to None

Returns:

the identifier of the new gauge

Return type:

text

createGraphic(label, layout, label_dash=None, id=None, layout_dash=None, **kwargs)

Function to create a graphic on a slide

Parameters:
  • label (text) – the name of the new graphic

  • layout (dict) – the layout of the new graphic. Schema of the following dictionary is contained in this page

  • label_dash (text) – the slide on which the graphic needs to be created, use None for the current one, defaults to None

  • id (text) – the identifier of the new graphic, use None to generate it internally, defaults to None

  • layout_dash (dict) – the layout of the slide if the creation needs to update it, defaults to None

Returns:

the identifier of the new graphic

Return type:

text

createGridtable(label, layout, label_dash=None, id=None, layout_dash=None, database=None, filepath=None, **kwargs)

Function to create a gridtable on a slide

Parameters:
  • label (text) – the name of the new gridtable

  • layout (dict) – the layout of the new gridtable. Schema of the following dictionary is contained in this page

  • label_dash (text) – the slide on which the gridtable needs to be created, use None for the current one, defaults to None

  • id (text) – the identifier of the new gridtable, use None to generate it internally, defaults to None

  • layout_dash (dict) – the layout of the slide if the creation needs to update it, defaults to None

  • database (Database) – the working database, expressed as a Database instance, defaults to None

  • filepath (text) – a possible blob file storing the final dataset, defaults to None

Returns:

the identifier of the new gridtable

Return type:

text

createImage(label, layout, label_dash=None, id=None, layout_dash=None, **kwargs)

Function to create a image on a slide

Parameters:
  • label (text) – the name of the new gauge

  • layout (dict) – the layout of the new image. Schema of the following dictionary is contained in this page

  • label_dash (text) – the slide on which the image needs to be created, use None for the current one, defaults to None

  • id (text) – the identifier of the new image, use None to generate it internally, defaults to None

  • layout_dash (dict) – the layout of the slide if the creation needs to update it, defaults to None

Returns:

the identifier of the new image

Return type:

text

createPlot(label, layout, data=None, label_dash=None, id=None, layout_dash=None, **kwargs)

Function to create a plot on a slide

Parameters:
  • label (text) – the name of the new plot

  • layout (dict) – the layout of the new plot. Schema of the following dictionary is contained in this page

  • data (list) – the output data of the plot, if present, defaults to None

  • label_dash (text) – the slide on which the plot needs to be created, use None for the current one, defaults to None

  • id (text) – the identifier of the new plot, use None to generate it internally, defaults to None

  • layout_dash (dict) – the layout of the slide if the creation needs to update it, defaults to None

Returns:

the identifier of the new plot

Return type:

text

delete(label=None, force=False)

Function to delete a page

Parameters:
  • label (text) – the Page to be deleted, None for the current one, defaults to None

  • force (binary) – if True no use check is performed, defaults to False

deleteGauge(vec_label, label_dash=None, force=False, withalign=True)

Function to delete a set of gauge

Parameters:
  • vec_label (vector of text type) – the name of the gauges to be deleted

  • label_dash (text) – the slide of the gauge, use None for the current one, defaults to None

  • force (binary) – if True, use of the gauge in view references is not checked, defaults to False

  • withalign (binary) – if True dashboard layout is corrected to erase the corresponding layers, defaults to True

deleteGraphic(vec_label, label_dash=None, force=False, withalign=True)

Function to delete a set of graphic

Parameters:
  • vec_label (vector of text type) – the name of the graphics to be deleted

  • label_dash (text) – the slide of the graphic, use None for the current one, defaults to None

  • force (binary) – if True, use of the graphic in view references is not checked, defaults to False

  • withalign (binary) – if True dashboard layout is corrected to erase the corresponding layers, defaults to True

deleteGridtable(vec_label, label_dash=None, force=False, withalign=True, dataset=None)

Function to delete a set of gridtables

Parameters:
  • vec_label (vector of text type) – the name of the gridtables to be deleted

  • label_dash (text) – the slide of the gridtable, use None for the current one, defaults to None

  • force (binary) – if True, use of the gridtable in view references is not checked, defaults to False

  • withalign (binary) – if True dashboard layout is corrected to erase the corresponding layers, defaults to True

  • dataset (Dataset) – the Dataset instance use for scope re-evaluation if needed, defaults to None

deleteImage(vec_label, label_dash=None, force=False, withalign=True)

Function to delete a set of image

Parameters:
  • vec_label (vector of text type) – the name of the images to be deleted

  • label_dash (text) – the slide of the image, use None for the current one, defaults to None

  • force (binary) – if True, use of the image in view references is not checked, defaults to False

  • withalign (binary) – if True dashboard layout is corrected to erase the corresponding layers, defaults to True

deletePlot(vec_label, label_dash=None, force=False, withalign=True)

Function to delete a set of plot

Parameters:
  • vec_label (vector of text type) – the name of the plots to be deleted

  • label_dash (text) – the slide of the plot, use None for the current one, defaults to None

  • force (binary) – if True, use of the plot in view references is not checked, defaults to False

  • withalign (binary) – if True dashboard layout is corrected to erase the corresponding layers, defaults to True

drawGauge(label, input, dataset, label_dash=None, layout=None, discrete=False, refresh=False)

Function to draw a gauge: the output is then stored in the self.data field.

Parameters:
  • label (text) – the name of the gauge

  • input (dict) – the input of the gauge to draw (stored then in self.layout[“input”])

  • options (dict) – the options of the gauge to draw (stored then in self.layout[“options”])

  • dataset (Dataset) – the Dataset instance to use as data origin

  • label_dash (text) – the slide of the gauge, use None for the current one, defaults to None

  • layout (dict) – if present it allows to modify the graphical appareance of the gauge (stored then in self.layout[“layout”]), defaults to None

  • discrete (binary) – if True the gauge is a discrete gauge, otherwise a continuous one, defaults to False

  • refresh (binary) – if True all the information are re-evaluated to refresh the dependence to eventual new data or variable values, defaults to False

drawGraphic(label, dataset, label_dash=None)

Function to draw a graphic. The only result is the re-evaluation of eventual dependency on data or variables of the layout options.

Parameters:
  • label (text) – the name of the graphic

  • dataset (Dataset) – the Dataset instance to use in option re-evaluation

  • label_dash (text) – the slide of the graphic, use None for the current one, defaults to None

drawGridtable(label, input, options, dataset=None, label_dash=None, refresh=False, filepath=None, loaddataset=False, layout=None, backupfields=None)

Function to draw a gridtable: the output is then stored in the self.data field.

Parameters:
  • label (text) – the name of the gridtable

  • input (dict) – the input of the gridtable to draw (stored then in self.layout[“input”])

  • options (dict) – the options of the gridtable to draw (stored then in self.layout[“options”])

  • dataset (Dataset) – the Dataset instance to use as data origin

  • label_dash (text) – the slide of the gridtable, use None for the current one, defaults to None

  • refresh (binary) – if True all the information are re-evaluated to refresh the dependence to eventual new data or variable values, defaults to False

  • filepath (text) – the filepath to be use to load the output dataset, defaults to None

drawImage(label, input, label_dash=None)

Function to draw a image. The only result is the re-evaluation of eventual dependency on data or variables of the layout options.

Parameters:

label (text) – the name of the image

::param input: the input of the image to draw (stored then in self.layout[“input”]) :type input: dict

Parameters:

label_dash (text) – the slide of the image, use None for the current one, defaults to None

drawPlot(label, input, options, dataset, label_dash=None, layout=None, refresh=False)

Function to draw a plot: the output is then stored in the self.data field.

Parameters:
  • label (text) – the name of the plot

  • input (dict) – the input of the plot to draw (stored then in self.layout[“input”])

  • options (dict) – the options of the plot to draw (stored then in self.layout[“options”])

  • dataset (Dataset) – the Dataset instance to use as data origin

  • label_dash (text) – the slide of the plot, use None for the current one, defaults to None

  • layout (dict) – if present it allows to modify the graphical appareance of the plot (stored then in self.layout[“layout”]), defaults to None

  • refresh (binary) – if True all the information are re-evaluated to refresh the dependence to eventual new data or variable values, defaults to False

get(label=None, valueasdict=True)

Function to get information about a single page

Parameters:
  • label (text) – the name of the Page to retrieve, None for the current one

  • valueasdict (binary) – FIXME, defaults to True

Returns:

the information about the page

Return type:

dict

getGauge(label, label_dash=None, withevents=True, asdict=False)

Function to get information about a gauge

Parameters:
  • label_obj (text) – the name of the gauge

  • label_dash (text) – the slide of the gauge, use None for the current one, defaults to None

  • withevents (binary) – if True the events associated to the selected gauge are also returned, defaults to True

  • asdict (binary) – if True the result is returned as GOLD dictionary, otherwise as a JSON string, defaults to False

Returns:

a GOLD dictionary or a JSON string with the full description of the selected gauge

Return type:

dict or text

getGraphic(label, label_dash=None, withevents=True, asdict=False)

Function to get information about a graphic

Parameters:
  • label_obj (text) – the name of the graphic

  • label_dash (text) – the slide of the graphic, use None for the current one, defaults to None

  • withevents (binary) – if True the events associated to the selected graphic are also returned, defaults to True

  • asdict (binary) – if True the result is returned as GOLD dictionary, otherwise as a JSON string, defaults to False

Returns:

a GOLD dictionary or a JSON string with the full description of the selected graphic

Return type:

dict or text

getGridtable(label, label_dash=None, withevents=True, asdict=False, external=False)

Function to get information about a gridtable

Parameters:
  • label_obj (text) – the name of the gridtable

  • label_dash (text) – the slide of the gridtable, use None for the current one, defaults to None

  • withevents (binary) – if True the events associated to the selected gridtable are also returned, defaults to True

  • asdict (binary) – if True the result is returned as GOLD dictionary, otherwise as a JSON string, defaults to False

Returns:

a GOLD dictionary or a JSON string with the full description of the selected gridtable

Return type:

dict or text

getImage(label, label_dash=None, withevents=True, asdict=False)

Function to get information about a image

Parameters:
  • label_obj (text) – the name of the image

  • label_dash (text) – the slide of the image, use None for the current one, defaults to None

  • withevents (binary) – if True the events associated to the selected image are also returned, defaults to True

  • asdict (binary) – if True the result is returned as GOLD dictionary, otherwise as a JSON string, defaults to False

Returns:

a GOLD dictionary or a JSON string with the full description of the selected image

Return type:

dict or text

getPlot(label, label_dash=None, withevents=True, asdict=False)

Function to get information about a plot

Parameters:
  • label_obj (text) – the name of the plot

  • label_dash (text) – the slide of the plot, use None for the current one, defaults to None

  • withevents (binary) – if True the events associated to the selected plot are also returned, defaults to True

  • asdict (binary) – if True the result is returned as GOLD dictionary, otherwise as a JSON string, defaults to False

Returns:

a GOLD dictionary or a JSON string with the full description of the selected plot

Return type:

dict or text

getStage(label, scope=None, dataset=None, asdict=False, valueasdict=True, external=False)

Function to draw the graphical representation of a single page

Parameters:
  • label (text) – the Page to draw

  • scope (vector of text type) – FIXME, defaults to None

  • dataset (Dataset) – the Dataset used in the draw operation of the various widgets, defaults to None

  • asdict (binary) – if True the output is a dictionary, defaults to False

  • valueasdict (binary) – FIXME, defaults to True

getWidgetData(objtype, widgetname, withevents=False, withselected=False, asdict=True, label_dash=None)

Function to get information about a widget

Parameters:
  • objtype (text) – the widget family to the new widget

  • widgetname (text) – the name of the widget

  • withevents (binary) – if True the events associated to the selected widget are also returned, defaults to True

  • withselected (binary) – if True the selection active on the selected widget is also returned in the ownSelected field, defaults to True

  • asdict (binary) – if True the result is returned as GOLD dictionary, otherwise as a JSON string, defaults to False

Returns:

a GOLD dictionary or a JSON string with the full description of the selected widget

Return type:

dict or text

list(aslist=False, evalpar=True)

Function to list the information of all the pages contained in this Page instance

Parameters:
  • aslist (binary) – if True the result is returned as a list of dictionaries, rather than a dictionary with the names of various pages as keys, defaults to False

  • evalpar (binary) – if True parameter are evaluated first, defaults to True

Returns:

the information about the pages

Return type:

list or dict

listAllWidgetNames(label_dash=None)

Function to list all widget names

Parameters:

label_dash (text) – the slide of the widget, use None for the current one, defaults to None

listGauge(label_dash=None, aslist=False)

Function to list all the gauges present in a slide

Parameters:
  • label_dash (text) – the slide of the gauge, use None for the current one, defaults to None

  • aslist (binary) – if True the output is simply the list of identifiers of all the gauges of a certain type in a certain slide, otherwise it is a dictionary with id as key and value the corresponding class instances, defaults to False

Returns:

the identifiers of all the gauges of a certain type in a certain slide or the dictionaries with also the class instances as value

Return type:

vector of text type or dict

listGraphic(label_dash=None, aslist=False)

Function to list all the graphics present in a slide

Parameters:
  • label_dash (text) – the slide of the graphic, use None for the current one, defaults to None

  • aslist (binary) – if True the output is simply the list of identifiers of all the graphics of a certain type in a certain slide, otherwise it is a dictionary with id as key and value the corresponding class instances, defaults to False

Returns:

the identifiers of all the graphics of a certain type in a certain slide or the dictionaries with also the class instances as value

Return type:

vector of text type or dict

listGridtable(label_dash=None, aslist=False)

Function to list all the gridtables present in a slide

Parameters:
  • label_dash (text) – the slide of the gridtable, use None for the current one, defaults to None

  • aslist (binary) – if True the output is simply the list of identifiers of all the gridtables of a certain type in a certain slide, otherwise it is a dictionary with id as key and value the corresponding class instances, defaults to False

Returns:

the identifiers of all the gridtables of a certain type in a certain slide or the dictionaries with also the class instances as value

Return type:

vector of text type or dict

listImage(label_dash=None, aslist=False)

Function to list all the images present in a slide

Parameters:
  • label_dash (text) – the slide of the image, use None for the current one, defaults to None

  • aslist (binary) – if True the output is simply the list of identifiers of all the images of a certain type in a certain slide, otherwise it is a dictionary with id as key and value the corresponding class instances, defaults to False

Returns:

the identifiers of all the images of a certain type in a certain slide or the dictionaries with also the class instances as value

Return type:

vector of text type or dict

listPlot(label_dash=None, aslist=False)

Function to list all the plots present in a slide

Parameters:
  • label_dash (text) – the slide of the plot, use None for the current one, defaults to None

  • aslist (binary) – if True the output is simply the list of identifiers of all the plots of a certain type in a certain slide, otherwise it is a dictionary with id as key and value the corresponding class instances, defaults to False

Returns:

the identifiers of all the plots of a certain type in a certain slide or the dictionaries with also the class instances as value

Return type:

vector of text type or dict

load(id, db)

Function to load a Report class from a provided Database

Parameters:
  • id (text) – the unique identifier used in the Database to store the desired Report

  • db (Database) – the Database instance used for the Database connection

refreshLayoutGauge(id_dash)

Function to refresh the layout of gauges to get the modification of data and variables in option values

Parameters:

id_dash (text) – the identifier of the slide considered

refreshLayoutGraphic(id_dash)

Function to refresh the layout of graphics to get the modification of data and variables in option values

Parameters:

id_dash (text) – the identifier of the slide considered

refreshLayoutGridtable(id_dash)

Function to refresh the layout of gridtables to get the modification of data and variables in option values

Parameters:

id_dash (text) – the identifier of the slide considered

refreshLayoutImage(id_dash)

Function to refresh the layout of images to get the modification of data and variables in option values

Parameters:

id_dash (text) – the identifier of the slide considered

refreshLayoutPlot(id_dash)

Function to refresh the layout of plots to get the modification of data and variables in option values

Parameters:

id_dash (text) – the identifier of the slide considered

rename(newname, oldname=None)

Function to rename a page

Parameters:
  • newname (text) – the new name of the page

  • oldname (text) – the old name of the page, Nonde for the current one, defaults to None

renameGauge(label, newname, label_dash=None)

Function to rename a gauge

Parameters:
  • label_obj (text) – the name of the gauge

  • newname (text) – the new name

  • label_dash (text) – the slide of the gauge, use None for the current one, defaults to None

renameGraphic(label, newname, label_dash=None)

Function to rename a graphic

Parameters:
  • label_obj (text) – the name of the graphic

  • newname (text) – the new name

  • label_dash (text) – the slide of the graphic, use None for the current one, defaults to None

renameGridtable(label, newname, label_dash=None)

Function to rename a gridtable

Parameters:
  • label_obj (text) – the name of the gridtable

  • newname (text) – the new name

  • label_dash (text) – the slide of the gridtable, use None for the current one, defaults to None

renameImage(label, newname, label_dash=None)

Function to rename a image

Parameters:
  • label_obj (text) – the name of the image

  • newname (text) – the new name

  • label_dash (text) – the slide of the image, use None for the current one, defaults to None

renamePlot(label, newname, label_dash=None)

Function to rename a plot

Parameters:
  • label_obj (text) – the name of the plot

  • newname (text) – the new name

  • label_dash (text) – the slide of the plot, use None for the current one, defaults to None

resetGridtable(label, oldindrow=None, label_dash=None)

Function to reset any query on a gridtable

Parameters:
  • label (text) – the name of the gridtable

  • oldindrow (vector of integers) – the indrow to set after the reset, defaults to None

  • label_dash (text) – the slide of the gridtable, use None for the current one, defaults to None

restoreSave()

Function to restore last saved status

save(id_report, db)

Function to save the Page instance on the working database

Parameters:
  • id_report (text) – the id of the Report class the Page belongs to

  • db (Database) – the working Database expressed through a Database instance

set(layout=None, order=None, label=None)

Function to modify an existing page

Parameters:
  • layout (dict) – the new layout to set, defaults to None

  • order (integer) – the new position to set, defaults to None

  • label (text) – the new label of the page, defaults to None

setDirtyStatusView(dirty=True)

Function to set a status as dirty meaning modifications has been set which are not currently saved

Parameters:

dirty (binary) – the dirty status, defaults to True

setGauge(label=None, layout=None, label_dash=None, withdata=False)

Function to modify the layout of an existing gauge

Parameters:
  • objtype (text) – the widget family to the new gauge

  • label (text) – the name of the gauge to be modified

  • layout (dict) – the new layout of the gauge

  • label_dash (text) – the slide of the gauge, use None for the current one, defaults to None

  • withdata (binary) – if True the layout is supposed to contain a key data with output information, defaults to False

setGraphic(label=None, layout=None, label_dash=None)

Function to modify the layout of an existing graphic

Parameters:
  • objtype (text) – the widget family to the new graphic

  • label (text) – the name of the graphic to be modified

  • layout (dict) – the new layout of the graphic

  • label_dash (text) – the slide of the graphic, use None for the current one, defaults to None

setGridtable(label=None, layout=None, evaluate=False, label_dash=None)

Function to modify the layout of an existing image

Parameters:
  • objtype (text) – the widget family to the new image

  • label (text) – the name of the image to be modified

  • layout (dict) – the new layout of the image

  • evaluate (binary) – if True the widget is re-evaluated and data field is obtained again, defaults to False

  • label_dash (text) – the slide of the image, use None for the current one, defaults to None

setImage(label=None, layout=None, label_dash=None)

Function to modify the layout of an existing image

Parameters:
  • objtype (text) – the widget family to the new image

  • label (text) – the name of the image to be modified

  • layout (dict) – the new layout of the image

  • label_dash (text) – the slide of the image, use None for the current one, defaults to None

setPlot(label=None, layout=None, label_dash=None, withdata=False)

Function to modify the layout of an existing plot

Parameters:
  • objtype (text) – the widget family to the new plot

  • label (text) – the name of the plot to be modified

  • layout (dict) – the new layout of the plot

  • label_dash (text) – the slide of the plot, use None for the current one, defaults to None

  • withdata (binary) – if True the layout is supposed to contain a key data with output information, defaults to False

sortGridtable(label, sort_attr, label_dash=None)

Function to sort a gridtable

Parameters:
  • label (text) – the name of the gridtable

  • sort_attr (list) – the name of the attributes to sort. They are provided as a list of lists of two elements each: the name of the attribute, and a binary True/False for ascending/descending order.

  • label_dash (text) – the slide of the gridtable, use None for the current one, defaults to None

store(id=None, db=None, withdata=False)

Function to store plots inside a Dashbaord instance on the working database

Parameters:
  • id (text) – the identifier of the current Dashboard instance, defaults to None

  • db (Database) – the working database expressed as a Database instance, defaults to None

  • withdata (binary) – if True the data field of the widget is also stored on the working database, defaults to False