Hi,
We have added a Branch Report to Mifos using BIRT.  The relevant war file 
is here 
(http://rapidshare.com/files/90140449/mifos.war 
sha1sum: 2b5223faef480245e359893aa6ccd6728e3b03ed according to
http://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/binary/sha1sum.exe
). 

Since it's a work in progress, please follow these instructions on how to 
deploy it.

1) The first thing you have to do is create the report-specific batch 
tables by running these 
queries on the mifos database.

DROP TABLE IF EXISTS BATCH_BRANCH_REPORT;
CREATE TABLE BATCH_BRANCH_REPORT(
  BRANCH_REPORT_ID INTEGER AUTO_INCREMENT NOT NULL,
  BRANCH_ID SMALLINT NOT NULL,
  RUN_DATE DATE NOT NULL,
  PRIMARY KEY(BRANCH_REPORT_ID)
)ENGINE=InnoDB CHARACTER SET utf8;

DROP TABLE IF EXISTS BATCH_CLIENT_SUMMARY;
CREATE TABLE BATCH_CLIENT_SUMMARY(
  CLIENT_SUMMARY_ID INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY,
  BRANCH_REPORT_ID INTEGER NOT NULL,
  FIELD_NAME VARCHAR(50) NOT NULL,
  TOTAL VARCHAR(50),
  VPOOR_TOTAL VARCHAR(50),
  FOREIGN KEY(BRANCH_REPORT_ID) REFERENCES 
BATCH_BRANCH_REPORT(BRANCH_REPORT_ID)
)ENGINE=InnoDB CHARACTER SET utf8;

2) Instructions to run the batch job and deploy the warfile:

Copy the warfile to tomcat\webapps. Start Tomcat. This will unzip the 
warfile and create a 'mifos' folder.
As soon as the server starts (you'll see a "server startup in xx seconds' 
message), stop the server.

Delete the warfile (because the mifos folder now exists). Open the file 
mifos\WEB-INF\classes\org\mifos\framework\util\resources\batchjobs\task.xml 
in a text editor. There is a task
called BranchReportTask in the last <scheduler> element. Uncomment this 
element.
The task is set to run if it's after 10 in the morning. If it is not yet 
10 a.m, set <initial-time>
to a time earlier than current time.

(If your database is called something other than 'mifos', you can edit 
mifos\WEB-INF\classes\conf\hibernate.properties and set the database name 
in 
hibernate.connection.url)

Restart Tomcat and open mifos in a browser (http://localhost:8080/mifos). 
Mifos won't
let you login saying batch jobs are running. Wait for about 15 minutes for 
the Branch Report
batch job to complete (You can refresh the browser periodically to check 
if you can login)

3)Running the report:
After logging in, go to Admin tab and click on Upload Report Template in 
the Reports
 section. In the page which comes up, upload the file 
mifos\report\BranchReport.rptdesign and give it a suitable name.

Now on the Reports tab you should be able to see a link to this report. 
Click on it to see the 
parameter page and run the report.

Note about the report output: Formation date and Dissolved date are 
currently dummy values. 
The formatting is still not done. The rough layout is in place.

On Monday.we'll be sending the patch for the above functionality.

Pramod Biligiri,
ThoughtWorks
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to