【问题标题】:SQL server Reporting services with Classic ASP带有经典 ASP 的 SQL 服务器报告服务
【发布时间】:2012-10-19 19:21:00
【问题描述】:

我在 Classic Asp 中有一个应用程序,我需要使用 SQL Server Reporting Services。将生成报告的页面有一些过滤器,我必须使用它。

我已经制作了 存储过程 和 SSRS 解决方案。我只是想知道如何在 Classic ASP 中调用报表。

谢谢。

【问题讨论】:

  • 在 ASP.NET 中我这样称呼报告: ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "t", "abrirRelatorio('" + ConfigurationManager.AppSettings["ReportServer" ].ToString() + "rel_ficha&fic_codigo=" + objStr.ToString() + "&rs%3aCommand=Render&rs:ClearSession=true&rs%3aFormat=pdf&rc%3aToolbar=False&rc%3aJavaScript=False&rc%3aLinkTarget=_top&rc%3aArea=Params'); ", 真);
  • 您的页面中有一个名为“abrirRelatorio”的函数吗?我认为您必须在页面中添加一个脚本块才能添加该功能。报表服务器值可以从 web.config 中获取,其余值可以这样使用..您必须将此函数绑定到按钮或链接的 onclick ..您是如何做到这一点的.net ?

标签: reporting-services asp-classic


【解决方案1】:

经过一番研究,我找到了解决方案。 我在输入按钮中使用了onClick事件,调用了一个函数。 见下面代码:

" 函数报告() {

        var vexp_expediente = document.getElementById('txtexp_num_exp').value;
        var vpro_obs = document.getElementById('txtpro_obs').value;
        var vsit_id = document.getElementById('sit_id').value;
        var vpro_numero = document.getElementById('txtpro_numero').value;
        var vexp_requisitante = document.getElementById('txtexp_requisitante').value;
        var vexp_num_req = document.getElementById('txtexp_num_req').value;
        var vlic_id = document.getElementById('lic_id').value;
        var vare_id = document.getElementById('cboare_id').value;

        window.open("http://Report-Server/ReportServer?%2fSCPC%2fRel_Processos_Compra&exp_num_exp=" + vexp_expediente + "&pro_obs=" + vpro_obs + "&sit_id=" + vsit_id + "&pro_numero=" + vpro_numero + "&exp_requisitante=" + vexp_requisitante + "&exp_num_req=" + vexp_num_req + "&lic_id=" + vlic_id + "&are_id=" + vare_id + "&rs%3aCommand=Render&rs:ClearSession=true&rs%3aFormat=excel&rc%3aToolbar=False&rc%3aJavaScript=False&rc%3aLinkTarget=_top&rc%3aArea=Params");
    }

</script>"

感谢您的帮助。

【讨论】:

    猜你喜欢
    • 2011-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-15
    相关资源
    最近更新 更多