Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Conversion of Reporting Starter Kit to use Mono/MySQL

, 1 Oct 2005
A porting of the ASP.NET reporting starter kit to use Mono, MySQL and Apache on a Linux system.
Reporting_Kit_Conversion_demo.zip
reports
bin
ASPNETReports.dll
ASPNETReports.dll.bak
MySql.Data.dll
MySql.Data.Tests.dll
components
bin
Release
ASPNETReports.dll
BLL
DAL
docs
images
1x1.gif
crosstabnestedcontrols.png
crosstabtotals.png
customers.gif
drilldownnestedcontrols.png
employees.gif
getorderdetails.gif
GetOrders.gif
hierarchicalpaging.gif
hierarchicalreport.gif
hierarchicalschema.gif
hierarchicalsorting.gif
masterdetaildetails.png
masterdetailsummary.png
masterdetailtables.png
querysample.gif
querysample2.gif
simpleoverview.png
simplesp.png
tabcolorcode.png
tabdetail.png
tabheader.gif
tabheader.png
tabnestedcontrols.png
tabsortshot.png
tabularextendedprice.png
textshot.gif
viscategorysales.gif
viscategorysales.png
vischartstructure.png
xtabsql.png
Global.asax
images
1x1.gif
asp.net-reports.gif
background.gif
crosstab.gif
crosstabnestedcontrols.png
crosstabtotals.png
customers.gif
drilldown.gif
drilldownnestedcontrols.png
employees.gif
getorderdetails.gif
GetOrders.gif
grid_background.gif
hierarchal.gif
hierarchical.gif
hierarchicalpaging.gif
hierarchicalreport.gif
hierarchicalschema.gif
hierarchicalsorting.gif
logo-neg.gif
logo.gif
masterdetail.gif
masterdetaildetails.png
masterdetails.gif
masterdetailsummary.png
masterdetailtables.png
matrix.gif
querysample.gif
querysample2.gif
report-table-bg.gif
reporting.gif
simple.gif
simpleoverview.png
simplesp.png
spacer.gif
tabcolorcode.png
tabdetail.png
tabheader.gif
tabheader.png
tabnestedcontrols.png
tabsortshot.png
tabular.gif
tabularcolorcode.png
tabularextendedprice.png
tabularsorting.png
text.gif
textalternate.gif
textreport.gif
textshot.gif
viscategorysales.gif
viscategorysales.png
vischartstructure.png
visual.gif
xtabsql.png
sourceviewer
1x1.gif
crosstab.src
drilldown.src
grid_background.gif
hierarchical.src
masterdetail.src
simple.src
tabular.src
textreport.src
visual.src
sql
<html><head><link rel=stylesheet href=style.css></head><body><div class=SourcePanel style='font-size:12'><pre style='background-color:white'>
<font color= "blue">using</font> System;
<font color= "blue">using</font> System.Data;
<font color= "blue">using</font> System.Configuration;
<font color= "blue">using</font> ASPNET.StarterKit.Reports.DataAccessLayer;
<font color= "blue">using</font> System.Collections;
<font color= "blue"></font>
<font color= "blue">namespace</font> ASPNET.StarterKit.Reports.Components
<font color= "blue"></font>{
<font color= "green">    //*********************************************************************</font>
<font color= "green">    //</font>
<font color= "green">    // CrossTabReport Class</font>
<font color= "green">    //</font>
<font color= "green">    // The CrossTabReport class is used to represent a data item for CrossTab Report</font>
<font color= "green">    // and is mainly used to retrieve data from the database.</font>
<font color= "green">    //</font>
<font color= "green">    //*********************************************************************</font>
<font color= "blue"></font>
<font color= "blue">    public class</font> CrossTabReport
<font color= "blue">    </font>{
<font color= "blue">        private </font>decimal    _eastern;
<font color= "blue">        private </font>int        _monthOfSales;
<font color= "blue">        private </font>DateTime _orderDate;
<font color= "blue">        private </font>decimal    _northern;    
<font color= "blue">        private </font>int        _quarter;
<font color= "blue">        private </font>decimal _sales;
<font color= "blue">        private </font>decimal    _southern;
<font color= "blue">        private </font>decimal    _western;
<font color= "blue"></font>
<font color= "blue"></font>
<font color= "blue">        public </font>decimal Eastern
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _eastern; }
<font color= "blue">            set</font> { _eastern = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>int MonthOfSales 
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _monthOfSales; }
<font color= "blue">            set</font> { _monthOfSales = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>DateTime OrderDate 
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _orderDate; }
<font color= "blue">            set</font> { _orderDate = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>int Quarter 
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _quarter; }
<font color= "blue">            set</font> { _quarter = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>decimal Northern
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _northern; }
<font color= "blue">            set</font> { _northern = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>decimal Sales
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _sales; }
<font color= "blue">            set</font> { _sales = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>decimal Southern
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _southern; }
<font color= "blue">            set</font> { _southern = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>decimal Western
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _western; }
<font color= "blue">            set</font> { _western = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "green">        //*********************************************************************</font>
<font color= "green">        //</font>
<font color= "green">        // GetRegionSales method retrieves all the necessary monthly regional sales</font>
<font color= "green">        // from the database and transforms the result to a CrossTabReportCollection</font>
<font color= "green">        // custom collection before returning it to the calling function</font>
<font color= "green">        //</font>
<font color= "green">        //*********************************************************************</font>
<font color= "blue"></font>
<font color= "blue">        public </font>static CrossTabReportCollection GetRegionSales(int quarter, int year)
<font color= "blue">        </font>{
<font color= "blue">            </font>DataSet dsData = SqlHelper.ExecuteDataset(
<font color= "blue">                </font>ConfigurationSettings.AppSettings[Global.CfgKeyConnString], "Reports_GetSalesByRegion", year, quarter);
<font color= "blue">            </font>CrossTabReportCollection items = new CrossTabReportCollection();
<font color= "blue"></font>
<font color= "blue">            </font>foreach(DataRow row in dsData.Tables[0].Rows)
<font color= "blue">            </font>{
<font color= "blue">                </font>CrossTabReport item = new CrossTabReport();
<font color= "blue">                </font>item.MonthOfSales = Convert.ToInt32(row["MonthOfSales"]);
<font color= "blue">                </font>item.OrderDate = new DateTime(year, item.MonthOfSales, 1);
<font color= "blue">                </font>item.Eastern = Convert.ToDecimal(row["Eastern"]);
<font color= "blue">                </font>item.Western = Convert.ToDecimal(row["Western"]);
<font color= "blue">                </font>item.Northern = Convert.ToDecimal(row["Northern"]);
<font color= "blue">                </font>item.Southern = Convert.ToDecimal(row["Southern"]);
<font color= "blue">                </font>item.Sales = Convert.ToDecimal(row["TotalMonth"]);
<font color= "blue"></font>
<font color= "blue">                </font>items.Add(item);
<font color= "blue">            </font>}
<font color= "blue">            return</font> items;
<font color= "blue">        </font>}
<font color= "blue">    </font>}
<font color= "blue"></font>}
</pre>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

StylezHouse
Web Developer
United States United States
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 1 Oct 2005
Article Copyright 2005 by StylezHouse
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid