Friday, December 07, 2012

NextReports Server : Iframe Tunning

NextReports Server allows to have any widget (chart, table, alarm, pivot) inserted in any HTML page through an iframe tag. This can be generated through "Embedded code" action:


You will get a code like :

This code has some parameters like widget id, width and height.

From version 5.4 users can define if they want to allow iframes or not. Inside Settings section some new properties can be used:


"Enable iframes" property will disallow the use of iframes if it is not selected.

"Use authentication" property will allow only for logged users to see iframes, if it is checked.

Also an iframe code can be modified to contain parameters. In this way more iframes with different settings can be used even if they have the same widget id. You have to add a new parameter :

..&P=<encrypted parameters string>

"Encryption key" is used by NextReports Server internal algorithm.

To create <encrypted parameters string> you will have to create a string with pairs of parameters and their values like :

$P{<parameter_1>}=<value_1>&$P{<parameter_2>}=<value_2>....

This string must be  then encrypted using an internal algorithm. Because this is application specific, I will not get into details.


Wednesday, November 14, 2012

NextReports: Efficiency Meter

NextReports formatting conditions can be used to highlight some data by changing background, foreground, font and border properties.

A very useful application is to generate something like an "Efficiency Meter" or any kind of "Meter". Such meter will show how some entities are found regarding some thresholds.

Let's take as an example of our "Efficiency Meter" a call center where different employees are talking with different clients. We set some thresholds for the number of phones per employee to know how they perform.

A sample report may show employee name, the number of phones taken for a period of time (in our example 11 hours), the number of clients involved and the average of calls for a period of time (in  our example 1 hour).


To define our efficiency meter we have to select different colors for our thresholds. For this we use formatting conditions. In our case, $E{Average} field has the following:


Result shows us in a nice format how everyone performed and it allows us to see in a glimpse if there are ups and downs.


Friday, November 09, 2012

NextReports Server: External Drill Down

From version 5.4 NextReports Server will define a new type of drill down. This can be any external url. Just add a new drill down like:


You can use the clicked value with a tag called ${value}.

Also, depending on last entity selected, you may be asked or not to select the column index used by table reports. If you have a table report as last drill before to add a url drill, this column will be shown, otherwise it won’t.

After adding a url drill down, no other drill can be added to that entity.


Monday, October 29, 2012

NextReports: Custom paper size

Version 5.4 will allow to select a custom paper size for a document to be used for PDF and RTF exporters.

Users have to select CUSTOM to paper size property and then to edit custom definition property to enter width, height and measure unit. Custom definition property is seen only when paper size is set to CUSTOM.

To exemplify this let's consider our business card report.


 We select 8,89 x 5,08 cm for our business card:



Generated PDF will have all pages with the size of a business card:


Tuesday, October 23, 2012

NextReports: Use a background image

In NextReports 5.4 user can set a background image for report. You have to select "Report" root and add an image to 'background image' property.



 Then any generated PDF or HTML will show that image and all cells background colors will be ignored.

PDF

HTML 

Friday, October 19, 2012

NextReports: Total Pages Number

In documents like PDF sometimes it may be needed to have a Total Pages Number to be shown on every page header or footer.

In version 5.4 a new variable TOTAL_PAGE_NO can be used to accomplish this. This variable is a bit different than all other variables which can be evaluated as the records are read.  TOTAL_PAGE_NO variable can be evaluated only when the document is closed. Because of that, you cannot enter this variable inside an expression and you should always use it standalone.

So, how do you create an expression like "Page 1 of 10" in your header? You have to split this into two elements:
  • an expression for the part that is evaluated as the document is created ("Page 1 of"). In this expression you will use PAGE_NO variable

  • a simple TOTAL_PAGE_NO variable inside a cell near the expression
Your layout with these two elements inside a page header row will look like:


As you see, first cell element is right aligned, while the cell with variable is left aligned. And the pdf result will look like:


Friday, October 12, 2012

NextReports: Charts Dynamic Series

When you define your chart in NextReports Designer, you have to select what to see on X axis and on Y axis. By selecting more columns (series) on Y axis, user will be able to see comparative data.

Till version 5.4, NextReports was able to select static columns and legends. But there are situations when you want your chart to show all existing series from a specific business. For example to see the type count  for some products, but you have a dynamic list of products: some products may be removed or some may be created in the future. And you do not want to change the chart anytime a change to that list of products is done.

