Friday, March 18, 2011

NextReports Server : Profile Configuration

NextReports Server uses a profile concept which is attached to users that are not administrators.

A profile specifies two things :

1. what sections can be seen by users with such profile

NextReports Server has 7 sections : dashboards, reports, charts, data sources, monitor, scheduler and security. Any defined profile can contain one or more sections. By default , NextReports Server uses following profiles :

·         Analyst : all sections
·         Business user : Dashboards, Reports, Monitor sections
·         Reports : Reports and Monitor sections
·         Dashboards : Dashboards section

2. what actions need to be hidden  for users with such profile

Even if the actions are shown regarding the permissions on a specific entity (report, chart, data source and so on), some of them must be hidden for a profile.

Configuration may be done in an xml file like this :
<bean id="reportsProfile" class="com.asf.nextserver.security.Profile">
   <property name="name" value="reports"/>
   <property name="displayName" value="Reports"/>
   <property name="sectionIds">
      <list>                                 
        <value>section_class</value>
        . . .            
      </list>
   </property>
   <property name="hiddenActionContributorIds">
      <list>
   <value>contributor_class</value>
         . . .  
      </list>
   </property>
</bean>    
In this way it is very easy to add new profiles with your desired sections and visible actions making NextReports Server integration with your application as easy as possible.

Tuesday, March 15, 2011

NextReports Server : search for invalid sqls

As inside NextReports Designer, NextReports Server 4.0 allows to look for reports or charts with invalid sqls.
This is done from search action and it is the best way to find all such sqls  from a folder.

Tuesday, March 08, 2011

NextReports Server : Embedded Widgets revisited

For generated iframe tag a width and a height parameters can be entered. They are passed to the open flash chart to draw at specified size.

Thursday, March 03, 2011

NextReports: check your sqls

A needed feature to come in NextReports is sql validation.

If some columns, tables or views where deleted or renamed, you can see a warning. Every query, report or chart can be checked without open it. But the real plus is when you do a bulk check on all your queries, reports or charts. In this way you can see very fast what sqls are not running anymore. And then you can open those, if any, and resolve the problem.

'Validate Sql' action can be found inside explorer tree on one of the following nodes:
  1. any query, report or chart node
  2. queries root
  3. reports root
  4. charts root
  5. any folder found inside queries, reports or charts root
    All queries, reports and charts which are invalid will be seen inside explorer tree with warning bullets over their icons.

    Thursday, January 27, 2011

    NextReports : new page addon

    For pdf, rtf, excel exporters, a new page option is very important. NextReports allows to specify that after every group, a new page (sheet for excel) will start :


    From version 4.0, every row from layout has an action 'New page' :


    When you select this property, a small '+' bullet will be shown over row icon :

    NextReports : charts inside reports.

    Till version 4.0 charts could be exported only as flash, needing an internal server to allow for previewing. Because a chart image could not be created programatically, a chart could not be inserted inside a report.

    From 4.0 a chart can be also exported as a jpg image. Using this exporter, now it is possible to insert a chart inside a report (to be seen in HTML, PDF, RTF, EXCEL or saved in XML)  :


    A pdf result  (for chart data analysis part) looks like :


    A chart element is similar to an image  element, the only difference is that for chart the image is dynamically generated. So, a chart element can be resized similar to an image element.

    Tuesday, January 11, 2011

    NextReports : French Internationalization

    From version 4.0 NextReports will be also internationalized in french. N'hésitez pas à l'essayer.

    NextReports : Text Flat File with fixed-length columns

    NextReports 4.0 will bring a new type of file export, a simple text flat file. But instead of already existing csv and tsv types , this new "To Txt" exporter will allow to have fixed-length in characters for columns.

    To specify size in characters for columns a new action was created which is similar with size in pixels.


    Horizontal alignment property makes the text to be left-padded (for RIGHT value) or right-padded (for LEFT value). For CENTER value, text will be right-padded.

    Result will be like this (for left-padded values) :

    Wednesday, December 15, 2010

    NextReports : History Pagination

    NextReports Server has a Monitor panel where user can see all processes that are running and all scheduled processes that are active. Also , here it can be seen a history of all executed processes and if they finished successfully or not.

    History data has security permissions, meaning a user will see only history for those reports he has rights to.

    Problem: Because security is done using @Secured spring annotation :
    @Transactional(readOnly = true)
    @Secured("AFTER_ACL_COLLECTION_READ")
    public List getRunHistory() {... } 

    our data provider  has to load all history data , which will become time consuming soon enough. Pagination is used, but in this case it is only a mode to show less data at a time.

    Solution: History will be load only for the current day. A day filter is added to our history panel to allow for seeing history for any other previous day.

    Monday, November 15, 2010

    NextReports Server : Embedded Widgets

    NextReports Server 2.5 widgets have a new action called "Embedded Code". This action shows inside a panel an html code that can be inserted in any other web site page to view the corresponding widget. To accomplish that an iframe is used :

    NextReports Server : Widgets Cache

    NextReports Server allows from version 2.5 to define cache settings for all entities that can be added to dashboards : charts, table reports, alarm reports.


    Reports are represented with different icons to know which ones can be cached. In next picture, besides simple reports, we can spot alarms and tables.


    User can set an expiration time in minutes, if cache is used:


    So only on the first load, a widget will do a database call. Any refresh inside dashboards done for all widgets created from a dashbordable entity, will take the result from cache until it will expire, then it will hit the database and again for next calls result will be taken from cache until cache will expire again.

    Wicket, Open Flash Chart, HTTPS and Internet Explorer

    NextReports Server uses Open Flash Chart to present charts inside dashboards.

    After setting a https server, on Internet Explorer all the flash widgets showed a #2032 Error. Firefox was working as expected. This was obviously an Internet Explorer bug and the solution to it was to add two response headers : "Pragma" and "Cache-Control".

    Testing again, everything was ok, except refresh action. A refresh on IE wouldn't load the chart. The problem was IE cache. Also no drill down was possible because of this. The cache mechanism in Internet Explorer is different from that used by other browsers like Firefox. So we need to force IE to not cache flash. We add another response header "Expires" and set it to -1, and also we used "no-store" value  for "Cache-Control".

    Final solution was to use in our WebResource the following :
    protected void setHeaders(WebResponse response) {
        response.setHeader("Pragma", "public");
        response.setHeader("Cache-Control", "no-store, must-revalidate");
        response.setHeader("Expires", "-1");           
    }     

    Wednesday, November 03, 2010

    NextReports Designer : Choose Borders

    For previous versions, user can select for a cell which borders to see (top, left, right, bottom). All borders had the same thickness (thin, medium, thick) and were black.

    Starting with 3.5 version, border chooser was improved  :
    • user can select a different thickness for every type of border
    • user can select a different color for every type of border

    Exports in HTML, EXCEL, PDF and RTF can generate now colored borders.

    Monday, October 25, 2010

    NextReports : Alarms

    NextReports Server dashboards can contain charts and tables. Tables are a specific type of reports with a column header and data. In next release, dashboards will contain also alarms.

    An alarm is also a specific type of report created with NextReports Designer. Such report they must have two cells in the detail band:

     
    • First cell is a column (status) with formatting conditions for background color.
    • Second cell is an expression "if .. else .." which returns a different message for every known status (column value)
    On the server, first cell is drawn as a status led which will have the color the same with cell background color. The message will be shown next to the image.

    For example, the formatting conditions for the first cell can be :



    This image shows that for a value <= 0 , background color is red, otherwise background color is green. Expression in the second cell is defined as :
    if ( $C_NUMBER_PC <= 0 ) {
        "Alarm!";
    } else {
        "Ok";
    } 

    On the server, the result will be like this :


    To publish a report to server as an alarm, a new property called 'alarm' was added.


    NextReports : Report Distribution

    For versions until 2.4 , NextReports Server  allows only mail distribution. Generated reports can be sent through mail to a list of recipients. Mails can contain a link to generated report or the entire report as an attachment.

    For upcoming  version, a report can be distributed to one or more destinations. Mail destination is like in previous versions :


    User can see now a list of all configured destinations :


    Other destinations that can be created are FTP, SSH, Windows Share and WebDAV. Configuration for FTP and SSH is similar :


    For WebDAV, user can also specify if connection uses https. For Windows Share, in addition to FTP, user can  optionally enter a domain property. Destinations also have a Test button to see if they are valid.

    Tuesday, September 21, 2010

    NextReports Drill Down Charts

    NextReports Server is able to show drill down charts inside dashboards. The number of levels to drill down is infinite.

    To create drill down charts use "Drill Down" action on chart entities. This action is visible if the user has write permission on that chart :


    If a chart has at least one drill down chart , the chart icon will show this through a "link" bullet.

    For our example we have a chart which shows the projects (x axis) and number of hours for every project (y axis). First drill down chart will show the number of hours worked by each employee. To create this first drill we add the chart with a "project" link parameter which contains the project name x axis value.


    Second drill down chart will show the number of hours for each workcode for selected project and employee. To create it we add a chart with an "employee" link parameter which contains the employee name x axis value.


    For every drill down level all selected parent parameters will be passed. In our example, for second drill down chart, the project name will be also passed along with employee parameter.

    The drill down chart panel shows all the added charts:


    From here we can also delete drill down charts.

    When we add the ProjectHoursBar chart to a dashboard, we won't see any difference to a simple chart.


    But because this chart was created with a 2-level drill down functionality, we can select one project with the mouse and the next drill down chart will be shown :


    Here, under the toolbar, a link called "Up" is visible allowing for returning to the parent chart. We can select now an employee and we will see the workcode hours for that employee working in previously selected project :


    You can view this on the online demo.

    Wednesday, September 01, 2010

    NextReports Layout Zoom

    Version 3.4 of NextReports Designer makes use of moving to Java 1.6 and brings a wanted feature.

    Report Layout can be zoomed between 50% and 300%. Values outside this range were not considered suited for designer. A zoom can be done with the spinner in the top right corner or with the CTRL + mouse wheel, same way as browsers zooming.


    This feature is most useful if font size for a cell is too small. If that cell also contains a database column , the user interface combobox popup will have items which cannot be understand. By zooming the layout, this is not true anymore and user can see what he is doing.

    Monday, August 23, 2010

    NextReports : dynamic values for scheduling

    Until server versions prior to 2.4 , the only way to have dynamic parameter values was to have those parameters defined as hidden. From version 2.4 you may have dynamic values also for visible parameters.

    What does this mean?

    NextReports engine recognizes "hidden parameters", meaning those parameters that are not visible at runtime, but which have default values declared in their definition.

    On the server, a report can run instantly or it can be scheduled to run at some moments in the future. There is the possibility to want to run the same report instantly and also to schedule it. For some visible parameters with default values, we may have to "override" their values selected in user interface with default values computed at runtime. For these cases , the schedule process introduces a new property in parameter selection panel.

    Every parameter which has default values provided by an sql select, will have inside user interface a boolean property called "dynamic" :
    • If this property is false, the report will be executed with the static value(s) entered.
    • If this property is true, the report will be executed with dynamic values, meaning the sql for default values is executed at runtime.

    Thursday, July 29, 2010

    NextReports 'Hide when expression' property

    NextReports Designer version 3.3 will add a new important feature to its core engine. A new property called 'hide when expression' can be set for every layout cell .

    What does this mean?

    This property contains an expression. If expression is evaluated to true at runtime, the cell content will be empty in the resulting exported report file. Also, if all cells from a row have 'hide when expression' property set and all those expressions are evaluated as true, the entire row will be hidden.

    Example

    Lets show an example with default Timesheet report.


    You can see detail row D1 with some expressions. $E{WorkHours} expression  represents the work hours from column $C{Hours} and it is defined like this :


    All other expressions are similar testing the corresponding activity code.

    Because we do not want those expressions to be shown at runtime, we will set 'hide when expression' property for the containing cells. In this case, the expression is one which will always be true :


    All cells from D1 row are always hidden, so the entire row will be hidden. That is why there is no need to set other properties for those cells like color, font and so on.

    Expressions are used in some functions which can be seen in footer rows. For example, the total work hours is a function created on $E{WorkHours} expression :


     In this way we can have a more detailed report as seen in following results :

    Wednesday, July 14, 2010

    NextReports Server 2.3

    Forthcoming NextReports Server version will bring some new features regarding dashboards :
    • Any widget (chart/table) from dashboard can be detached, resulting a popup frame which can be maximized to full screen (with F11 key) . This will allow to view a chart on a plasma.
    • There is a new action 'Go to entity' which will redirect the user to the chart / report used by a widget. This will offer an easy way to update or to do any supported action for that entity.
    • Widgets have now an auto-refresh time (in seconds) property which can be modified from settings action (0 means no automatic refresh). This property will also be used inside a widget detached popup frame (instead the general "update interval" property defined in application settings)

    Also, from this version, user is allowed to manually enter multiple values for parameters. Previous versions allowed only for manual single insertion (from a text field, calendar and so on) .

    You can view these features in Online Demo version. ( demo / demo  )