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.

No comments: