Click here to Skip to main content
15,896,154 members
Articles / Web Development / ASP.NET

Race to Linux - Race 3: Reports Starter Kit using Mono SqlServer/Firebird

Rate me:
Please Sign up or sign in to vote.
2.33/5 (2 votes)
30 Sep 20052 min read 53.2K   328   15  
Reports Starter Kit port to Linux using Mono
<%@ Page language="c#" Codebehind="hierarchical.aspx.cs" AutoEventWireup="false" Inherits="ASPNET.StarterKit.Reports.Hierarchical" %>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
	<head>
		<title>Hierarchical</title>
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<link href="<%= _styleSheet %>" type=text/css rel=stylesheet>
		<script src="scripts.js"></script>
	</head>
	<body class="Report" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
		<form id="Tabular" method="post" runat="server">
			<table cellspacing="0" cellpadding="0" width="950" border="0">
				<tr height="20">
					<td colspan="7"></td>
				</tr>
				<tr height="20">
					<td width="20"></td>
					<td colspan="4">Select Year:&nbsp;<asp:dropdownlist runat="server" id="ddlYear" width="105px" autopostback="True">
							<asp:listitem value="1996" selected="True">1996</asp:listitem>
							<asp:listitem value="1997">1997</asp:listitem>
							<asp:listitem value="1998">1998</asp:listitem>
						</asp:dropdownlist>
					</td>
					<td align="right">
						<asp:hyperlink id="PrintButton" navigateurl="javascript:Print()" cssclass="printbutton" runat="server" visible="False">Print</asp:hyperlink>
					</td>
					<td></td>
				</tr>
				<tr height="20">
					<td colspan="7"></td>
				</tr>
				<tr>
					<td width="20"></td>
					<td width="225" valign="top">
						<table cellspacing="0" cellpadding="0" width="225" border="0">
							<tr>
								<td class="CategoryHeaderHier" width="5">&nbsp;</td>
								<td class="CategoryHeaderHier" valign="top">Sales by Territory
								</td>
								<td class="CategoryHeaderHier" width="5">&nbsp;</td>
							</tr>
							<tr>
								<td class="Content"></td>
								<td class="Content"><asp:datagrid id="TerritoryGrid" runat="server" autogeneratecolumns="False" allowpaging="True" allowsorting="True" onsortcommand="SortGrid_Terr" onpageindexchanged="Page_Terr" gridlines="None" borderwidth="0px" pagesize="5">
										<itemstyle height="15px"></itemstyle>
										<headerstyle cssclass="ReportTitle"></headerstyle>
										<columns>
											<asp:templatecolumn sortexpression="Territory" headertext="Territory Name">
												<itemtemplate>
													<asp:linkbutton oncommand="TerritoryGrid_Click" commandname="TerritoryDrill" commandargument='<%# (String)DataBinder.Eval(Container, "DataItem.TerritoryDescription")%>' cssclass="hier" runat="server" id="Territorylnk" Text='<%# DataBinder.Eval(Container, "DataItem.TerritoryDescription") %>'>
													</asp:linkbutton>
												</itemtemplate>
												<itemstyle width="150px"></itemstyle>
											</asp:templatecolumn>
											<asp:boundcolumn datafield="SalesTotals" sortexpression="SalesTotals" headertext="Sales" dataformatstring="{0:c}">
												<headerstyle cssclass="ProductHeaderRight"></headerstyle>
												<itemstyle width="100px" cssclass="ItemStyleRight"></itemstyle>
											</asp:boundcolumn>
										</columns>
										<pagerstyle cssclass="PagerHier" prevpagetext="&lt; Prev" nextpagetext="Next &gt;" height="30px" verticalalign="middle"></pagerstyle>
									</asp:datagrid></td>
								<td class="Content"></td>
							</tr>
							<tr height="10">
								<td class="CategoryFooterHier">&nbsp;</td>
								<td class="CategoryFooterHier" style="LINE-HEIGHT: 20px" valign="center" colspan="2">
									&nbsp;<asp:label id="CurrPage_Terr" runat="server"></asp:label>&nbsp;of&nbsp;<asp:label id="TotPages_Terr" runat="server"></asp:label></td>
							</tr>
						</table>
					</td>
					<td width="20"></td>
					<td width="225" valign="top">
						<br>
						<table id="ETTableColumn" runat="server" visible="false" cellspacing="0" cellpadding="0" width="225" border="0">
							<tr>
								<td class="CategoryHeaderHierGold" width="5">&nbsp;</td>
								<td class="CategoryHeaderHierGold" valign="top">Sales for '<asp:label id="ETHeader" runat="server"></asp:label>'
								</td>
								<td class="CategoryHeaderHierGold" width="5">&nbsp;</td>
							</tr>
							<tr>
								<td></td>
								<td><asp:datagrid id="EmployeeTerritoryGrid" runat="server" autogeneratecolumns="False" allowpaging="True" allowsorting="True" onsortcommand="SortGrid_EmpTerr" onpageindexchanged="Page_EmpTerr" gridlines="None" borderwidth="0px" pagesize="3">
										<itemstyle height="15px"></itemstyle>
										<headerstyle cssclass="ReportTitle"></headerstyle>
										<columns>
											<asp:templatecolumn sortexpression="EmployeeName" headertext="Employee Name">
												<itemtemplate>
													<asp:linkbutton oncommand="ETGrid_Click" commandargument='<%# (String) DataBinder.Eval(Container, "DataItem.EmployeeName") + "," + DataBinder.Eval(Container, "DataItem.EmployeeID").ToString() %>' cssclass="hier" runat="server" id="lnkEmployeeTerritory" text='<%# DataBinder.Eval(Container, "DataItem.EmployeeName") %>'>
													</asp:linkbutton>
												</itemtemplate>
												<itemstyle width="150px"></itemstyle>
											</asp:templatecolumn>
											<asp:boundcolumn datafield="SalesTotals" sortexpression="SalesTotals" headertext="Sales" dataformatstring="{0:c}">
												<headerstyle cssclass="ProductHeaderRight"></headerstyle>
												<itemstyle width="100px" cssclass="ItemStyleRight"></itemstyle>
											</asp:boundcolumn>
										</columns>
										<pagerstyle cssclass="PagerHier" prevpagetext="&lt; Prev" nextpagetext="Next &gt;" height="30px" verticalalign="middle"></pagerstyle>
									</asp:datagrid></td>
								<td></td>
							</tr>
							<tr height="10">
								<td class="CategoryFooterHier">&nbsp;</td>
								<td class="CategoryFooterHier" style="LINE-HEIGHT: 20px" valign="center" colspan="2"><asp:label id="CurrPage_EmpTerr" runat="server"></asp:label>of
									<asp:label id="TotPages_EmpTerr" runat="server"></asp:label>&nbsp;&nbsp;</td>
							</tr>
						</table>
					</td>
					<td width="20"></td>
					<td width="425" valign="top">
						<p>&nbsp;</p>
						<table runat="server" id="EmpTableColumn" visible="false" cellspacing="0" cellpadding="0" width="425" border="0">
							<tr>
								<td class="CategoryHeaderHierGold" width="5">&nbsp;</td>
								<td class="CategoryHeaderHierGold" valign="top">Employee Info for '<asp:label id="EmployeeName" runat="server"></asp:label>'
								</td>
								<td class="CategoryHeaderHierGold" width="5">&nbsp;</td>
							</tr>
							<tr>
								<td></td>
								<td><asp:datagrid id="EmployeeGrid" runat="server" autogeneratecolumns="False" gridlines="None" borderwidth="0px">
										<itemstyle height="15px"></itemstyle>
										<headerstyle cssclass="ReportTitle"></headerstyle>
										<columns>
											<asp:boundcolumn datafield="EmployeeID" headertext="ID">
												<itemstyle width="25px"></itemstyle>
											</asp:boundcolumn>
											<asp:boundcolumn datafield="EmployeeTitle" headertext="Title">
												<itemstyle width="140px"></itemstyle>
											</asp:boundcolumn>
											<asp:templatecolumn headertext="Address">
												<itemtemplate>
													<%# DataBinder.Eval(Container, "DataItem.EmployeeAddress") %>
													<br>
													<%# DataBinder.Eval(Container, "DataItem.EmployeeCity") %>
													,
													<%# DataBinder.Eval(Container, "DataItem.EmployeeRegion") %>
													&nbsp;&nbsp;<%# DataBinder.Eval(Container, "DataItem.EmployeePostalCode") %><br>
													<%# DataBinder.Eval(Container, "DataItem.EmployeeCountry") %>
												</itemtemplate>
												<itemstyle width="160px"></itemstyle>
											</asp:templatecolumn>
											<asp:boundcolumn datafield="EmployeePhone" headertext="Home Phone">
												<itemstyle width="100px"></itemstyle>
											</asp:boundcolumn>
										</columns>
										<pagerstyle visible="False"></pagerstyle>
									</asp:datagrid></td>
								<td></td>
							</tr>
						</table>
					</td>
					<td width="*"></td>
				</tr>
			</table>
			<p>&nbsp;</p>
		</form>
	</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


Written By
Web Developer
Uruguay Uruguay
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions