Wednesday, March 27, 2013

PHP Report Maker | A life saver

SOURCE: http://www.avidtrader.com/wordpress/wp-content/uploads/2013/01/reports.jpg

Recently I was involved in developing a registration site for SLUG (Sri Lankan University Games) 2013 [1] where we wanted to produce several reports at the end.Thanks to Mr. Samudaya Nanayakkara [2], I came across PHP Report Maker 6 [3], a php dynamic web report generator with data sources MySQL, PostgreSQL, Microsoft Access, Microsoft SQL Server and Oracle for the moment. In my case it was with MySQL.

The basic steps would be,
  • Connect to the database
  • Create a view
  • Create a report
It is possible to create several reports with different fields and filters from the same view. Apart from that it is possible to make a table, view as a report as well.

PHP Report Maker supports extended filters, which comes in handy in filtering report data. The filters can be configured simply to result in a complex functionality.

Stuff that didn't work in localhost

I created several extended filters for the reports and I configured them to have 'SELECT-ONE' type, that is the drop down. But in the browser, the drop down was not fed with the distinct values of the relevant field, is was left with only 'Please select'. The issue was not there when I moved the files to the server :-)

Moving reports to the server, pay attention

There are views created in the database server in the process of creating the reports. They need to be formed in the server, a mysql dump and restore would do.

Next is the database info in the server. If they differ from those in your localhost, modify them. They can be found in ewrcfg6.php in phprptinc in your report out put directory.

In my case all the table names were in lower case in the mysql dump of views where as in the saver they were in camel case. Grep and sed can be used to replace them accordingly.

More info

video tutorial : http://www.youtube.com/watch?v=5xcQrKOv2oo
online demo : http://www.hkvstore.com/phpreportmaker/demo.asp


Reference
[1] http://www.slug2013.moraspirit.com/
[2] http://samudayan.blogspot.com/
[3] http://www.hkvstore.com/phpreportmaker/

Thursday, February 28, 2013

Mozilla South Asia Inter-Community Meet-up 2013

SOURCE: http://www.flickr.com/photos/hardfire/8510710320/
First ever Mozilla South Asia Inter-Community Meet-up was held successfully on 23rd and 24th February 2013 in Kathmandu, Nepal.

All most all the participants had landed in Kathmandu by 22nd night. We all had dinner, traditional Nepalese with marvellous traditional dancing at Yak & Yeti Hotel where the meet-up was to be hosted and where accommodation was provided as well.

On the official first day of the meet-up, 23rd, the session kicked off with introducing each other, our role in Mozilla and how we hope to contribute to Mozilla in the year ahead. A SWOT analysis was done on community basis. In the afternoon we all attended the Open Data Day which was a public event organized by the FOSS communities in Nepal. There several small sessions each with a time span of around 15 minutes were carried out on Mozilla as an organization, Firefox OS, Webmaker and Localization. A load of thanks to Gen, Deb, Gautham, Mac and Huda. A few Firefox OS developers phones were available and the participants had the chance to have hands on experience of the Firefox OS. That was the firsts hands on experience of mine as well and that was simply superb. Next we had a discussion with Nepalese FOSS communities on "How to sustain with FOSS". There we discussed about the issues that are faced by the FOSS communities, how to retain the existing contributors, financial sustainability of the projects, how we can adopt from other communities etc. Back at the hotel we discussed the issues faced by Mozilla communities in each country and solutions as suggestions based on the SWOT analysis in the morning session.

On 24th, officially the last day of the meet-up, common issues for the Mozilla communities in each country were identified and categorized.  Participants were listed under each category as their interest. A task force for each category was formed and they discussed separately to come up with a road map for the year 2013 so that the common issues raised earlier are addressed properly. I hope that through inter community support and collaboration, we as the Mozilla South Asian community will be able to spread the word and contribute to make Mozilla products better.

It was a wonderful experience, the stay at Nepal and the meet-up. Many thanks to all the participants, Mozilla Nepal community and other supporters for the great hospitality and organization. Special thanks to Suresh and Lumbini FOSS community for the immense support rendered to Danishka and myself during our visit to Lumbini the following day.

Hope to see you all and more in the next meet-up with all the tasks in the road map ticked :-)

More info:  https://wiki.mozilla.org/Community/South-Asia/Inter-Community-Meetup-2013

Monday, September 17, 2012

Entering its 3rd year, the latest release : Hanthana Linux 17 (Sithija) is available now!



Project began with the goals of Introducing and promoting Free and Open Source Software to the masses, especially to those with low technical knowledge, no access to the Internet or under privileged, and has now been deployed in a lot of schools, individuals, private sector offices, public sector institutes and government offices.

Hanthana Linux operating system was officially released on the 19th of September 2009 and by now the the number of copies distributed by the Hanthana Linux Project and individuals has counted up to the thousands. According to the SourceForge website, just one of the repositories that provides the distribution, there’s over 6000 downloads from all over the world. From those, at least 8 countries (excluding Sri Lanka) has downloaded a minimum of 100 copies and at least 96 countries has at least one download.



