Empowering End User Visualization with JReport

Share on LinkedInTweet about this on TwitterShare on FacebookShare on Google+

We hear a lot of discussion about ad hoc reporting and self-service reporting.  Are end users really capable of understanding what data they need to see and designing a report for their own requirements or is it easier for them just to make the request to IT and wait for it to be delivered to them?

My first experience with databases was with a network database sold by Intel called System 2000 that was one of the most popular databases in the 1970s and is still in use today.  Later I joined a new database vendor called Unify that started the same year as Oracle.  Unify also was originally a network database and didn’t have a fully relational model until 1984.  Obviously we were not as aggressive in marketing as Larry Ellison even though we had a better product.

Over the years many products have attempted to make SQL more approachable by end users and maybe the most successful has been Microsoft with Access and Excel with their query design wizards.  But in practice, it is too difficult to understand the schemas of real enterprise applications, and management will not allow end users access to corporate data through SQL where small mistakes could create huge resource usage as well as result users with invalid results.  A better solution is needed to allow users to easily create queries and reports.

Is there a solution available that does allow end users to create their own reports and get data directly from the up-to-date transactional corporate database?  Yet at the same time still ensure the SQL is properly written and security roles strictly enforced to ensure the data is accurate?  Also the query must not use too many resources and the user has permission to access the data.

Yes, the answer is JReport, which provides a meta-data layer that isolates the user from the actual SQL code that selects the data from the database.  In JReport, we call this a Business View of the data.  Using JReport Designer the developer creates the queries to access the data and provides the security information based on the user’s role and permissions as to what data the user can see.  The Business View is an end user’s view with understandable field names and categories of fields such as group fields, detail fields and aggregations.  The user simply drags the fields on to the report as detail, groups or summaries and JReport accesses the database with the pre-defined query template so the joins are always valid and the data is valid for the user’s security permissions.

Business View (1)

If the query is already written, how can it be as efficient as possible when user’s request reports with summarized data such as charts, crosstabs and summary tables?  JReport’s answer to this is called push-down technology.  Whenever a report needs aggregated data based on the groups in the Business View, JReport automatically overrides the pre-defined query keeping all of the joins but adding aggregations and Group By clauses so the database will perform the computation and only the summary data needed in the report is returned to JReport.  This ensures the query will always be as fast as possible and the developer does not need to create imported queries for every possible grouping and aggregation the user might need.

A major concern for all customers is what impact ad hoc users have on system resources. What if there are a lot of users who need to do analysis and reports from the same data and everyone creating and running their own ad hoc reports is too much of a load on the server?  In this case, the JReport Server administrator can schedule a Business View in-memory cube be created and updated on a regular schedule.  This is transparent to the end users.  The existing and new reports will automatically start using the data from the in-memory cube that is shared by all users.  What if the reports need detail data?  That’s covered too because the cube generator can also optionally save the detail information on disk cache that is still shared by all users without making queries to the database.

How does the IT group ensure that reports created by end users follow the same standards as managed reports created by developers?  JReport allows the developer to create templates for the user to start with pre-defined styles, colors, logos, and default labels and images that the customer wants to use for each report.  This ensures that the ad hoc reports created by the users are consistent with reports built by the IT department.

Besides the ability to create new reports, end users have the ability to modify existing managed reports and save them for their own use.  Almost everything on a report can be changed by the end user.

Here are some examples.  The managed report has a crosstab that is grouped by quarters (of a year), but the user wants to see the results broken out by month.  He can simply drag the month group onto the table and it is added.

blogmonth

What if a table is grouped by category and the user wants it completely changed to a report by country and state?  Again he can right-click, select Go To -> Country then drag state in as another group.

table-go-to-country

No matter how you design the table, the user can modify it to their needs by adding detail fields and changing and adding groups.  Even if the detail field needs to be calculated such as margin from price and cost, the user can create their own formulas and aggregations and add them to the report.

For charts the user can also open the chart wizard and change everything on the chart including the type of chart.  He can even change the chart to a crosstab.

For crosstabs the user again can change every item in the crosstab including all the rows, columns and aggregations to meet their needs.  This is usually easier to an end user to learn than creating a report from scratch since mostly it is just clicking to drill down or right-clicking to choose new groupings.

All of these functions, even though they are not ad hoc reporting in the purest sense, are self-service reporting which in most cases is easier for the customers to learn and be comfortable with.

One more feature of JReport I want to bring to your attention.  What if you cannot create queries, imported SQLs or stored procedures that provide all of the data at the right detail level for your users?  You have one additional option.  You can use dynamic SQL using a Business Cube.  A Business Cube is another meta-data layer but laid directly on the tables and views of the database and not on top of pre-defined queries.  You define them the same as Business Views with the same groups, measures and detail items but the query is not defined.  The system is set up with pre-join conditions so users do not need to worry about joining data.  If the user drags fields from two tables onto the report then JReport knows how to define the join in the resulting SQL dynamically generated.  This gives the user much more flexibility, if they choose for example just fields from the customer table such as name and addresses the report will contain just a list of customers without duplicates.  If they then add fields from the order table they will get a list of customers duplicated for each order and showing the fields selected from the order table.  If they add line items from the detail table then they get a row for every customer, order and line item.  So you can see this is the most flexible solution because from one Business Cube, JReport will generate any combination of SQLs required to get the data the user wants.

Share on LinkedInTweet about this on TwitterShare on FacebookShare on Google+

Leave a Reply

Your email address will not be published. Required fields are marked *

Test * Time limit is exhausted. Please reload CAPTCHA.