To establish this:
  •  user must create the chart query  in a dynamic mode (no hard-coding)  with a simple sql query or  with a procedure call (a procedure call may be more suitable in most of the cases)
  • user will leave the  Y column unselected in chart layout (also no legend has to be entered)

  • user will enter an sql (simple query or procedure) inside a  new property called "column query" which must return string pairs of {column name, column legend}



When the chart is run, the dynamic columns are computed and they are used as the series. In this way any new changes to our list of products will be automatically seen inside the chart.


This new feature will bring more flexibility to NextReports starting with 5.4 version.

Thursday, October 11, 2012

NextReports: Business Cards

NextReports is a very flexible tool to generate any kind or reports / documents. Because it offers possibility to select column sizes, you can practically generate anything from business cards, envelopes, invoices. To illustrate this we can show a simple report to generate business cards for your employees. This can be arranged as you like and printed on an A4.

Layout can be for example as:


Any dynamic fields can be expressed through database columns or expressions, image can be inserted wherever you like, you can adjust your horizontal size by setting columns dimensions, you can adjust your vertical size by setting properties like font size and padding for any cell.

Generated report looks like:

Do you want to generate to a business card A4 template which has two columns? Just use this report as a sub report with a parameter "Employee" which you will use in your query:


Your master report will have a simple  query where you will select the employe column with the alias "Employee", identical with sub report parameter name:



 and in your layout you will add two sub reports:


So your generated report will be :


Wednesday, October 03, 2012

NextReports: Widgets with dynamic parameters

NextReports widgets (charts, tables, alarms, pivots) can show you important and live data inside dashboards. The entities behind (charts or reports) can have or not parameters. You can have for example a chart showing exchange rates for the last two weeks without using date parameters (like the one found on the demo server).  The query used to perform this using MySql is:


If you want to have parameters, to tweak them for server UI, you must define them with a default source inside designer definition. You can define start date for example to be with 7 days previous to current date like:


End date parameter will be just the current date:


NextReports is able to schedule a report with such parameters using a dynamic check flag. By selecting it, the server assumes that the values for those parameters will be computed at run time instead of using the computed stored (static) default values.

For widgets there was not possible to have dynamic values for parameters. With the forthcoming 5.4 version it will be possible to select dynamic flags for widget settings like in scheduler definition:


In this way you can play with same widget both in seeing data for a dynamic period of time and in analyzing data for a specific static period of time.


Tuesday, October 02, 2012

NextReports: Barcodes

Because version 5.3 brought possibility to insert a report in another report, now you can generate even invoices with NextReports. For that a new bar code element was added.

An example with EAN.UCC-13 type looks like:


Do you need to a QRCode? You can do it:


The following bar code types are supported: EAN.UCC-13, EAN.UCC-8, UCC-12, UPC-E,  SUPP2, SUPP5,  CODE128, CODE128-RAW, INTER25, CODE39, CODE39EXT, CODABAR, PDF417, DATAMATRIX, QRCODE.

Thursday, September 27, 2012

Analyzing NextReports downloads with NextReports

Because NextReports is a reporting tool, it can be used to make analysis even on itself. We use NextReports to analyze the download process of its artifacts: engine, designer, server and update (designer download started from application update).

To make this analysis possible a simple pivot is used. This pivot can show things like:
  • location from where the download was started through fields like country, city, ip.
  • artifact that was downloaded through fields like product, file, version
  • time when the download  was done through a date field

A simple selection that shows the number of downloads for every artifact is like this:


Report used by pivot also has parameters which allows to filter data. For example it is easy to select a period of time between to dates, country, product, version:



Results will show more than simple statistics. It is easy to spot attacks of Denial Of Service type if a large number of downloads is seen from the same ip:


Also it is possible to know how many downloads are done in a period of time, seeing totals for product or for artifact:


This is just an example when NextReports pivot can be really useful to make analysis and get a lot of answers from raw data.

Monday, September 24, 2012

NextReports: Pivot Widget

NextReports Server allows users to add a pivot widget inside a dashboard. This pivot can be created from any report found on server. Pivot widget is based on a simple sql query without OLAP integration.


User selects what he wants to see on ROW, COLUMN and DATA. Also two check boxes will make the totals for rows and columns visible or not.

When user clicks compute, data is presented to user. Also, on compute action, user selection is saved and when user returns to the widget, this selection is made automatically.

Being a widget, user can also detach a pivot and make it as big as the screen with F11 key to have more space if needed.

