Skip to main content

Creating and editing

Select New report at the top, or Edit on a report's details, to open the editor. It takes the whole screen; Close (or Reports at the top left) goes back to the list with the report open on its Configuration side.

The editor with a test run of Daily gas prices

The buttons at the top are Fusion AI (see Fusion AI), Close (or Cancel), Save and build (save, then choose dates to build) and Save (also Ctrl+S). Unsaved changes shows while you have changed something; leaving asks before the changes are lost.


About the report​

FieldExampleNotes
IdNGE_DAILY_GAS_PRICESLetters, digits, _, . and -. It cannot be changed after the first save
NameDaily gas pricesShown in report lists and the Excel Add-in
DescriptionSettlement prices for TTF, NBP, THE and PEG
TypeDefaultSee the table below
Category, Sub categoryGas, DailyGroup reports in lists
Tagsgas, dailySeparated by commas
TypeUse it when
DefaultAn ODSL function makes the data for an ondate. The platform builds it on its schedule or when asked
FixedSomething else saves the data for each ondate: a script with save ${report:...}, a process or the API. The platform does not build it unless it has an expression
DynamicThe report should be built the first time someone reads an ondate. Today is always offered
Insight, WidgetA page made from its template each time it is run, with properties such as the item it is about. Never stored, no schedule

How it is built​

FieldExampleNotes
Scriptnorthgate\reports\daily-gasThe ODSL script that holds the function. Suggestions appear as you type
ExpressiondailyGas(#ONDATE, #REPORT)What makes the data. #ONDATE, #START, #END and #REPORT (the configuration) are set when it runs
Templatenorthgate\templates\daily-gasThe Mustache script that makes the page. It receives name, description, ondate, start, end and data. Without one the data is shown as it is
Default rangelast(30)The range of data when a build does not give one: last(n), from(date), between(date, date), within(date). Without one, everything
Currency, Units, TimezoneEUR, MWhRead in the function as #REPORT.currency, #REPORT.units, #REPORT.timezone

The script and the template​

When the report has a script or a template, the editor shows a tab for each next to Configuration, with its id. Open next to the field goes to its tab. Each tab is the Script Manager's editor, runner and debugger, as in Script Manager and Smart Data:

  • completion (Ctrl+Space), hover help and syntax errors marked as you type, for ODSL;
  • Run the whole script, or a function or region from the Run menu or the Run above a function. A function the expression calls gets the expression's arguments, with #ONDATE as the test run's ondate. The result, the log, the input and the recent runs show under the editor;
  • Debug with breakpoints (click the margin, or F9), stepping, variables, watches and the call stack;
  • Save script (or Ctrl+S) saves a new version and asks why it changed, for the audit trail; Revert undoes your changes since the last save;
  • fill the view or go full screen for more room.

The script of Daily gas prices on its tab, after a run

Templates are edited the same way, but cannot be run: use Test run on the Configuration tab to see the page. A public script or template (its id starts with #) is read only; a public script can still be run.

When the field is empty the button is New: give the new script or template an id (one is suggested from the report's id, such as reports\nge_daily_gas_prices) and a description. A script gets a function to start from (named after the expression's function, or buildReport, which the expression is then set to call); a template gets a small page. It is saved at once and opens on its tab.

caution

A script or template can be used by other reports and processes. They see the change as soon as it is saved. Script Manager keeps every version, so you can roll back there.

The report uses the saved script and template. When you Save the report or Run a test with unsaved changes on the Script or Template tab, you are offered to save them first.


Schedule​

The schedule section

Choose one of the Common schedules or type a cron, and tick Build it on its schedule. The text under the cron says when it runs, for example Weekdays at 08:00 UK time. The editor checks the cron as the platform does: 6 or 7 parts, the timezone UTC, EU1 (UK) or EU2 (Central Europe), and day names (MON-FRI) rather than numbers. See Schedules and automations.


Storage and visibility​

FieldNotes
Store a built reportStored when it is built (the default), Never stored (built every time it is read), Stored by its schedule only, Built and stored by another application
Store it inPrivate (the default) or public. Only OpenDataDSL can store reports in public, so for everyone else this field is not shown and reports are always stored in private
Merge updates (fixed reports)Each save for an ondate is merged into the report already there instead of making a new version; rows of arrays are matched on the Merge keys (default id, key, name)
Hide it from the Reports list, from the Excel Add-inFor reports nobody needs to pick from a list, such as run histories

Properties​

Settings for the report as JSON, read by the function as #REPORT.properties and by the template as properties, for example a list of hubs. The editor marks JSON that does not parse, and will not save it.

{
"hubs": ["TTF", "NBP", "THE", "PEG"]
}

Test run​

A test run showing the prices table

Choose an ondate (the previous weekday at first) and, if you like, a range, then Run a test. The report is built from what is in the editor, saved or not, and its data is shown as tables, or as JSON. An error in the function is shown in red with the platform's message.

note

Testing saves nothing: no configuration and no stored report.

The editor also warns you about things that are allowed but probably not meant: a default report without an expression, a schedule that is ticked but empty, or a scheduled report that is never stored.


Fusion AI​

Fusion AI can make a new report for you, or improve the one in the editor.

  • Create with Fusion AI (under New report) opens a new report and asks you to describe it: what it shows, the data it uses, how often it runs and how the page should look.
  • Fusion AI at the top of the editor, or on a report you own, asks what should change, for example show the change in percent as well or fix the error in the test run.

Asking Fusion AI to improve Daily gas prices

Fusion AI sees the configuration as it is in the editor (unsaved changes included), its script and template, and the last test run. It uses its own tools to look up ODSL and to find real curve, timeseries and master data ids; it does not make them up. It may ask you a question first, such as which hubs to include: pick an answer or type your own.

Its proposal is shown before anything changes: the fields it would set, side by side with what they are now, and its script and template as a comparison with the saved version (lines taken out in red, lines added in green), with any notes.

What Fusion AI proposes

ButtonWhat it does
ApplyPuts the changes in the editor. Nothing is saved yet
Ask for changesTells Fusion AI what to do differently. It remembers the conversation while the editor is open
CancelLeaves everything as it was

After Apply, the script and template show Changed by Fusion AI, not saved yet (or New by Fusion AI), with Undo. Opening their tab puts Fusion AI's version in the editor as an unsaved change, so you can run it, debug it, change it, or undo it with Ctrl+Z. A script already open on its tab gets the change straight away. They are saved with the report when you select Save. A test run uses the saved script and template, so Run a test first offers to save the changes to them.

Fusion AI's change to the script, waiting to be saved

note

The conversation is kept in the Fusion AI chat history (category reports). Fusion AI must be set up for your company: if it is not, the editor shows the reason.


Next​

Reading reports