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">    // TabularReport Class</font>
<font color= "green">    //</font>
<font color= "green">    // The TabularReport class is used to represent a data item for Tabular </font>
<font color= "green">    // Report 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> TabularReport
<font color= "blue">    </font>{
<font color= "blue">        private </font>int            _categoryID;
<font color= "blue">        private </font>string        _categoryName;
<font color= "blue">        private </font>string        _productName;
<font color= "blue">        private </font>string        _quantityPerUnit;
<font color= "blue">        private </font>int            _totalInStock;
<font color= "blue">        private </font>decimal        _unitPrice;
<font color= "blue">        private </font>int            _unitsInStock;
<font color= "blue">        </font>
<font color= "blue">        public </font>int CategoryID
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _categoryID; }
<font color= "blue">            set</font> { _categoryID = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>string CategoryName
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _categoryName; }
<font color= "blue">            set</font> { _categoryName = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>string ProductName
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _productName; }
<font color= "blue">            set</font> { _productName = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>string QuantityPerUnit
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _quantityPerUnit; }
<font color= "blue">            set</font> { _quantityPerUnit = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>int TotalInStock
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _totalInStock; }
<font color= "blue">            set</font> { _totalInStock = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>decimal UnitPrice
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _unitPrice; }
<font color= "blue">            set</font> { _unitPrice = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        public </font>int UnitsInStock
<font color= "blue">        </font>{
<font color= "blue">            get</font> { return _unitsInStock; }
<font color= "blue">            set</font> { _unitsInStock = value; }
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "green">        //*********************************************************************</font>
<font color= "green">        //</font>
<font color= "green">        // GetCategories method retrieves all available category names with total </font>
<font color= "green">        // unit in stock information from the database and transforms the result </font>
<font color= "green">        // to a TabularReportCollection custom colletion before returning it to </font>
<font color= "green">        // the calling function.</font>
<font color= "green">        //</font>
<font color= "green">        // This method is called to get header information for the Tabular Report.</font>
<font color= "green">        //</font>
<font color= "green">        //*********************************************************************</font>
<font color= "blue"></font>
<font color= "blue">        public </font>static TabularReportCollection GetCategories()
<font color= "blue">        </font>{
<font color= "blue">            </font>DataSet dsData = SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings[Global.CfgKeyConnString], "Reports_GetCategories");
<font color= "blue">            </font>TabularReportCollection items = new TabularReportCollection();
<font color= "blue"></font>
<font color= "blue">            </font>foreach(DataRow row in dsData.Tables[0].Rows)
<font color= "blue">            </font>{
<font color= "blue">                </font>TabularReport item = new TabularReport();
<font color= "blue">                </font>item.CategoryID = Convert.ToInt32(row["CategoryID"]);
<font color= "blue">                </font>item.CategoryName = row["CategoryName"].ToString();
<font color= "blue">                </font>item.TotalInStock = Convert.ToInt32(row["TotalInStock"]);
<font color= "blue"></font>
<font color= "blue">                </font>items.Add(item);
<font color= "blue">            </font>}
<font color= "blue"></font>
<font color= "blue">            return</font> items;
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "green">        //*********************************************************************</font>
<font color= "green">        //</font>
<font color= "green">        // GetProducts method retrieves all product details for the specified  </font>
<font color= "green">        // category from the database and transforms the result </font>
<font color= "green">        // to a TabularReportCollection custom colletion before returning it to </font>
<font color= "green">        // the calling function.</font>
<font color= "green">        //</font>
<font color= "green">        // This method is used to get detail information for each category in </font>
<font color= "green">        // Tabular Report.</font>
<font color= "green">        //</font>
<font color= "green">        //*********************************************************************</font>
<font color= "blue"></font>
<font color= "blue">        public </font>static TabularReportCollection GetProducts(int categoryID)
<font color= "blue">        </font>{
<font color= "blue">            </font>DataSet dsData = SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings[Global.CfgKeyConnString], "Reports_GetProductsByCategory", categoryID);
<font color= "blue">            </font>TabularReportCollection items = new TabularReportCollection();
<font color= "blue"></font>
<font color= "blue">            </font>foreach(DataRow row in dsData.Tables[0].Rows)
<font color= "blue">            </font>{
<font color= "blue">                </font>TabularReport item = new TabularReport();
<font color= "blue">                </font>item.CategoryID = Convert.ToInt32(row["CategoryID"]);
<font color= "blue">                </font>item.ProductName = row["ProductName"].ToString();
<font color= "blue">                </font>item.QuantityPerUnit = row["QuantityPerUnit"].ToString();
<font color= "blue">                </font>item.UnitsInStock = Convert.ToInt32(row["UnitsInStock"]);
<font color= "blue">                </font>item.UnitPrice = Convert.ToDecimal(row["UnitPrice"]);
<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

Share

About the Author

StylezHouse
Web Developer
United States United States
No Biography provided

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