1626524 - How to remove Scrollbar from Crystal Report viewer

SAP Knowledge Base Article - Public

1626524 - How to remove Scrollbar from Crystal Report viewer

Symptom

Resolution

  • By default the framework assigns "crystalstyle" class to crystal report viewer
  • Using javascript it is possible to hide the scrollbar:
<script language="javascript" type="text/javascript">
ar = new Array();
function getElementsByClassName( strClassName, obj ) {
var re = new RegExp("\\b" + strClassName + "\\b", "g");
if ( re.test(obj.className) ) {
ar.push( obj );
}
for ( var i = 0; i < obj.childNodes.length; i++ )
getElementsByClassName( strClassName, obj.childNodes[i], ar );
return ar;
}
</script>
function removescroll()
{
var arrReturnElements = new Array();
arrReturnElements=getElementsByClassName("crystalstyle",document.body);
for(var j=0; j<arrReturnElements.length; j++)
{
arrReturnElements[j].style.overflow="hidden";
}
}
  • Call removescroll function:
<body onload="removescroll();">

Keywords

scroll bar delete hide , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

Crystal Reports 2008 V1