Getting Started w/ Stat 5.6 Custom Reporting: Part Two

Configuring Stat & iReports the easy way!

Introduction:

Welcome to the long anticipated Getting Started w/ Stat 5.6 Custom Reporting Part Two! If you’ve not see part one, you’re missing a real treat. It’s located Here. (Ok, maybe not a real treat… but please do keep reading...)

 

 

With the new version of Stat 5.6.0, all of the Stat reports are now created with a tool called IReports. IReports is a GUI based tool that allows you to format your report and store it in a .jrxml file. A JRXML is simply a custom or fancy way of storing data in the XML format. If you are not that familiar with XML, don’t worry about it – it’s a text file with some formatting peculiarities and indents.

If you’re really interested in learning more about XML, I’d recommend checking out one of the following:

 

Wikipedia simplified explanation: Extensible Markup Language (XML) from Wikipedia.

A more technical explanation: A Technical Introduction to XML from XML.com

 

The following is broken out into three sections:

1. Before You Begin

2. Configuring iReports for Stat

3. Configuring Stat for iReports

Before You Begin:

There are a few things you’ll want to do to check before you can configure iReports to ‘See’ and speak to Stat. First, you’ll want to ensure that your Stat Central Agent, or Stat Server, is running and accessible. To confirm, you can easily check it within Stat by going to the following menu location within Stat: Stat > Tools > Stat Central Agent Status. And when you do that, you should see ‘Responding’ in all servers listed. If not, please contact your Stat Administrator to ensure all is Ok.

When we say see and speak to Stat, we are specifically speaking about the Stat Repository or the Main Stat Database. The next step is ensuring that you are connecting to the proper Stat Repository. To get that name, it is probably easiest to simply ask your Stat Administrator for that name. For Example: My local Stat Repository is called: STATREPO.

Configuring iReports for Stat:

There are a few things you’ll want to do to configure iReports the easy way. First, is to get iReports to see and speak to your Stat Repository. That is done on the main screen within iReports. When you first load iReports, you will notice that the Environment/Database field is filled with “Empty Database” as seen below: Step A: The Initial Jaspersoft iReport Default View:


To connect to your Stat Repository, select the Database Icon to the left of this field as shown below:

When selected, you will see the following three pop-ups, labeled below as Step B, Step C and Step D.


 

Simply follow the prompts as you see above to connect to your Stat Repository. You may need to speak with your Stat Administrator or your Database Administrator to obtain some of this information, but they should be able to provide it to you pretty readily.

 

When you’ve entered all of the appropriate information, you can test your settings by selecting the “Test” button on the bottom of the screen on Step D. You can see this in the below screen shot.

Once you have successfully tested your Database Connection, select the “Save” button to complete the configuration.

You are now connected into your Stat Repository – Congratulations!

When you return to the Main iReports Window, you can now select the name you entered from the Database drop-down entry. Below is my entry to my Stat Repository named “STATREPO”:

The next important value you will want to configure is the “Classpath” values for your Java Environment. Without getting too ‘Geeky’ on this, just know it’s a needed value to have iReports run properly and to be able to test the reports during report modification or development. To set the Classpath values, from the Main Menu Bar within iReports, select the following menu items: Tools > Options.

 

When you select the Options menu item you will see a new pop-up appear with multiple tabs:

Please Note: If you are not familiar, or comfortable, with the directory structure or location of these Jar files please inquire with your Stat Administrator, your Database Administrator or

Quest Support for the correct location of these files.

 

 

When you select the “Add JAR” button, you want to point to the location of your ODBC Drivers based on Your Database Type. For Example, I am using Oracle 11g in my Stat environment.
Therefore, whereever the Oracle 11g ‘Application Install Directory’ is located – That’s where you will find the Java ODBC Jar files that you want to add into your iReports configuration.

 

For Example: My default Oracle Install Directory is: “E:\app\administrator\product\11.1.0\db_1\

 

The Subdirectory I want to get to is the “\jdbc\lib” directory.

My total path to get to the ODBC JAR files would be: “E:\app\Administrator\product\11.1.0\db_1\jdbc\lib”.

 