Alongside drill-down, pivot widget brings a new BI feature  to analyze data.

Because we want to contribute to java open source, our wicket pivot  project was put on github.

Do you have something to say about our pivot? Please tell us more on our forum.


Thursday, August 30, 2012

NextReports Server: A good-looking login screen

Application login screen must offer more than just a simple form for credentials. This screen can be the place where user has access to information. Here users can learn what's your application about and can access links to everything they need like manuals, tutorials, license policy and so on.

NextReports Server login was improved to show more info about NextReports Suite in following releases.


Besides all previous links, now users can go directly to next-reports web site to read about engine, designer and server.

Thursday, August 23, 2012

NextReports: Easy way to use subreports

Following previous post "NextReports: Parent and children reports"  it's time to show a simple example of a sub-report usage.

A sub-report is just a simple report with one or more parameters. Let's think about a report which shows a list of employees and the hours they worked for a specific project:



This report has a $P{Project} parameter. When we run it, the value is asked:


and after selection the result is like:


To use this report as a sub-report, we have to create a master report. We use as example a report that selects a list with projects and total hours worked for projects. In one cell we will insert the sub-report, making the layout looking like:


To make our sub-report have the $P{Project} parameter completed for every column $C{Project} NextReports has a simple convention: The column from master report must have an alias with the same name as the parameter from sub-report. In our case both alias column from master and parameter from sub-report have the name Project.

When we run this report we will get a nice PDF. We just use some colors to see what is from master and what is from sub-report.


Tuesday, August 21, 2012

NextReports: Simplify Perspectives

NextReports Designer uses a concept called "perspectives".  Any report or chart can be seen from two perspectives : query (sql) and layout.

Because NextReports has two types of layout entities (charts & reports), designer main toolbar contains three perspective actions:
  • Query Perspective
  • Report Perspective
  • Chart Perspective
Report and Chart Perspectives cannot be enabled at the same time, so a nice improvement can be done here.

In the new 5.3 release only two perspective actions will be shown, making user interface more concise:
  • Query Perspective
  • Layout Perspective

Practically, "Layout Perspective" will show a report layout or a chart layout . "Layout Perspective" action will be disabled when just a query is loaded and enabled when a report or a chart is loaded.

Monday, July 30, 2012

NextReports: Parent and children reports

With 5.3 version, NextReports will bring a very needed feature: possibility to insert a report inside another report. In the same way a chart is inserted inside a report, now a new action is available allowing to add a report. As for charts, all parameters from parent report are passed to child report if child has some identically with parent's ones.

If the child report is inserted inside detail band, to make it acting as a sub-report, it has to meet a simple convention condition. For any child report parameter, if user wants the parameter to have a record-dependent value, the column from parent report (which has to pass the value to sub-report parameter value) must have an alias with the same name as the sub-report parameter name.

Besides a relation of report/sub-report, a parent report can contain just a simple set of children reports allowing to have more queries inside a report. To make this possible, the children reports can be inserted in header or footer bands.

To make work with children charts and reports easier, NextReports Designer will allow to edit children directly from parent report. When we will Edit a chart or a report, designer will open the child and user can do any changes he wants. After the child report/chart is edited, user will return to the parent report through a special action:


Using this kind of navigation (edit inner report/chart - back to parent), user can go inside & outside to an infinite number of children reports.

Monday, July 23, 2012

NextReports: Table Widgets with Style

NextReports dashboards can contain table widgets, which basically represent grid reports created with the designer.

Forthcoming version of NextReports will take into account the layout of the report making table widgets to contain corresponding style. This means colors, font style, padding and alignment will be visible. Some properties like font family, font size and borders are not taken into account, being irrelevant.

A major benefit of using styles for table widgets is interpreting  formatting conditions  (with relevant properties) for cells and rows. Such example can look like :


Thursday, June 21, 2012

NextReports Server: Queries

NextReports Server manages reports and charts. Both are created upon an sql query which was not seen anywhere on the server. The only thing users could see was the list of parameters values used to run a query.

Version 5.3 of server will bring more information regarding sql queries. First, in monitor a new column Query will be added:
By clicking it, the full query (with all parameters replaced by the actual run values) will be seen:

In Info actions for report and chart, users will see also the query:


Search actions for report or chart will bring a new entry "Sql Contains" which will look for all entities whose sql queries contain the entered text:


It is possible now to search for a special column or table (for example) used in our reports, identifying very fast what reports may be affected by column or table name changes.