If you are unable to create a new account, please email support@bspsoftware.com

 

how to hide ‘ include a link to report ' when schedule a report delivery by mail

Started by mc09, 21 May 2009 07:53:20 AM

Previous topic - Next topic

mc09

just like hide mail attachment we can put the codes below in system.xml
<param name="ui_hide">
  <CC_RUN_OPTIONS_email_attachment/>
</param>

how can i hide the link or disable the link check-box?

CognosPaul

This is possible but tricky.

First, there is no simple hide flag that you can add to the system.xml, you'll need to modify the email_options.xts file. Second, you'll also need to remove the portal.jar file. I recommend renaming it to portal.jar.bak. The portal.jar is an archive of many of the xts and xml files. Modifying email_options.xts won't have any effect unless you remove the jar.

Files to modify:
..\c8\webapps\p2pd\WEB-INF\lib\portal.jar
..\c8\templates\ps\portal\emailOptions\email_options.xts

If you want to disable it for everyone look for the following section
<xsl:if test="(key('business-rules','allowLinkToReport')='true') or (key('business-rules','allowEmailAsAttachment')='true' or key('env-param','m_ro_emailAsAttachment')='true')">
<lyt:layout style="1">
<lyt:section>
<dp:choice>
<xsl:if test="key('business-rules','allowLinkToReport')='true'">
<dp:section1>
<input type="checkbox" name="m_ro_emailAsURL" value="true">
<xsl:if test="key('env-param','m_ro_emailAsURL')='true'">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
</input>
</dp:section1>
<dp:section2>
<xsl:choose>
<xsl:when test="key('request-param','objectClass')='jobDefinition'">
<xts:string id="IDS_EMAIL_OPTIONS_INCLUDE_LINKS"/>
</xsl:when>
<xsl:otherwise>
<xts:string id="IDS_EMAIL_OPTIONS_INCLUDE_LINK"/>
</xsl:otherwise>
</xsl:choose>
</dp:section2>
</xsl:if>


Modify it to:
<xsl:if test="(key('business-rules','allowLinkToReport')='true') or (key('business-rules','allowEmailAsAttachment')='true' or key('env-param','m_ro_emailAsAttachment')='true')">
<lyt:layout style="1">
<lyt:section>
<dp:choice>
<!--<xsl:if test="key('business-rules','allowLinkToReport')='true'">
<dp:section1>
<input type="checkbox" name="m_ro_emailAsURL" value="true">
<xsl:if test="key('env-param','m_ro_emailAsURL')='true'">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
</input>
</dp:section1>
<dp:section2>
<xsl:choose>
<xsl:when test="key('request-param','objectClass')='jobDefinition'">
<xts:string id="IDS_EMAIL_OPTIONS_INCLUDE_LINKS"/>
</xsl:when>
<xsl:otherwise>
<xts:string id="IDS_EMAIL_OPTIONS_INCLUDE_LINK"/>
</xsl:otherwise>
</xsl:choose>
</dp:section2>
</xsl:if>-->


Notice the <!-- and -->.

Now for caveats. This works on 8.4. Modifying the internals can prevent Cognos from loading at all. Always make a backup of every file you modify, and make a changelog so you can redo the changes whenever you upgrade or reinstall.

mc09

hi PaulM, thanks for your help.
i found another way to solve it while my scenario is cognos 8.3. i believe there is a little different in email_options.xts.
under cognos 8.3 , we can modify the file email_interface.xml

mc09

PaulM, do you know what's the name for portal.jar file on cognos 8.3?

CognosPaul

I'm sorry, I haven't had the opportunity to explore a 8.3 installation.

JFalletti

I just recently did this:


Stop the Cognos 8 service

Open the c8_location/templates/ps/portal
/system.xml file in an XML or text editor.
Add the following XML code to the <system> element:
<param name="ui_hide">
<CC_RUN_OPTIONS_email_attachment/>
</param>

If you hide other user interface elements by modifying the system.xml file , the <param name="ui_hide"> element already exists. In this case, add the following to the element:
<CC_RUN_OPTIONS_email_attachment/>

Save the file.

Start the Cognos 8