• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Report Writer

#1
[eluser]robert.fulcher[/eluser]
I have created a basic report writer in Codeigniter. I just released it so it is still a little rough. I am opening it up to the community for use. I would love it if people wanted to update and help to upgrade it. I put up an whole project with the report writer code in it so you can see how it works.

Check it out...I wanted to let the entire community know but was not sure where to post it....

https://github.com/iwatllc/Pheonix

#2
[eluser]CroNiX[/eluser]
Mind expanding a bit on what this actually does? "report writer" can be many, many different things.

#3
[eluser]robert.fulcher[/eluser]
Oh yes good point. So it is a basic and simple SQL based report generator. you can select tables, fields and create joins using a GUI. At the moment there is no grouping or summing, I hope to add that at some point. It also supports exporting the data to excel using Phpexcel.

Again it is very basic but I wanted to share it with people, maybe it would be useful to someone. In my search there was nothing that came close to this for free.

Thanks

#4
[eluser]rajneeshgobin[/eluser]
The configuration file does not exist.

how to install the helper? or how to run the sample?

#5
[eluser]robert.fulcher[/eluser]
rajneeshgobin,

Sorry for the delay in the post. You should be able to download the project. Then you can extract the items needed and place in your project. I have not setup a stand alone plugin before so I put up what people needed. I certainly could have done a better job.

The main components are

controller/createreportctlr.php

model/createreportmodel.php

third_party directory

views/* (All files in the views folder)

There are some routes in the the routes.php file that you will need.


$route['default_controller'] = "createreportctlr";
$route['selecttable'] = "createreportctlr/selecttable";
$route['edit-report/(:num)'] = "createreportctlr/editreport/$1";
$route['selecttable/(:num)'] = "createreportctlr/selecttable/$1";
$route['selectcolumn'] = "createreportctlr/selectcolumn";
$route['getTableColumn'] = 'createreportctlr/getTableColumn';
$route['setcondition'] = 'createreportctlr/setCondition';
$route['getexcelexport/(:num)'] = 'createreportctlr/getExcelExport/$1';
$route['removehistoryrecord'] = 'createreportctlr/removehistoryrecord';

and then there are some items for declaring the tables you want to show. you can put them in a separate config file or in the config.php. This line is used to select the tables you want someone to have the ability to report from. (Sample tables are in there).

$config['database_reports_tables'] = array('company'=>'Company','department'=>'Department','inventory'=>'Inventory');

There are some items that need cleaned up in the model. below is the sql you need which I forgot to put in the project.

CREATE TABLE IF NOT EXISTS `historyreportsfields` (
`pkHistoryReportsFieldID` int(11) NOT NULL AUTO_INCREMENT,
`fkReportHistoryID` int(11) NOT NULL,
`AllTablesName` text NOT NULL,
`SelectedTablesName` text NOT NULL,
`SelectedColumns` text NOT NULL,
`AllConditions` text NOT NULL,
`SelectedSortByColumnName` varchar(255) NOT NULL,
`SelectedSortOrder` varchar(255) NOT NULL,
`RecordsPerPage` int(11) NOT NULL,
`SaveReport` varchar(255) NOT NULL,
PRIMARY KEY (`pkHistoryReportsFieldID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

CREATE TABLE IF NOT EXISTS `reporthistory` (
`pkHistoryID` int(100) NOT NULL AUTO_INCREMENT,
`ReportName` varchar(255) NOT NULL,
`SqlQuery` text NOT NULL,
`DateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`pkHistoryID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

Sorry it really needs to be refined and cleaned up but I needed to crank something out fast....hope this helps.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.