【发布时间】:2014-12-01 04:21:35
【问题描述】:
我有一些在页面上有 SSRS 报告控件的 ASP.NET 代码。 Web 应用程序托管在与托管 SSRS 的服务器不同的服务器上。我遇到的问题是,当我在 Internet Explorer 中拉出报告时,日期选择器控件未显示日历,如果我尝试在 Chrome 中拉出报告,则日期选择器控件根本不显示。如果我在文本框中输入日期,报告就可以正常工作,但是,我们真的希望能够使用日期选择器控件。
关于什么可能是错误的任何想法?
我认为这个问题与之前提出的问题不同,因为我不仅在问非 IE 浏览器,还问了 IE 的问题。
当用户点击该控件时,日期选择器控件不会在 IE 中显示日历。
韦恩·E·普费弗
----- 编辑添加代码示例 ------
aspx代码为:
<rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote" Width="100%" Height="100%" AsyncRendering="False">
</rsweb:ReportViewer>
<asp:ScriptManager ID="ScriptManager1" runat="server">
在下拉列表中选择了一个报告,这是将报告加载到报告查看器中的代码:
protected void loadViewer(string report) {
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
IReportServerCredentials irsc = new CustomReportCredentials(
ConfigurationManager.AppSettings["ReportUser"],
ConfigurationManager.AppSettings["ReportPswd"],
ConfigurationManager.AppSettings["ReportDomain"]);
ReportViewer1.ServerReport.ReportServerCredentials = irsc;
ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportURL"]);
ReportViewer1.ServerReport.ReportPath = ConfigurationManager.AppSettings["ReportPath"] + report;
ReportViewer1.SizeToReportContent = true;
//Get the list of account IDs that the user has viewothertransactions at
List<string> vaIds = new List<string>();
string votAccts = (String)Session["votAccounts"];
string[] aIds = votAccts.Split(',');
foreach (var aId in aIds)
{
vaIds.Add(aId);
}
//Create the list of account ids where the user can only see its orders
List<DropdownOption> acclist = (List<DropdownOption>)Session["searchAccounts"];
string acctIds = "";
if (null != acclist)
{
for (int i = 0; i < acclist.Count; i++)
{
if (!vaIds.Contains(acclist[i].Id))
{
acctIds += acclist[i].Id + ",";
}
}
if (acctIds.Length > 0)
{
acctIds = acctIds.Substring(0, acctIds.Length - 1);
}
}
Users user = (Users) Session["userObject"];
ReportParameter userid = new ReportParameter("Userid", user.Id.ToString());
ReportParameter votAccounts = new ReportParameter("VotAccounts", votAccts);
ReportParameter accounts = new ReportParameter("Accounts", acctIds);
log.Debug("Requesting report '" + report + "'. Parameters - Userid=" + user.Id + " VotAccounts=" + votAccts + " Accounts=" + acctIds);
ReportViewer1.ServerReport.SetParameters(new ReportParameter[] { userid, votAccounts, accounts });
ReportViewer1.ServerReport.Refresh();
}
【问题讨论】:
标签: asp.net sql-server internet-explorer google-chrome reporting-services