Click here to Skip to main content
15,891,431 members
Articles / Containers / Virtual Machine

ASP.NET Report Kit Grasshoper (Race to Linux)

Rate me:
Please Sign up or sign in to vote.
2.38/5 (5 votes)
2 Oct 20057 min read 38K   19  
Porting and deploying the report starter kit to Linux (RH7.3/Tomcat5.0.28/Grasshoper1.61)
<%@ Page language="vb" Codebehind="Hierarchical.aspx.vb" 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='<%# Ctype(DataBinder.Eval(Container, "DataItem.TerritoryDescription"), [String])%>' 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='<%# CType(DataBinder.Eval(Container, "DataItem.EmployeeName"), [String]) & "," & 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
Software Developer (Senior)
United States United States
I love to code! Working in C# is my passion, visit my github

Comments and Discussions