2011-03-14 67 views
0

起初我遇到的問題很容易找到,然後我按照建議添加了腳本管理器,導致錯誤消失遠。現在,它只是不渲染。我將我的.RDLC從VS 2008升級到VS 2010,現在當我運行報表時頁面是空白的

這是一個非常簡單的報告。當我不首先「隱藏」報告時,它會呈現,但超時,所以我知道它會起作用。似乎我遇到了從SSRS 2008和SSRS 2010遷移的某種類型的異步問題。我嘗試了更新面板和異步渲染的各種屬性,但這並沒有幫助。

這是我的基本代碼

<rsweb:ReportViewer ID="ReportViewer2" runat="server" Font-Names="Verdana" Visible="false" 
     Font-Size="8pt" Height="564px" Width="1055px" > 
     <LocalReport ReportPath="Reports/SingleUK.rdlc"> 

      <DataSources> 
       <rsweb:ReportDataSource DataSourceId="MainSqlDataSource" Name="DataSet1" /> 
      </DataSources> 
     </LocalReport> 
    </rsweb:ReportViewer> 



<asp:SqlDataSource ID="MainSqlDataSource" runat="server" 
    ConnectionString="<%$ ConnectionStrings:AncillaryProductionConnectionString %>" 
    SelectCommand="packsheets.procUKPacksheets" 
    SelectCommandType="StoredProcedure" 
    onselecting="MainSqlDataSource_Selecting"> 
    <SelectParameters> 
     <asp:FormParameter Type="Int32" DefaultValue="" 
      FormField="StatusDropDownList" Name="Status" /> 
     <asp:FormParameter Type="Int32" DefaultValue="" FormField="HoldDropDownList" 
      Name="Hold" /> 
     <asp:FormParameter Type="Int32" DefaultValue="0" 
      FormField="NoteCategoryDropDownList" Name="Notes" /> 
     <asp:FormParameter Type="Int32" DefaultValue="0" 
      FormField="ShippingGroupDropDownList" Name="ShMeth" /> 
     <asp:Parameter Direction="ReturnValue" Name="RETURN_VALUE" Type="Int32" /> 
    </SelectParameters> 
</asp:SqlDataSource> 

和守則

背後
protected void Page_Load(object sender, EventArgs e) 
    { 
     //if (!Page.IsPostBack) 
     //{ 
     // this.ReportViewer2.Visible = false; 
     //} 
    } 

    protected void Button1_Click(object sender, EventArgs e) 
    { 
     this.ReportViewer2.Visible = true; 
     this.ReportViewer2.LocalReport.Refresh(); 

    } 

    protected void MainSqlDataSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e) 
    { 
     if (e.Command.Parameters["@Status"].Value == null) 
     { 
      e.Command.Parameters["@Status"].Value = DBNull.Value; 
     } 
     if (e.Command.Parameters["@Hold"].Value == null) 
     { 
      e.Command.Parameters["@Hold"].Value = DBNull.Value; 
     } 
    } 
} 

沒有人有還有什麼我可以嘗試任何想法?

提前致謝!

+0

通過 「升級」你的意思是你通過Visual Studio的2010升級嚮導來運行它嗎?或者您是否使用Visual Studio 2010中包含的SSRS版本來重寫報告? – Dubs 2011-03-23 14:43:55

回答

0

使用Visual Studio編寫的SSRS報告有點像Vegas。該版本的Visual Studio中會發生什麼,該版本的Visual Studio將保留在該版本中。

不幸的是,要從VS 2008升級到VS 2010,您需要從零開始重寫您的.rdlc報告。 (這同樣適用於2005年至VS VS 2008)

下面是關於該主題的相關MSDN論壇帖子: http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/9a7a78a0-bf5c-458a-9cb0-bc82004501f7

希望這有助於

--Dubs

+2

「使用Visual Studio編寫的SSRS報告有點像拉斯維加斯」 - 只有更少的啤酒和脫衣舞娘。 – 2011-03-23 15:08:24

相關問題