KonaKart Logo KonaKart Reporting FAQ
Search

How do I run the Reports ?
How do I modify the Reports ?
How do I add a new Report ?
How do I display a different plot on the status page ?
What if I run KonaKart on a different port ?
Why are my reports are not listed on the reports panel ?
Why don't I see any Data in my reports ?
I've written a report for KonaKart that others might like to use - who should I send it to ?


How do I run the reports ?


The reports are accessible from the "Reports" tab of the KonaKart Admin Application.   A new browser window will be created that will run the BIRT viewer for the selected report.


How do I modify the reports ?


You will find the report files under the birtviewer webapp at:  <konakart home>/webapps/birt-viewer/reports (this is where they are in the download package but the location can be changed if required)..   By default the reports have the ".rptdesign" file extension although this can be set in the configuration parameters to some other file extension if you wish.
For very simple modifications to the reports you can simply edit the report files (they are XML files).   You can edit them directly from the Admin Application or using a file editor of your choice.   For more complicated modifications or for adding your own new reports,  you will have to set up the BIRT/Eclipse report design tools as explained below.


How do I add a new report ?


KonaKart has been designed to allow the integration of any reporting system.  although BIRT has been used in the download package and makes an excellent choice for adding addition reporting functionality.   

BIRT is a free Eclipse-based open source reporting system for web applications, especially those based on Java and J2EE. BIRT has two main components: a report designer based on Eclipse, and a runtime component that you can add to your app server. BIRT also offers a charting engine that lets you add charts.
Included in the KonaKart download package we provide the "BIRT Viewer" web application that includes the BIRT runtime system which is all you need to produce your reports.

For development of addition reports you are advised to follow the instructions on the BIRT web site for setting up BIRT in Eclipse.  Note that currently we are using BIRT 2.2.1 so it is strongly advised that you use that version for new reports to ensure compatibility.

Once you have created your new report you can either upload it using the Admin Application or simply add your report to the directory defined to hold your reports (the directory is a configuration parameter that is set up default to "C:/Program Files/KonaKart/webapps/birt-viewer/reports/"  (therefore, this will have to be changed if you have not installed KonaKart in the default location on Windows.  You can set this value in the Admin Application under the Reports Configuration section.)

To make your report appear in the list of reports with a friendly name rather than its filename you have to specify the text to display in the text-property title tag of your BIRT report, for example:

    <text-property name="title">Orders in last 30 Days (Chart Only)</text-property>        



How do I display a different plot on the status page ?


By default KonaKart is configured to display a plot showing number of orders over the preceding 30 days on the Status page of the Admin Application.  What you display in this particular frame is entirely up to you - you can choose another plot, or indeed any page you like that might even be unrelated to KonaKart.   You define the URL for the page in the Reports Configuration section of the Admin Application.


What if I run KonaKart on a different port ?


By default KonaKart is configured to use port 8780.   If you change this port you will have to modify the "Report Viewer URL" and the "Status Page Report URL" configuration parameters in the Reports Configuration section of the Admin Application to reflect the different port.   These are set automatically if you installed using the installer so you should only need to do this if you either installed manually using the zip package or changed the KonaKart port number after installation.  Here's an example of what you would set these parameters to if you were running KonaKart on port 8080:

Reports Configuration in the Admin App


Why are my reports are not listed on the reports panel ?


KonaKart may be looking for the reports in the wrong location.   By default KonaKart is configured to search for report files with the ".rptdesign" extension in the "C:/Program Files/KonaKart/webapps/birt-viewer/reports/" directory.  If you use a different file extension for your reports or you have installed KonaKart in any location other than "C:/Program Files/KonaKart/" you will have to modify the configuration parameter to suit your installation.   You will have to modify the reporting configuration parameters in the Administration Application.   You define all of the reporting configuration parameters in the Reports Configuration section of the Admin Application.


Why DON'T I SEE ANY DATA IN MY REPORTS ?


KonaKart may be looking for the database connection parameters in the wrong file.  Check your konakart.rptlibrary file under webapps/birt-viewer/reports/lib/. Find the beforeOpen section under <data-sources>:

<data-sources>
   <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="KonaKart-Database" id="4">
       <method name="beforeOpen"><![CDATA[

importPackage(Packages.java.util.logging);
importPackage(Packages.com.konakart.reports);

var dbPropsFile = "C:/Program Files/KonaKart/webapps/konakartadmin/WEB-INF/classes/konakartadmin.properties";
var dbparams = new GetDbParams(dbPropsFile);

this.setExtensionProperty("odaDriverClass", dbparams.getDbDriver());
this.setExtensionProperty("odaURL", dbparams.getDbUrl());
this.setExtensionProperty("odaUser", dbparams.getDbUser());
this.setExtensionProperty("odaPassword", dbparams.getDbPassword());

This is how the reports find out how to connect to the database.   The konakart.rptlibrary file defines the location of the konakartadmin.properties file (or it could be your own file so long as it defines the appropriate database connection parameters).   Therefore you must verify that the filename is correct for your environment.   The default location is as illustrated above which shows the default location when installed on Windows.   (This should be set automatically by the installation wizard but could well be set incorrectly if you used the manual zip-based installation).

I've written a report for konakart that others might like to use - whO should I send it to ?


We would be very grateful to receive contributions.   Please post these as attachments in the Contributions board in our forum.