Skip to content

Organizing report definitions

All report definitions are stored in the database and are accessible through the Report explorer. For convenience report definitions are organized in groups.

Create a new group

Description Illustration
Create a new group by right clicking on the root node or an existing group, and select Add new group from the context menu.

The new group is created as a subgroup under the root (database) node or the group that was selected.
./Manager/image1.png
Once the new group has been added it can be renamed by right clicking on the group.

Additional functionality for copy, cut, delete and paste groups are also available.

Shortcuts for each of these action are also available (see context menu) Once a group have been created a report definition can be added to it by clicking “Add new report definition…”.
./Manager/image2.png

Defining reports

This section describes the process of creating and modifying report definitions.

Add report definition

Description Illustration
Report definition can be created in the Report explorer by right-clicking either on a Database node or a group node and clicking “Add new report definition…”. ./Manager/image3.png
The system will display a dialog where the report type should be selected (currently MIKE OPERATIONS only supports Microsoft Word).

The report definition name will be use in the tree view.

The report template file is the MS Word document holding the content controls (the template should already be created on disk, for more information see Creating report templates).

Clicking “remove file from disk” will delete this file after import.

Report definition template allows the user to reuse an existing report definition to save on time configuration.

Each content control will be configure in the same way as the control control having the same tag in the report definition template.
./Manager/image4.png
After clicking the Add report definition button system will create the report definition and open a data view with report content configuration ./Manager/image5.png

Define report content

Description Illustration
Report content can be edited at any time.

The data view with content configuration is shown when the report definition is created but can also be invoked by right clicking on report and selecting “Edit content…” or simply by double-clicking on a report definition in the report explorer.
./Manager/image6.png
Content configuration dialog contains of a list of content items identified in the report template and their configuration.

For each content item a Content Type (Text, Image, Table or Report) and Content Source (e.g. Favorite image, Indicator value, Timeseries table) is selected.
./Manager/image7.png
After selecting the content item in the list its detailed configuration is displayed.

