Tuesday, September 09, 2014

Table Widget: Rows per page

Table Widget is just a simple component used by NextReports Dashboards. As all other widgets, it has two common properties:

  • Refresh Timeout - how many seconds must pass until an auto-refresh
  • Timeout - maximum number of seconds must pass until the database query is executed (otherwise a timeout exception is raised)

Sometimes, a table widget may contain more data and pagination is used with a default of 100 rows per page. This not just helps with visualization, but it prevents OutOfMemory errors if someone is
ill-intentioned and adds a table with millions of records inside a dashboard.

In general tables used in dashboards should have a small number of rows, but in case you really need a table with many rows, you are able from version 7.3 to set a "Rows per page" property.

 
This value can be set between 5 and 100 allowing to have a different pagination if business requires.


Thursday, August 14, 2014

NextReports: HTML Text inside PDF/RTF

Sometimes data inside database may contain simple HTML which has some formatting using tags like < b >,< i >,< font >, < br >.  When we render to a HTML file, we will see data formatted as needed.

But it would be nice to have it also in PDF / RTF files. Starting with NextReports 7.3 this will be possible out-of-the-box. The only requirement is that data starts with < html > and ends with < /html > and contains a correctly formed HTML string.

Let's say we have a column in which data is HTML text like:

<html><b><font size=\"4\" color=\"blue\">Winters</font></b></html>

Then our PDF/RTF exported reports will look like the following:

If your column does not contain < html > and < / html > tags , you can create an expression and add them by yourself.

Tuesday, August 05, 2014

Display revisited

NextCharts 7.2 introduced a new type of report / widget called display. You can read about it here.

One thing that needs to be polished is title alignment. In 7.2 release title is aligned with value. This is good in all cases when value is big enough to be at least length comparable with title. But in case the value is small and title is longer, display does not look very nice.

Lets take a simple display example when the value is smaller than the title:


In such cases it would be nicer to center the title text. That's why we added a new property to NextCharts display making json containing titleAlignment with two possibilities: center or alignToValue. By default, alignToValue is selected if property is undefined. Choosing center for this property will make the widget looks as we desired:


When we define the report in NextReports Designer 7.3, title band element can have horizontal alignment property selected as center or left (right is not considered, generating inside json alignToValue).

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:

#label
@@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: