Tuesday, September 29, 2015

Deploy NextReports Server on WebLogic 12c

First, you should create a nextreports-server.war folder and unarchive the war file here.

Inside nextreports-server.war/WEB-INFyou should add weblogic.xml file:
<?xml version="1.0" encoding="UTF-8"?>


Here we specified we want another joda library than that used by weblogic.

Next, we have to register reports folder as a web context. We create a reports.war folder as a sibling to nextreports-server.war, and inside it we have a WEB-INF folder with two files:  
<?xml version="1.0" encoding="UTF-8"?>
 xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
and weblogic.xml where we specified local path to our reports folder:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-web-jar.dtd">





After your server starts, you should accordingly modify your server settings like base url, reports url , mail server and so on.

Publish static context to WebLogic

Tuesday, August 18, 2015

NextCharts: Bar Charts with Negative Values

NextCharts has now support for bar charts with negative values. A new chart type called nbar was introduced. From NextReports 8.2 version this feature will be part of designer and server.

A simple bar chart with negative and positive values will show all values over X axis if chart type is bar:

If we just change the type from bar to nbar,  X axis will be considered at 0, so positive values will be shown over it and negative values will be shown under it:

In case all values for nbar are positive, then it will be no difference between bar with startingFromZero=true and a nbar chart.

In case all values for nbar are negative, then the chart will have all its values under X axis:

nbar chart can support as styles glass (as above) or normal:

Wednesday, August 05, 2015

NextCharts: Highlight selection

From version 1.5, in addition to tooltip message,  NextCharts allows to highlight selected element through a changed color. This version of library will be used by NextReports Server 8.2

There are different situations which were taken into account. For simple 2D charts like line, area, bar, pie, bubble, selected element (like bar, arc, circle) will have another color, lighter or darker depending on the brightness of the current color. For 3D charts like dome, cylinder, parallelepiped, selected element will be the 'visible' part of it and it needs some more drawing adjustments to show (after fill) all the lines and arcs that are supposed to be on top.

Let's see some examples of highlighting.

Bar highlighting:

Stackedbar highlighting:

Line highlighting:

Pie highlighting:

Cylinder highlighting with different area selection between top and other elements:

Tuesday, July 14, 2015

NextReports: Grid Style for Charts

NextReports charts can have a grid shown for x, y values. Till version 8.2, this grid can only be a full-line of a specific color. From version 8.2 this grid can also have style like line, dashed line or dotted line. This style is specified for both X and Y grid lines:

By default, simple line style is used:

The other two styles are dashed line:

and dotted line:

This feature is available on all modern browsers and it is supported from Firefox 27+, IE 11+.

Monday, June 22, 2015

Adjust your SQL queries to see data series

Many users have data in a specific table format with a 'type' column and want to show inside a chart series for every value of 'type'.

Lets take a simple example of a DAY table (where NAME column is our 'type') :
NAME               VALUE               CREATION_DATE
MORNING            90                  2015-06-12
NOON               210                 2015-06-12
EVENING            60                  2015-06-12
MORNING            85                  2015-06-13
NOON               240                 2015-06-13
EVENING            50                  2015-06-13
MORNING            92                  2015-06-14
NOON               235                 2015-06-14
EVENING            55                  2015-06-14

We want to show DATE on x axis and series for MORNING, NOON, EVENING on y axis. To make this happen NextReports must obtain a query result like:
2015-06-12        90           210      60 
2015-06-13        85           240      50   
2015-06-14        92           235      55 

Then it is very easy to add DATE on x axis and MORNING_V, NOON_V, EVENING_V on y axis as column series.

This transformation can be easily obtained using sub-queries. For example, on our table we will use following sql:
   (select VALUE from DAY a2 where a2.name='MORNING' and         
   (select VALUE from DAY a2 where a2.name='NOON' and
   (select VALUE from DAY a2 where a2.name='EVENING' and
DAY a1