Prevent auto-scroll on Screen reports with Auto-Hyperlink.

CRM Auto-hyperlink allows report content to be clickable , and your previous (parent_page) page will navigated to the content of report you clicked.

User reported that this is particularly annoying since if you have a long list of reports, each click cause the report to scroll up, and user have to scroll down to find the previous section.

Below solution came straight from our developer :

The href attribute on the links is causing the page to scroll back to the top. If we were to fix this properly, we'd return false after the onclick event that does the auto-linking.

The JavaScript for the auto-hyperlinking is added in a number of XSL files that are used to generate the screen reports. These files as as follows (in a 7.3 install):

\CRM\WWWRoot\Themes\Reports\Color\StdGridsPC.xsl
\CRM\WWWRoot\Themes\Reports\Ergonomic\StdGridsPC.xsl
\CRM\WWWRoot\Themes\Reports\Ergonomic\StdPlainPC.xsl
\CRM\WWWRoot\Themes\Reports\default\StdGridsPC.xsl
\CRM\WWWRoot\Themes\Reports\default\StdPlainPC.xsl
\CRM\WWWRoot\Themes\Reports\neutral\StdGridsPC.xsl
\CRM\WWWRoot\Themes\Reports\neutral\StdPlainPC.xsl

In each file, you'll see a section like this:

<xsl:attribute name="CLASS">REPORTDETAIL</xsl:attribute>
<xsl:if test="@DASHBOARD[.='Y']">
<xsl:attribute name="ONCLICK">
reportOpener.location='<xsl:value-of select="@HREF" />';return false;;
</xsl:attribute>
</xsl:if>
<xsl:if test="@DASHBOARD[.='']">
<xsl:attribute name="ONCLICK">
parent.window.opener.location='<xsl:value-of select="@HREF" />';
</xsl:attribute>
</xsl:if>
<xsl:if test="not(@DASHBOARD)">
<xsl:attribute name="ONCLICK">
parent.window.opener.location='<xsl:value-of select="@HREF" />';
</xsl:attribute>
</xsl:if>
<xsl:choose>


Add "return false;" at the end of each line that references parent.window.opener.location. Once this is done, the report window will no longer scroll.


This issue was reported as a bug after release of SP2, so user may see this issue dissipates in future release.

Let me know if you have questions.


Thank you.

Jim Tu

CRM Support.