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

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>
		<title>ASP.NET Reports Starter Kit Documentation</title><LINK href="../style.css" type="text/css" rel="stylesheet"></head>
	<body class="NormalIndent">
		<h1>Simple&nbsp;Report
		</h1>
		<p><b>Description:</b> &nbsp;&nbsp;&nbsp;The simple report displays a list of all 
			customer contacts information for the company. This is useful for sales people 
			who constantly are on the road since it is accessible from anywhere 
			through&nbsp;the web.
		</p>
		<p><strong>Overview:</strong> &nbsp;&nbsp;&nbsp;The simple report 
			demonstrates&nbsp;using the Datagrid control for listing a result set 
			from&nbsp;the database.
		</p>
		<p><IMG src="../images/1x1.gif" width="25"> <IMG src="../images/simpleoverview.png">
			<br>
		</p>
		<p><strong>Implementation Notes:&nbsp;</strong> &nbsp;&nbsp;
		</p>
		<p>The Datagrid can also be used to support deleting and&nbsp;editing.&nbsp; 
			However, the purpose of this report is to show how simple and quick it is to 
			display data from a database in an ASP.NET Web Form with paging and sorting 
			features.</p>
		<P>To allow paging, set the DataGrid AllowPaging property to true and create an 
			event handler, PageIndexChanged, to change the CurrentPageIndex property.</P>
		<pre>
		
   private void CustomerGrid_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
   {
      CustomerGrid.CurrentPageIndex = e.NewPageIndex;
      BindGrid();
   }
   </pre>
		<P>Implementing sorting is also as simple as paging:&nbsp; set the AllowSorting to 
			true, implement OnSort event handler, and set the SortExpression for each bound 
			column.</P>
		<pre>
		
   private void CustomerGrid_Sort(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
   {
      // change sort field
      SortField = (string)e.SortExpression;
   
      // re-bind to display new sorting
      BindGrid();
   }
   </pre>
		<P>The Datagrid can also be custom formatted to the desired look and feel.&nbsp; In 
			this report page, customer contact information is displayed using alternating 
			row color.&nbsp; To enable this feature, simply assign a style 
			to&nbsp;AlternatingItemStyle-CssClass attribute.</P>
		<pre>		
   &lt;asp:datagrid id="CustomerGrid" AlternatingItemStyle-CssClass="Content" runat="server" AllowSorting="True" AllowPaging="True" PageSize="20"&gt;
   &lt;AlternatingItemStyle CssClass="Content"&gt;&lt;/AlternatingItemStyle&gt;
   &lt;Columns&gt;
   &lt;asp:BoundColumn DataField="CompanyName" SortExpression="CompanyName" HeaderText="Company"&gt;
      &lt;HeaderStyle CssClass="CategoryHeader"&gt;&lt;/HeaderStyle&gt;
      &lt;ItemStyle CssClass="ItemStyle"&gt;&lt;/ItemStyle&gt;
   &lt;/asp:BoundColumn&gt;
		</pre>
	</body>
</html>

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
Web03 | 2.8.140926.1 | Last Updated 1 Oct 2005
Article Copyright 2005 by StylezHouse
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid