|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CRParameters.aspx.cs" Inherits="CRParameters" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Crystal Report Parameters</title>
<link href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css" rel="stylesheet" type="text/css" />
<link href="/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css"
rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<strong></strong>
<asp:DropDownList ID="DropDownList1" runat="server"
AutoPostBack="True" DataSourceID="SqlDataSource1"
DataTextField="CompanyName" DataValueField="CustomerID" AppendDataBoundItems="true">
<asp:ListItem Text="-- Customer Order History --" Value="NULL" Selected="True" />
</asp:DropDownList>
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [CustomerID], [CompanyName] FROM [Customers]"
SelectCommandType="Text">
</asp:SqlDataSource>
<br />
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" ReuseParameterValuesOnRefresh="True" DisplayGroupTree="False" ReportSourceID="CrystalReportSource1" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server" OnDataBinding="CrystalReportSource1_DataBinding" OnInit="CrystalReportSource1_Init" OnLoad="CrystalReportSource1_Load" OnPreRender="CrystalReportSource1_PreRender" OnUnload="CrystalReportSource1_Unload">
<Report FileName="Reports\CustOrderHistory.rpt">
<DataSources>
<CR:DataSourceRef DataSourceID="SqlDataSource2" TableName="CustOrderHist;1" />
</DataSources>
</Report>
</CR:CrystalReportSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="CustOrderHist" SelectCommandType="StoredProcedure" OnSelecting="SqlDataSource2_Selecting" OnSelected="SqlDataSource2_Selected">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="CustomerID" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<br />
</div>
</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.
Viswanath Majeti works as a Project Lead in .NET Technologies for a software development company in Hyderabad, India