http://sourceforge.net/projects/hanthana/files/stats/timeline?dates=2009-09-01+to+2012-12-31
 
This information excludes the local repository, LEARN, which is used by Sri Lankans as well as the Ibiblio repository.

The School Labs project which was inaugurated in 2012 by the Hanthana Linux project has already facilitated labs to 2 schools already and is planned to provide for more schools.



Schools in the Walapane educational zone of the Nuwara Eliya district and in the Kebithigollewa educational zone of the Anuradhapura district are next in this project and you too can join this project in facilitating IT knowledge to underprivileged school children in these areas.

Hanthana Linux is not just another Fedora respin. As a project it facilitates the deployment of Free and Open source Software amongst the everyday PC user as well as the localization of FOSS software,Documentation and provide training workshops as well.

Hanthana Linux is not a commercial product. Its a project for the betterment of the community by the community.

Hanthana Linux 17 (Sithija) is released!



Hanthana Linux 17 (sithija), the latest release of Hanthana was released on the 3rd anniversary of the Hanthana Linux project. In addition to the host of applications, the new release has the official LibreOffice guide provided by the Document Foundation.

Get your copy of Hanthana Linux 17 today!

The Hanthana Linux project takes this moment to give our heartfelt gratitude to everyone who worked for the project as well as everyone who sent the project their best wishes. Thank You.

Wednesday, April 25, 2012

Browse fails to start : FIXED | Sugar 0.96 released

Latest Browse (based on gtk3) failed to start on fedora 16 and Manuel has a fix. It's a matter of two commit reverts. Find steps and more info at the ticket[1]

Sugar 0.96 is released. Release notes can be found here [2]


[1] http://bugs.sugarlabs.org/ticket/3513
[2] http://wiki.sugarlabs.org/go/0.96/Notes

Saturday, February 25, 2012

to-doo: a simple to-do list application

Source: http://reclaimyourqueendom.files.wordpress.com/2011/04/to-do-list.jpg

to-doo [1] is a simple to-do list application written by me using google app engine [2] and python [3]. I wanted to make it as simple as possible yet serve the purpose. The syntax used is simple, more information are there in the 'help' link of to-doo. The frontend is basic HTML so that almost all the browsers including the browsers in mobile phones will support this. They will load to-doo quickly and will function with low amount of data transferred.

to-doo uses google accounts to authenticate the user. This is a service provided by the API of the google app engine. So the application will not save your google password but your google account nick name as it is used to filter out the relevant tasks.

Give to-doo a try and leave your comments through the link provided in to-doo.

Thursday, February 16, 2012

./sugar-jhbuild update: 'BundleModule' has no attribute 'parse_from_xml' [solved]

I was trying to build sugar on my fedora 16 (64 bit) box as instructed here [1]. git clone was successful but ./sugar-jhbuild update failed although I have all the dependencies installed. Following is the strange python error I got,

./sugar-jhbuild update
Cloning upstream jhbuild
Cloning into jhbuild...
remote: Counting objects: 30895, done.
remote: Compressing objects: 100% (8597/8597), done.
remote: Total 30895 (delta 23961), reused 28682 (delta 22191)
Receiving objects: 100% (30895/30895), 6.00 MiB | 118 KiB/s, done.
Resolving deltas: 100% (23961/23961), done.
Warning: unknown distro version, automatic fallback to rawhide.
Traceback (most recent call last):
 File "./sugar-jhbuild", line 62, in <module>
   sys.exit(main.main(base_dir, sys.argv[1:]))
 File "/home/kalpa/sugar-devel/sugar-jhbuild/sjhbuild/main.py", line
111, in main
   rc = jhbuild.commands.run(command, config, args, help=lambda:
jhbuild.main.print_help(parser))
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/commands/__init__.py",
line 123, in run
   return cmd.execute(config, args, help)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/commands/__init__.py",
line 52, in execute
   return self.run(config, options, args, help)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/commands/base.py",
line 63, in run
   module_set = jhbuild.moduleset.load(config)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/moduleset.py",
line 316, in load
   ms.modules.update(_parse_module_set(config, uri).modules)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/moduleset.py",
line 412, in _parse_module_set
   inc_moduleset = _parse_module_set(config, inc_uri)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/moduleset.py",
line 427, in _parse_module_set
   repositories, default_repo)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/modtypes/__init__.py",
line 58, in parse_xml_node
   return parser(node, config, uri, repositories, default_repo)
 File "/home/kalpa/sugar-devel/sugar-jhbuild/sjhbuild/bundlemodule.py",
line 50, in parse_bundle
   instance = BundleModule.parse_from_xml(node, config, uri,
repositories, default_repo)
AttributeError: type object 'BundleModule' has no attribute 'parse_from_xml'

It took me a couple of days to figure the issue. It all went fine after I removed /home/kalpa/.local/lib/python2.7/site-packages/jhbuild Then all was fine working :-)


In ./sugar-jubuild depscheck there is an warning


Missing packages:
gnome-python2-evince


It can be either ignored or install through
yum install gnome-python2-desktop

[1] http://wiki.sugarlabs.org/go/Development_Team/Jhbuild