Monday, July 21, 2014

Scheduler Template Fields

NextReports Scheduler allows to schedule reports at some moments in time.

Special kind of reports like Alarm,Indicator and Display can be scheduled to raise an alert if the corresponding value is in some limits. To show the actual value in the email sent, a special template field ${val} is used.

NextReports 7.2 will add more template fields which can be used in email's subject or body. These fields are:

${date}    for current date
${time}   for current time
${name}  for report name

Wednesday, June 18, 2014

NextReports: Report & Chart Internationalization

Starting from 7.2 version, NextReports will allow to have internationalized reports and charts. Users can define a set of string keys, a set of languages and the values for keys in every language. This is a special action found in Tools menu:

Only one language can be set as default. Default language is the one used when the report is run from designer. On the server side, Locale language set in Settings > General is used. If server Locale language is not defined inside report or chart, then the default language from report/chart is used.

The following things can be internationalized in reports & charts:
  • static text
  • parameters run time names
  • layout cell's pattern property
  • database column values (through expressions)
  • chart title, description, legends and tooltips
After the keys are defined, users can use them between @@ markups.

For example, a report layout with internationalized title and header column names looks like:

Our date column cell has an internationalized pattern:

where our datePattern key can be MM-dd-yyy or dd/MM/yyyy or any date pattern is needed.

$E{Activity} expression is defined to allow for database strings internationalization:

Knowing your values for Activity_Code column allows to define the needed keys: WRK, MTG, TRV, ADM (as you can see in first image). This is possible, because internationalization for expression is always done after it's evaluation.

Any parameter can have it's runtime name internationalized:

A chart can have title, description, X legend, Y legend, column legends and tooltip internationalized. For tooltip, user can enter even more than one key. This is useful for bubble charts where you can have more information inside tooltips. Such string can be like the following:

@@lifeExpectancy@@: #x
@@fertilityRate@@: #val
@@region@@: #c
@@population@@: #z

Using internationalized reports and charts will make server interaction more language-dependent. See below same dashboard in romanian and english:

Wednesday, June 11, 2014

NextCharts: Alarm Widget

'Alarm' is the oldest widget used by NextReports Server. It is just a status button with a specific color and a text. NextCharts 1.2 will contain alarm widget alongside indicator and display.

Being drawn on a HTML5 canvas, we can also add a shadow property for text and a simple animation. Json is very simple:
   "text": "Project delay is imminent! (Only 42 hours worked)",

Now, NextCharts widgets is a bigger family:

Monday, June 02, 2014

Display Report and Widget

From version 7.2 of NextReports a new type of special report is added. This is Display, and you can read about it in previous post.

As other special reports, there is a convention of representing this report. A "display" report layout looks like:

Header row band contains a title (in this case with a parameter value) and two boolean values for shouldRise and shadow properties described in previous post.

Detail row contains one column value ($C{value}) or two column values ($C{prev}). Second column value is the previous one (on a previous period of time). In case we have two values, inside band detail we will also have two expressions:

- up : to tell how "display" arrow is:

This is just a comparison between current value and previous value.

- percent : to compute the previous value as a percent:

In our example we have a table with quarter values, and we use a parameter Quarter:

Our query obtains the current and previous values as two database columns:

In our query "value" column contains the actual value and "quarter" column is the quarter string Q1, Q2, Q3 or Q4.

This is the theory behind a "display" report. This type can be selected from report root node inside layout.

To create a "display" report, users will use the Wizard tool. First step is to select a "display" type:

Then, after data source and columns/query selection steps, user has to choose one or two columns:

Following step will allow user to define the report:

In our case, we enter the parameter inside title, we choose some colors and that our value rising is a "good" thing. By clicking finish we will obtain the layout shown at the beginning of this post. Automatically the generated report will have "display" type selected.

Going to server, after a "display" report publish, users are allowed to add such widgets to dashboards:

Although, server will allow to see "display" widgets in statistics and to search for this kind of reports.

Tuesday, May 27, 2014

NextCharts: Display Widget

A new widget was added to NextCharts html5 library: Display.

"Display" shows a value (without min/max boundaries like those used for Indicator) which is associated with a period of time. You can think as example for: Number of site visitors per day, Interest Rate per month, Profit per year.Although, this widget has the possibility to show how this value performed regarding a previous value (on previous period of time).

Json for such widget is like:

   "value": "2.354",

Besides title, value and previous values and colors, we can have a background color and some boolean expressions:
- shadow: to show or not a shadow
- up: true for up arrow, false for down arrow
- shouldRise: true to indicate that a rise in value is a good thing, false to indicate that a lower value is a good thing.  For example: a rising number of visitors is good, a lower value of bounce rate is good.

Depending on last two properties we can have a green or a read arrow if the value evolves in the "good" direction or not.