【问题标题】:SSRS report not showing up through dynamic URLSSRS 报告未通过动态 URL 显示
【发布时间】:2015-05-13 08:30:32
【问题描述】:

我正在尝试从我的 asp.net Web 应用程序连接 ssrs 报告服务。我正在根据搜索参数动态创建 URL,并尝试获取报告,但未获取报告。

    //report server name + reports folder name
    strRedirectURL = ConfigurationManager.AppSettings["ReportServerURL"];
    //report name
    strRedirectURL = strRedirectURL + "ExportSearch";
    //report rendering constant
    strRedirectURL = strRedirectURL + "&rs:Command=Render";
    //parameters
    strRedirectURL = strRedirectURL + strParamString;
    //show/hide parameters on report
    strRedirectURL = strRedirectURL + "&rc:parameters=false&rs:ClearSession=true";
    //report format
    strRedirectURL = strRedirectURL + "&rs:Format=Excel";

    System.Diagnostics.Process objProcess = new System.Diagnostics.Process();
    objProcess.StartInfo.FileName = "iexplore.exe";
    objProcess.StartInfo.Arguments = strRedirectURL;
    objProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

    objProcess.Start();
    objProcess.Close();

我在本地执行了上述代码,并且运行良好。但是当部署在服务器上进行测试时,它不起作用。创建的 URL 看起来像这样,

http://[Server_Name]/ReportServer/?%2fReports%2fExportSearch&rs:Command=Render&rc:parameters=false&rs:ClearSession=true&rs:Format=Excel

我检查了 URL,当尝试从单独的浏览器窗口启动时它工作正常。当应用程序尝试打开此 URL 时,它不会打开。

【问题讨论】:

  • 你得到什么回应?你说打不开,是不是报错了?
  • @Paddy 没有错误。我记录了 URL,并且正确创建了 URL。它只显示加载,然后返回搜索屏幕。

标签: c# asp.net reporting-services ssrs-2008-r2


【解决方案1】:

您是否尝试将报告嵌入您的网站?

WebServer 上生成一个新的 IE 进程对 客户端 没有多大帮助?
您正在使用的代码用于 Windows 应用程序 - 一些提示 here

但对于 Web 应用程序,我认为使用 webviewer 控件是最好的方法。一些提示here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-12-18
    • 1970-01-01
    • 1970-01-01
    • 2010-11-29
    • 2013-03-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多