当前位置: 代码迷 >> .NET报表 >> ReportViewer 报表没有显示数据,该怎么解决
  详细解决方案

ReportViewer 报表没有显示数据,该怎么解决

热度:3574   发布时间:2013-02-25 00:00:00.0
ReportViewer 报表没有显示数据
前端代码

<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>
          

       后台代码
       
  相关解决方案