起初我遇到的问题很容易找到,然后我按照建议添加了脚本管理器,导致错误消失远。现在,它只是不渲染。我将我的.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;
}
}
}
没有人有还有什么我可以尝试任何想法?
提前致谢!
通过 “升级”你的意思是你通过Visual Studio的2010升级向导来运行它吗?或者您是否使用Visual Studio 2010中包含的SSRS版本来重写报告? – Dubs 2011-03-23 14:43:55