Here the user can:
  • Change the content type of the content item (Text, Image, Table, Report)
  • Change the content source of the item (for a complete list of content sources see Configuring report content)
  • Configure content source (for detailed description see Configuring report content)
  • Configure content formatting (for detailed description see Configuring report content)
  • Preview the configured and formatted content
  • ./Manager/image8.png
    When the content item is configured it is very useful to preview the content by clicking “Preview” buton (doesn’t work for Report content type) to be sure that the content is exactly what is expected.

    System will display a dialog with the generated content.
    ./Manager/image9.png
    After configuring all content items (the ones that were modified are bold) “Save” button needs to be clicked to persist the changes and have them used during report generation. ./Manager/image10.png

    Set report properties

    Description Illustration
    The report properties are specific for a given report type and allow user to set some properties of the output report (e.g. a title or author of a generated MS Word document).

    In order to set report properties select report definition in the report explorer.
    ./Manager/image11.png
    Report properties will be displayed in the report definition properties dialog under the Report Properties->Document node .

    For the MS Word based report following document properties can be set: Author, Category, Comments, Status, Subject, Tags, Title.

    Property changes are autosaved after each change.
    ./Manager/image12.png
    The properties are set on the generated report (e.g. Word document) ./Manager/image13.png

    View report template

    Description Illustration
    User can always save to disk and view the report template that is used to generate a given report by selecting the report definition in explorer, right-clicking and selecting “Save template as…” ./Manager/image14.png
    A dialog will be shown where the user can select where the template should be saved and whether to open the template after it’s saved.

    When “Open template after save” option is checked the default editor for the report type will be opened, e.g. MS Word.
    ./Manager/image15.png

    Update report template

    Description Illustration
    The template that is used to generate the report can be changed at any moment.

    User can either modify the template that is stored with the report definition or can upload a completely new file from disk.

    In the case of the first option user should select the report definition in the explorer, right-click and select “Save template as…”
    ./Manager/image14.png
    A dialog will be shown where the user can select where the template should be saved and whether to open the template for edit.

    When “Open template after save” option is checked the default editor for the report type will be opened, e.g. MS Word.
    ./Manager/image15.png
    After the user has made all changes in the template he can upload it by right-clicking on the report definition in the explorer and selecting “Update template…” ./Manager/image16.png
    In the Update template dialog user can select the template file that should be uploaded and optionally select the file to be removed from disk.

    After pressing the “Update” button the new template will be saved in the report definition and report content items adjusted (either added or removed) to meet the new template content.
    ./Manager/image17.png

    Defining derived reports

    A derived report definition is a report definition that shares the report template and/or content configuration with another report.

    In the example there’s a base Report A which uses DocA.docx template and has two content items defined: Content item1 and Content item 2.

    If a user wants to have a report which has the same content configuration as the report A (in this case TS Plot (T1, T2) and Spreadsheet table (S1)) but use a different layout or style in the output report than Report A he can derive a Report B from the Report A and set the new report template in the Report B. This way Report B will always use the DocB.docx as the template but will have the content generated according to the configuration of ReportA.

    If a user wants to keep the report template and configuration of some of content items from one report definition but change the configuration of other content items (in the example the TS Plot for Content item 1 should be based on time series T4 and T5 instead of T1 and T2), he can derive a Report C from Report A and change the configuration of content items in Report C.

    Add derived report definition

    Description Illustration
    In order to create a derived report definition user should right-click in the explorer on the report definition he wants to derive a new report definition from and click “Create derived report definition…” ./Manager/image18.png
    System will display a dialog where user should enter the name of the newly created derived report and click “Create”. ./Manager/image19.png
    After creting the derived report definition system will display it in the report explorer with a special icon indicating that the report definition is derived from another one.

    The report definition from which another report definition is derived can be found in property dialog under Base report definition.
    ./Manager/image20.png

    Override derived report template

    Description Illustration
    In order to override the template in the derived report definition select the derived report definition in the explorer, right-click and select “Update template…” ./Manager/image22.png
    In the Update template dialog user should select the template file that should be uploaded and optionally select the file to be removed from disk.

    After pressing the “Update” button the new template will be saved in the report definition and override the template from the base report definition.

    Report content items for the derived report will be adjusted (either added or removed) to meet the new template content.
    ./Manager/image23.png
    The new report template will be shown in report definition properties window. ./Manager/image24.png

    Override derived report content

    Description Illustration
    In order to override the report content in the derived report definition select the derived report definition in the explorer, right-click and select “Edit content…” ./Manager/image25.png
    The content configuration dialog will be shown with a new column (Inherited) which indicates whether the content configuration for a given content item is inherited from the base report definition or defined in the derived report definition. ./Manager/image26.png
    In order to override the content item definition Inherited checkbox has to be unchecked.

    This will make the content item configuration editable. User can then set the content according to his needs.
    ./Manager/image27.png
    After making all changes the report definition should be saved by clicking on the Save button. ./Manager/image28.png

    Creating report templates

    This section describes creation of report templates for supported report types.

    Currently supported report types are:

    • MS Word

    A report template is a file containing both static content (will not change during report generation) and dynamic content (will be substituted with MIKE Workbench data during report generation). This section will focus on definition of dynamic content in report temlpates. For information on how to define static content for each report type please refer to user manual of corresponding reporting tool (e.g. MS Word).

    MIKE Workbench can produce following types of content:

    • Text
    • Table
    • Image
    • Report

    Placeholders for each of these types may be differently configured in a reporting tool.

    MS Word

    MS Word report templates rely on XML based Word documents and content controls. These are available since MS Office 2007.

    For the Word document to be usable as a report template it needs to be saved as a .docx file.

    To insert content control that will be replaced with MIKE Workbench data, one needs to enable Developer tab in MS Word.

    Description Illustration
    Go to File -> Options ./Manager/image29.png
    Select Customize Ribbon and check Developer tab. ./Manager/image30.png
    Developer tab will appear in MS Word ribbon ./Manager/image31.png

    Text content

    Description Illustration
    Text content can be defined at many levels, e.g. inline, as a standalone paragraph, inside a table cell.

    In order to add a placeholder for text content, put a cursor at the desired place in Word document and click on Plain Text Content Control
    ./Manager/image32.png
    Plain Text Content Control will appear in the Word document. ./Manager/image33.png
    Now a tag needs to be assigned to the content control, so that MIKE Workbench can refer to it.

    Select content control by clicking on it and then click Properties.
    ./Manager/image34.png
    In properties dialog tag property needs to be filled.

    Entered value will be later user to identify this content item when configuring content for report in MIKE Workbench.
    ./Manager/image35.png
    Tag values of content controls can be easily viewed by switching to Design mode. ./Manager/image36.png
    After the text control is added it can be formatted like a standard text in the document.

    Select content control and apply desired formatting.
    ./Manager/image37.png

    Table content

    Description Illustration
    Table content placeholder can be defined in several ways: as a new table, an existing table, a row in existing table.

    To define a placeholder for a new table content, put a cursor at the desired place in Word document and click on Rich Text Content Control
    ./Manager/image38.png
    Rich Text Content Control will appear in the Word document.

    Assign a tag to the content control according to the steps described in Text content Now when a table will be generated in MIKE Workbench it will be inserted in the place of added content control.

    The drawback of this method is that style of the table can’t be set before data is inserted in the document.
    ./Manager/image33.png
    Second option to define a placeholder for MIKE Workbench table data is to use an existing table from the document.

    To achieve this, create a table the standard way in Word document (it is advised that the number of columns of the table in document and number of generated columns match), format it as desired, select it and click on Rich Text Content Control
    ./Manager/image39.png
    Content control will be created around the table.

    Assign a tag to the content control according to the steps described in Text content.

    When MIKE Workbench generates the data it will be placed in the table.

    Row and column numbers in the table will be adjusted to match the number of columns and rows in generated data.
    ./Manager/image40.png
    For situations when table data from MIKE Workbench should be merged into an existing table a third way of defining table placeholder was envisioned.

    Create or select an existing table in the document, select a single row in the table and click on Rich Text Content Control.
    ./Manager/image41.png
    Content control will be created around the selected row.

    Assign a tag to the content control according to the steps described in Text content.

    When MIKE Workbench generates tabular data the row will be filled with it.

    If there are more than one row in the generated data corresponding number of rows will be inserted.
    ./Manager/image42.png

    Image content

    Description Illustration
    To define a placeholder for an image, put a cursor at the desired place in Word document and click on Picture Content Control ./Manager/image43.png
    Picture Text Content Control will appear in the Word document.

    Assign a tag to the content control according to the steps described in Text content Set the image properties (size, position, etc.) according to your needs.

    Now when an image will be generated in MIKE Workbench it will be inserted in the place of added content control.
    ./Manager/image44.png

    Report content

    Description Illustration
    To define a placeholder for a sub-report, put a cursor at the desired place in Word document and click on Rich Text Content Control ./Manager/image38.png
    Rich Text Content Control will appear in the Word document.

    Assign a tag to the content control according to the steps described in Text content.

    Now when a sub-report will be generated in MIKE Workbench it will be inserted in the place of added content control.
    ./Manager/image33.png

    Configuring report content

    MIKE Workbench can produce Text, Table, Image and Report contents from many different sources. This section will describe configuration and formatting of each built-in content source.

    Text

    Description Illustration
    This is the simplest content source.

    It simply produces the text that the user specifies.

    Configuration
  • Text: this is the text that should be produced Formatting
  • No formatting for this content source
  • ./Manager/image45.png
    Example output of text content source. ./Manager/image46.png

    Indicator value

    Description Illustration
    This content source returns a value that is represented by an indicator.

    Configuration
  • Indicator: a path to a single indicator whose value should be returned as the content (indicator can be dragged and dropped from indicator explorer or the indicator path can be entered by hand) Formatting
  • Number format: specifies the precision with which indicator value will be displayed
  • Boolean text: not applicable to indicator values
  • Date format: not applicable to indicator values
  • ./Manager/image47.png
    Example output of indicator content source. ./Manager/image48.png

    Script text output

    Description Illustration
    This content source returns text that is produced by a script.

    Configuration
  • Script: a path to a script which will be executed to return text (script can be dragged and dropped from script explorer or the script path can be entered by hand)
  • Parameters: values of each script parameter that will be used when executing a script Formatting
  • No formatting for script text output (the script should format text as desired)
  • ./Manager/image49.png
    Example script.

    Input parameters are optional but the return value has to be of type string.
    ./Manager/image50.png
    Example output of script text output content source. ./Manager/image51.png

    Feature class attributes table

    Description Illustration
    This content source returns a table of all feature attributes in a given feature class.

    Configuration
  • Feature Class: a path to a single feature class whose features and attributes should be returned as the content (feature class can be dragged and dropped from GIS explorer or the feature class path can be entered by hand) Formatting
  • Number format: specifies the precision with which numeric attributes will be formatted
  • Boolean text: specifies the text used for Boolean attributes
  • Date format: specifies the formatting of date time attributes
  • Include header names: if checked attribute names will be included as the first row of the table, otherwise only attribute values will be returned
  • ./Manager/image52.png
    Example output of indicator content source. ./Manager/image53.png

    Script table output

    Description Illustration
    This content source returns a table that is produced by a script.

    Configuration
  • Script: a path to a script which will be executed to return a table (script can be dragged and dropped from script explorer or the script path can be entered by hand)
  • Parameters: values of each script parameter that will be used when executing a script Formatting
  • No formatting for script table output (the script should format content of the table as desired)
  • ./Manager/image54.png
    Example script. Input parameters are optional but the return value has to be of type string[,]. ./Manager/image55.png
    Example output of script table output content source. ./Manager/image56.png

    Spreadsheet table

    Description Illustration
    This content source returns a table based on a cell range in a spreadsheet.

    Configuration
  • Spreadsheet: a path to a single spreadsheet from where tabular data will be taken (spreadsheet can be dragged and dropped from the spreadsheet explorer or the spreadsheet path can be entered by hand)
  • Sheet name: Name of the sheet within the spreadsheet from where the tabular data will be taken.
    If left empty tabular data from first sheet will be taken.
  • Cell range: a range of cells within a sheet within a spreadsheet that define the range of data to be included in the result table.
    If left empty the whole used range within the selected sheet will be taken.

    Formatting
  • Use original spreadsheet formatting: When checked, tabular data will be returned exactly as it appears in the spreadsheet (number formatting, date formatting, etc.).
    Otherwise data will be formatted according to Number format, Bollean text and Date format options.
  • Number format: specifies the precision with which numeric cells will be formatted
  • Boolean text: specifies the text used for Boolean cells
  • Date format: specifies the formatting of date time cells
  • ./Manager/image57.png
    Example output of spreadsheet table content source. ./Manager/image58.png

    Time series table

    Description Illustration
    This content source returns a table of time series values.

    Configuration
  • Time series: a path to one or more time series whose values should be returned as the content (time series can be dragged and dropped from time series explorer or the time series path can be entered by hand; in order to add more than one time series right click on the time series grid and select Add Time series or hold Ctrl key while dropping time series from time series exporer)

    Formatting
  • Number format: specifies the precision with which time series values will be formatted
  • Boolean text: not applicable
  • Date format: specifies the formatting of date time time steps
  • Include header names: if checked time series names will be included as the first row of the table, otherwise only values will be returned
  • ./Manager/image59.png
    Example output of time series table content source. ./Manager/image60.png

    Favorite image

    Description Illustration
    This content source returns an image based on a saved favorite (gis map or time series plot).

    Configuration
  • Favorite: a path to a single favorite from where the image will be generated (favorite can be dragged and dropped from the favorites explorer or the favorite path can be entered by hand)

    Formatting
  • Image type: type of image that will be generated (Bmp, Gif, Jpeg, Png, Tiff)
  • Image width: Width (in pixels) of the created image
  • Image height: Height (in pixels) of the created image
  • ./Manager/image61.png
    Example output of favorites image content source. ./Manager/image62.png

    Script image output

    Description Illustration
    This content source returns an image that is produced by a script.

    Configuration
  • Script: a path to a script which will be executed to return an image (script can be dragged and dropped from script explorer or the script path can be entered by hand)
  • Parameters: values of each script parameter that will be used when executing a script

    Formatting
  • No formatting for script image output (the script should return the image of desired type and size)
  • ./Manager/image63.png
    Example script.

    Input parameters are optional but the return value has to be of type byte[].
    ./Manager/image64.png
    Example output of script image output content source. ./Manager/DO.png

    Spreadsheet image

    Description Illustration
    This content source returns an image based on a spreadsheet cell range.

    Configuration
  • Spreadsheet: a path to a single spreadsheet from where the image will be generated (spreadsheet can be dragged and dropped from the spreadsheet explorer or the spreadsheet path can be entered by hand)

    Formatting
  • Image type: type of image that will be generated (Bmp, Gif, Jpeg, Png, Tiff)
  • ./Manager/image66.png
    Example output of favorites image content source. ./Manager/image67.png

    Time series plot

    Description Illustration
    This content source returns a time series plot image.

    Configuration
  • Time series: a path to one or more time series which should be included in the plot (time series can be dragged and dropped from time series explorer or the time series path can be entered by hand; in order to add more than one time series right click on the time series grid and select Add Time series or hold Ctrl key while dropping time series from time series exporer)
  • Plot template: name of a time series plot template to be applied.

    Formatting
  • Image type: type of image that will be generated (Bmp, Gif, Jpeg, Png, Tiff)
  • Image width: Width (in pixels) of the created image
  • Image height: Height (in pixels) of the created image
  • ./Manager/image68.png
    Example output of time series plot content source. ./Manager/image69.png

    Report

    Description Illustration
    This content source returns a report that will be used as a sub-report.

    Configuration
  • Report definition: a path to a single report definition which will be used to generate the sub-report (report definition can be dragged and dropped from the report explorer or the report definition path can be entered by hand)

    Formatting
  • No formatting for Report content source
  • ./Manager/image70.png

    Report script output

    Description Illustration
    This content source returns a report that is produced by a script.

    Configuration
  • Script: a path to a script which will be executed to return a report (script can be dragged and dropped from script explorer or the script path can be entered by hand)
  • Parameters: values of each script parameter that will be used when executing a script

    Formatting
  • No formatting for Report script output content source
  • ./Manager/image71.png
    Example script.

    Input parameters are optional but the return value has to be of type DHI.Solutions.ReportManager.Interfaces.IreportHandle
    ./Manager/image72.png

    Generating reports

    Generate report

    Description Illustration
    After a report definition is created in the system, a report can be generated.

    A report can be generated in 4 ways:
  • Manually using “Generate report…” in report explorer
  • Manually using “Save and generate…” in content configuration view.
  • Manually using the tool “Generate Report”.
    This tool can also be used in a script or in a sequence.
  • Automatically using the job task “Generate Report”.
  • ./Manager/image73.png



    The system will display a dialog where a user can provide various report generation settings.

    Settings are divided into two sections: MS Word settings (these are report type specific settings, which can be different for different report types

    General settings (settings which are independent of the report type).

    For MS Word, the following can be configured:
  • Output folder (a folder where the generated MS Word file will be written, this setting is mandatory)
  • Open report when generated (an optional convenience setting that will cause the generated MS Word file to be opened automatically after it’s ready

    General settings:
  • Save in document manager (if checked, generated report will be saved in Document Manager)
  • Document path (points to a path where the report should be saved in the document manager.

    A path can either be a folder, e.g. /reports/, or a document name, e.g. /reports/myreport.docx.

    Folder paths should end with ‘/’)
  • ./Manager/image77.png
    After pressing the “Generate” button the system will generate the report and show a success notification dialog.

    If any problems occur the system will display a warning dialog with details about each problem.
    ./Manager/image78.png

    Change report generation settings

    Description Illustration
    Each time a report is generated settings need to be provided.

    In order to save time, settings can be defined once, saved and then reused each time a report is generated.

    Settings can be saved either for current user or for every user in the workspace.

    In order to change settings for a given report definition select the report definition in report explorer, right-click on it and click “Change settings…”
    ./Manager/image80.png
    System will display a dialog where a user can provide various report generation settings.

    For description of each settings please refer to Generate report.

    After the settings have been set the user should select whether they should be saved only for him or for evey user in the workspace “Change settings for the workspace” and click save.

    The next time he or anyone (in case the settings have been saved for the workspace) generates the report the saved settings will be automatically loaded into report generation settings dialog.
    ./Manager/image81.png