Please Note: If you have a general idea on location, you can go to your base/root Oracle installation directory and do a search for “*jdbc*.jar” files and look for the latest ones.

When you locate that directory, simply click on the latest OJDBC#.Jar files in that directory. You will then see them listed in the “Classpath” list as highlighted above. For additional (geeky) information on the need and meaning of the Classpath values, please see the “Stat Administrators Guide” or contact Quest Support. Finally, you may want to adjust your User Interface within iReports based on the types of reports you intend to create or modify.

 

To do this, simply right-click on the Main iReports Toolbar. When you do that, you will see a vertical checklist that contains menu items, or icon button menus that can be added to your main iReports Toolbar. Choose wisely, you don’t want to make the field overly crowded or busy. And of course you can add and remove different menus based on the type of report you may be working on at the time. These changes can be done at any time as well.

And that is about it for iReports Configuration. The next section will look at the Stat settings you may want to configure.

 

Configuring Stat for iReports:

Yes! I’ve created a new iReport!

“Now – How do I get Stat to ‘See’ it?” Well, I’m glad you asked: This is where the “Stat Administrators Guide” is again the best resource for this information: Within the Stat Administrators Guide, see the section entitled “Stat Report Definition Maintenance”. Specifically, you want to see the sub-chapter entitled “Adding Custom Reports”. I’ve summarized it the best I can here:

 

Adding Custom Reports:

As we learned in the first of this series, and reminded above, all new/customized Stat reports built within iReports are stored as the JRXML File Format, with the file extension of “.jrxml”.

 

Once you’ve created or customized your iReport file you need to add it into the “Stat Report Library” within Stat.

To add a custom report:

From within Stat’s Main User Interface, on the top toolbar, select: Maintenance > General > Stat Reports.

 

 

When selected, you will be presented with a new window. From there, select the “New” button.

 

When selected, you will see the “Define New Custom Report” window as in the sample screenshot below:

 

A few important points to remember here: The Available checkbox (#1). Ensure that the “Available” checkbox is selected or checked.

 

Next, we want to connect this new iReport Definition to the actual JRXML file which is our new or modified iReport.

 

To do this, select the “Load” (#2) button just as you did above to get to the .JAR files. ‘Path’ to the location of your customized iReports .JRXML files location. This should be under you Stat Server’s directory, in the “custom/format” folder.

 

 

For Example: My Stat Server is located at the “P:\Stat_Server_560\” directory path. The iReports custom reports folder is then in the subdirectory called: “report\custom\format\”.

 

When selected, the complete file name is displayed in the File field, and the file name without extension is displayed in the “Report

 

 

Please Note: This file name must be unique. This is the name that the Stat Central Agent searches for at run time.

 

Next, enter a short description of up to 40 characters in the “Description” field. This description will be displayed under the Stat Report Library summary screen.

 

If this is brand new iReport, or an existing Stat Report, that you may have customized and saved as a different file name, then please ensure that the “Custom Report” (#3) checkbox is selected in the top right hand side of this window.

 

Enter a long description up to 250 characters in the “Long Description” field. This description appears in the “Presentation Preview” and will indicate to the user running the report some idea of what type of information will appear on the report, and also when to use the report.

 

Select a report “Category” or may enter a new category which best suits this report. You can add a custom report to a preexisting/predefined category, or you can add it to a new category that you may require.

 

And finally – Be sure to select “OK” (#4) to save all your hard work! When this window closes, you will then see it listed in the Stat Report Definition Maintenance window like below:


In Closing:

Thank you for taking the time to read this post and I hope you found it useful in your daily work with Stat 5.6.x. And – I promise not to allow so much time between this one and the next in the series of posts on Stat and iReports.

Also what you may find important, if you were not aware, there are a few new releases of both Stat and iReports:

  • The new version of iReports 4.5.0 was released on December, 08, 2011.
  • The new version of Stat 5.6.1 was released on December, 12, 2011.

 

Thank You!

Respectfully Submitted,

William R. Hart

Solutions Architect

Quest Software, Inc.

Anonymous