前端代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
Font-Size="8pt" Height="449px" Width="908px" ShowBackButton="True"
SizeToReportContent="True" SkinID="1">
<LocalReport ReportPath="Report\CanReport\rptCanFault.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="SqlDataSource1"
Name="CanFult_sp_CanReportVehicleFault" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:T8ConnectionString %>"
SelectCommand="sp_CanReportVehicleFault" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="0" Name="WhereObjectID" Type="Decimal" />
<asp:Parameter DefaultValue="0" Name="WhereHoldID" Type="Decimal" />
<asp:Parameter DefaultValue="1" Name="Userid" Type="String" />
<asp:Parameter DefaultValue="2012-08-01" Name="WhereSTime" Type="String" />
<asp:Parameter DefaultValue="2012-08-01" Name="WhereETime" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
后台代码