2012-05-02 122 views
1

我描述了我的问题不同, 我可以用下面的代码隐藏SSRS参数2011

var url="/"+orgname+"/crmreports/viewer/viewer.aspx?action=run&helpID=OppClients.rdl&id=%7bC7D34446-7F90-E111-A8F3-080027EA7FF9%7d&p:nomclient=aziza boulabyar"; 

window.open(url, "", "height=" + (screen.availHeight * .75) 
    + ",width=" + (screen.availWidth * .75) 
    + ",toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=0"); 

现在我想隐藏在报告中的参数打开报告,当我加入&rc:parameters=false到url我得到一个错误,如下面

图片说明有人能告诉我怎么解决这个问题


下面LO的内容g文件:

at ErrorInformation.LogError() 
at ErrorInformation..ctor(Exception exception, Uri requestUrl, Boolean logError) 
at MainApplication.Application_Error(Object sender, EventArgs eventArguments) 
at EventHandler.Invoke(Object sender, EventArgs e) 
at HttpApplication.RaiseOnError() 
at ApplicationStepManager.ResumeSteps(Exception error) 
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) 
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) 
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) 
>MSCRM Error Report: 
-------------------------------------------------------------------------------------------------------- 
Error: Une exception de type 'System.Web.HttpUnhandledException' a été levée. 
Error Message: CRM Parameter Filter - Invalid parameter 'rc:parameters=false' in Request.QueryString on page /Manhattan/crmreports/viewer/viewer.aspx 
The raw request was 'GET /Manhattan/crmreports/viewer/viewer.aspx?action=run&helpID=OppClients.rdl&id=%7bC7D34446-7F90-E111-A8F3-080027EA7FF9%7d&rc:parameters=false&p:nomclient=aziza%20boulabyar' called from . 
Error Details: Une exception de type 'System.Web.HttpUnhandledException' a été levée. 
Source File: Not available 
Line Number: Not available 
Request URL: http://localhost:5555/Manhattan/crmreports/viewer/viewer.aspx?action=run&helpID=OppClients.rdl&id=%7bC7D34446-7F90-E111-A8F3-080027EA7FF9%7d&rc:parameters=false&p:nomclient=aziza%20boulabyar 
Stack Trace Info: [InvalidOperationException: CRM Parameter Filter - Invalid parameter 'rc:parameters=false' in Request.QueryString on page /Manhattan/crmreports/viewer/viewer.aspx 
The raw request was 'GET /Manhattan/crmreports/viewer/viewer.aspx?action=run&helpID=OppClients.rdl&id=%7bC7D34446-7F90-E111-A8F3-080027EA7FF9%7d&rc:parameters=false&p:nomclient=aziza%20boulabyar' called from .] 
à Microsoft.Crm.Application.ParameterFilter.ValidateParameter(HttpRequest request, ArrayList parameterCollection, String key, String value, ParameterSources source, EntityType pageEntityType, FormAdditionalAllowedParameters additionalAllowedParameters) 
à Microsoft.Crm.Application.ParameterFilter.ValidateParameters(Page page, EntityType pageEntityType, Boolean alwaysEnableParameterChecking, FormAdditionalAllowedParameters formAdditionalAllowedParametersTemp) 
à Microsoft.Crm.Application.ParameterFilter.ValidateParameters(Page page, EntityType pageEntityType, Boolean alwaysEnableParameterChecking) 
à Microsoft.Crm.Application.Controls.AppPage.ValidatePageParameters() 
à Microsoft.Crm.Application.Controls.AppPage.OnInit(EventArgs e) 
à System.Web.UI.Control.InitRecursive(Control namingContainer) 
à System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
[HttpUnhandledException: Une exception de type 'System.Web.HttpUnhandledException' a été levée.] 
à System.Web.UI.Page.HandleError(Exception e) 
à System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
à System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
à System.Web.UI.Page.ProcessRequest() 
à System.Web.UI.Page.ProcessRequest(HttpContext context) 
à System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
à System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
+1

没有图片附加 - 你能给出详细的错误? – Nathan

回答

0

根据这篇文章Pass parameters and options with a URL in SQL Reporting Services你做对了。

但是,当我试图做同样的事情时,我得到了这个错误,至此没有任何说明。

Error

要看看发生了什么事情,我会建议你使用跟踪,看到这个帖子CrmDiagTool 2011,这个工具会让使用它容易得多。 我的猜测是你需要以某种方式使这些参数可选。

对不起,没时间潜入它。 如果你在几天内没有解决问题,请告诉我们我们会解决它。

1

Sample of working

我的解决方案包括几个步骤,主要是不支持的 - 但它的作品。

  1. 克隆现有的C:\ Program Files文件\ Microsoft动态CRM \ CRMWeb \ CRMReports \浏览器\ viewer.aspx到\ viewerNoToolbar.aspx

  2. 更新中viewerNoToolbar。ASPX下面的代码从SSRS删除工具栏: -

    function reportLoaded() 
    { 
    
    if (oFrame.readyState === "complete") 
    { 
        addToRecent(); 
    } 
    

    function reportLoaded() 
    { 
    
    if (oFrame.readyState === "complete") 
    { 
        addToRecent(); 
        var frameDoc = oFrame.contentDocument || oFrame.contentWindow.document; 
        var reportViewerToolbar = frameDoc.getElementById("reportViewer_Toolbar"); 
        reportViewerToolbar.style.display = "none"; 
    } 
    
  3. 插入一个DIV隐藏现有的CRM工具栏和移动现有resultFrame的IFrame了DIV的

    </div> 
    <table cellspacing="0" cellpadding="0" width="100%" height="100%"> 
    

    </div> 
    <div style="display: none"> 
        <table cellspacing="0" cellpadding="0" width="100%" height="100%"> 
    

    也关闭它关闭通过

     </table> 
    </body> 
    

    改变以下(并删除相关resultFrame现有的TD模块)

     </table> 
        </div> 
        <table cellspacing="0" cellpadding="0" width="100%" height="100%"> 
         <tr style="height: 100%;"> 
          <td colspan="2" style="padding-top: 5px; padding-bottom: 10px; border-width: 2px; 
           border-color: #000000"> 
           <div id="divResultFrame"> 
            <iframe name="resultFrame" id="resultFrame" src="/_static/blank.htm" style="border: 0px; 
             margin: 0px; padding: 0px; width: 100%; height: 100%;"></iframe> 
           </div> 
          </td> 
         </tr> 
        </table> 
    </body> 
    
  4. 更改您的查询

    var url="/"+orgname+"/crmreports/viewer/viewerNoToolBar.aspx? 
    

    和不用担心rc:工具栏

祝你好运 格伦