Click here to Skip to main content
11,417,972 members (46,428 online)
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.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">    // SimpleReportCollection Class </font>
<font color= "green">    //</font>
<font color= "green">    // The SimpleReportCollection is a Custom SimpleReport collection used </font>
<font color= "green">    // to represent a list of SimpleReport objects.</font>
<font color= "green">    //</font>
<font color= "green">    //</font>
<font color= "green">    //*********************************************************************</font>
<font color= "blue">    </font>
<font color= "blue">    public class</font> SimpleReportCollection : ArrayList
<font color= "blue">    </font>{    
<font color= "blue">        public enum</font> SimpleReportFields
<font color= "blue">        </font>{
<font color= "blue">            </font>InitValue,
<font color= "blue">            </font>City,
<font color= "blue">            </font>CompanyName,
<font color= "blue">            </font>ContactName,
<font color= "blue">            </font>ContactTitle,
<font color= "blue">            </font>Phone
<font color= "blue">        </font>}
<font color= "blue">        </font>
<font color= "blue">        public void</font> Sort(SimpleReportFields sortField, bool isAscending)
<font color= "blue">        </font>{
<font color= "blue">            switch</font> (sortField) 
<font color= "blue">            </font>{
<font color= "blue">                case</font> SimpleReportFields.City:
<font color= "blue">                    </font>base.Sort(new CityComparer());
<font color= "blue">                    </font>break;
<font color= "blue">                case</font> SimpleReportFields.CompanyName:
<font color= "blue">                    </font>base.Sort(new CompanyNameComparer());
<font color= "blue">                    </font>break;
<font color= "blue">                case</font> SimpleReportFields.ContactName:
<font color= "blue">                    </font>base.Sort(new ContactNameComparer());
<font color= "blue">                    </font>break;
<font color= "blue">                case</font> SimpleReportFields.ContactTitle:
<font color= "blue">                    </font>base.Sort(new ContactTitleComparer());
<font color= "blue">                    </font>break;
<font color= "blue">                case</font> SimpleReportFields.Phone:
<font color= "blue">                    </font>base.Sort(new PhoneComparer());
<font color= "blue">                    </font>break;
<font color= "blue">            </font>}
<font color= "blue"></font>
<font color= "blue"></font><font color= "blue">            if </font>(!isAscending) base.Reverse();<font color= "blue"></font>
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        private </font>sealed class CityComparer : IComparer 
<font color= "blue">        </font>{
<font color= "blue">            public </font>int Compare(object x, object y)
<font color= "blue">            </font>{
<font color= "blue">                </font>SimpleReport first = (SimpleReport) x;
<font color= "blue">                </font>SimpleReport second = (SimpleReport) y;
<font color= "blue">                return</font> first.City.CompareTo(second.City);
<font color= "blue">            </font>}
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        private </font>sealed class CompanyNameComparer : IComparer 
<font color= "blue">        </font>{
<font color= "blue">            public </font>int Compare(object x, object y)
<font color= "blue">            </font>{
<font color= "blue">                </font>SimpleReport first = (SimpleReport) x;
<font color= "blue">                </font>SimpleReport second = (SimpleReport) y;
<font color= "blue">                return</font> first.CompanyName.CompareTo(second.CompanyName);
<font color= "blue">            </font>}
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        private </font>sealed class ContactNameComparer : IComparer 
<font color= "blue">        </font>{
<font color= "blue">            public </font>int Compare(object x, object y)
<font color= "blue">            </font>{
<font color= "blue">                </font>SimpleReport first = (SimpleReport) x;
<font color= "blue">                </font>SimpleReport second = (SimpleReport) y;
<font color= "blue">                return</font> first.ContactName.CompareTo(second.ContactName);
<font color= "blue">            </font>}
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        private </font>sealed class ContactTitleComparer : IComparer 
<font color= "blue">        </font>{
<font color= "blue">            public </font>int Compare(object x, object y)
<font color= "blue">            </font>{
<font color= "blue">                </font>SimpleReport first = (SimpleReport) x;
<font color= "blue">                </font>SimpleReport second = (SimpleReport) y;
<font color= "blue">                return</font> first.ContactTitle.CompareTo(second.ContactTitle);
<font color= "blue">            </font>}
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        private </font>sealed class PhoneComparer : IComparer 
<font color= "blue">        </font>{
<font color= "blue">            public </font>int Compare(object x, object y)
<font color= "blue">            </font>{
<font color= "blue">                </font>SimpleReport first = (SimpleReport) x;
<font color= "blue">                </font>SimpleReport second = (SimpleReport) y;
<font color= "blue">                return</font> first.Phone.CompareTo(second.Phone);
<font color= "blue">            </font>}
<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 | Terms of Use | Mobile
Web01 | 2.8.150427.4 | Last Updated 1 Oct 2005
Article Copyright 2005 by StylezHouse
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid