Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011 adding reporting server report to navigation bar with custom parameter.

$
0
0

Greetings,

I am having a problem with getting reports to work with CRM 2011, I think it was in RU11 or RU12 and the latest browsers that they started to work funny or not at all.

The setup is like this.

  • Report server report not CRM report.
  • Viewable through a navigation link with external url set.
  • Accountnumber is sent in as parameter with form javascript that runs onload and updates the external url.

Here is the code I use to update the url for the report.

function form_OnLoad()
{  
  var items = Xrm.Page.ui.navigation.items.get();

  for (var i in items) 
  {
   var item = items[i];
   var itemLabel = item.getLabel();

   if(itemLabel == "Link name")
   {
     var areaId1 = item.getId();
     var navVal1 = document.getElementById(areaId1); 
    if (navVal1 != null && navVal1 != undefined)
    { 
      var u2 = encodeURI("Report URL"+ crmForm.all.accountnumber.value); 

      navVal1.onclick = function () 
      {
       loadIsvArea(Mscrm.CrmUri.create(u2), false)
       var navIframeObject = document.getElementById(areaId1+"AreaFrame"); 
       if(navIframeObject != null)
       {
        navIframeObject.src = u2;
       }
      };
    }
   }
  }
}

I usually get an error when I click the link

<CrmScriptErrorReport><ReportVersion>1.0</ReportVersion><ScriptErrorDetails><Message>Unable to get value of the property 'target': object is null or undefined</Message><Line>1</Line><URL>/_static/_common/scripts/details.js?ver=-1616214599</URL><PageURL>/userdefined/edit.aspx?_gridType=1&etc=1&id=%7b55A3B8A6-0680-DD11-B551-00127994389A%7d&pagemode=iframe&preloadcache=0000&rskey=0000</PageURL><Function>anonymous(selectedNavLink,url,passParams,domEvent){if(passParams)url=addIsvParameters(url);var$v_0=domEvent.target;while(!IsNull($v_0)&&$v_0.tagName!=="A")$v_0=$v_0.parentNode;returnMscrm.Details.loadArea(selectedNavLink,$v_0.id+"Area","",url,true,passPar</Function><CallStack><Function>anonymous(selectedNavLink,url,passParams,domEvent){if(passParams)url=addIsvParameters(url);var$v_0=domEvent.target;while(!IsNull($v_0)&&$v_0.tagName!=="A")$v_0=$v_0.parentNode;returnMscrm.Details.loadArea(selectedNavLink,$v_0.id+"Area","",url,true,passParams)}</Function></CallStack></ScriptErrorDetails></CrmScriptErrorReport>

Any suggestions would be greatly appreciated, be it a fix for this or a proper way to do this.

Best regards,
Halldór


Halldór Jóhannsson




Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>