2011-03-14 63 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

相关问题