Author Topic: Customize C. Connection further (customers preferences)  (Read 5890 times)

Offline charon

  • Statesman
  • ******
  • Join Date: Nov 2011
  • Posts: 398
  • Forum Citizenship: +19/-3
Hi Cognoise Community,

First post: Of course, an urgent problem drove me here, but because i will work with C10 for some time from now on, i hope i will become a cool cognoiser  myself oneday :P

Problem: I want to customize the Cognos connection Ui, and to be precise: i want to hide some options in the "my area/ my preferences". E.g. the "show welcome screen", this radio button should be hidden.

After studying the "Adminstration & Security Userguide (esp. chapter 36) i think i understood how to process...and i tried it with succes with the UI object on the main page.
(<param name="ui_hide"><CRN_HEADER/> .....and so on in the system.xml.

Also, i think with
<out:if test="not(contains(........)> in the presentation.xml i will be able to mark whatever object i need to hide with the param syntax.

PROBLEM is: Where do i find this options (for my area/my preferences)? Where is the "showwelcomescreen"?
I also found a xml-file called preferences.xml, and tried to take delete the "showwelcomescreen" - items, restarted Cognos but the radio buton still occurs.

Also, i would like to take options away from the "grid-line" menu...that there are just 2 options presented. (e.g. no grids and highlighting)

I have searched for hours the last 2 days, and getin a but frustrated  :'(

I dont expect a whole "step-by-step"-solution, and thats ok because i like working (with cognos;)
but it would be awesome to get some hints or clues...

thx a lot
charon  :o



- knuffel the muffel in the puffel -

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,872
  • Forum Citizenship: +266/-1
    • Paul's Cognos Blog
Re: Customize C. Connection further (customers preferences)
« Reply #1 on: 27 Nov 2011 03:31:16 am »
Hi Charon

Those options are generated in ..\templates\ps\portal\preferences\common\response\preferences.xslt. Look for the group
Code: [Select]
<lyt:section width="70%">
<!-- Format :  -->
<out:copy-of select="$format"/>
<!-- Show Welcome page -->
<out:copy-of select="$showWelcomePage"/>
<!-- Run Options Confirmation  -->
<out:copy-of select="$showRunOptionsSummary"/>
<!-- Accessibility support for reports -->
<out:if test="count(/root/configuration/property[@name='overrideOptions']/*/value/item[name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures'])!=1">
<out:copy-of select="$enableAccessibilityForReports"/>
</out:if>
</lyt:section>

The out:if test should work fine there.

The value prompt for separators can be found in the following section of the same file:
Code: [Select]
<out:variable name="listViewSeparator">
<dp:input>
<dp:section1>
<xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS"/>
</dp:section1>
<dp:section2>
<utml:select name="m_po_listViewSeparator">
<utml:default-value>
<out:value-of select="$defaultValues/param[@name='listViewSeparator']"/>
</utml:default-value>
<utml:option value="line"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_GL"/> </utml:option>
<utml:option value="background"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_AB"/> </utml:option>
<utml:option value="none"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_NS"/> </utml:option>
</utml:select>
</dp:section2>
</dp:input>
</out:variable>

Just delete or use the out:if on the line option.

Changes to the internal files may require deleting or renaming ..\c10_64\webapps\p2pd\WEB-INF\lib\portal.jar. That jar contains the compressed versions of many (but not all) of the internals. I usually just rename it to portal.jar.bak. If Cognos doesn't find the jar it will use the live versions in the templates folder.

I've had a lot of success removing options from the preferences page, but I haven't had much luck adding a new session parameter.

Offline charon

  • Statesman
  • ******
  • Join Date: Nov 2011
  • Posts: 398
  • Forum Citizenship: +19/-3
Re: Customize C. Connection further (customers preferences)
« Reply #2 on: 28 Nov 2011 04:00:20 am »
Hi Paul,

first of all: thx so much for answering. I have searched even through the weekend, but was no able 2 locate the code positions for these options. ty ty ty  ::)
After taking a closer look to your suggestions, i understand the walk through.
Still, after executing the steps you suggested,
it still does not work.  :'(

Steps i executed...

1) renamed the portal.jar so cognos wont load this (i didnt even know this file exist b4 u wrote the post :D)
2)  implemented the <out:if> syntax in the preferences.xml (.../ps/portal/preferences/common/response/)

      <out:if test="not(contains($ui_black_list, 'CC_Showwelcomescreen'))">
            <lyt:section width="70%">                                                   
               <!-- Format :  -->
               <out:copy-of select="$format"/>                                 
               <!-- Show Welcome page -->
               <out:copy-of select="$showWelcomePage"/>
               <!-- Run Options Confirmation  -->
               <out:copy-of select="$showRunOptionsSummary"/>      
               <!-- Accessibility support for reports -->   
               <out:if test="count(/root/configuration/property[@name='overrideOptions']/*/value/item[name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures'])!=1">   
                  <out:copy-of select="$enableAccessibilityForReports"/>
               </out:if>
            </lyt:section>
      </out:if>

            
And also
  <out:if test="not(contains($ui_black_list, 'CC_Listview_Separator'))">
   <out:variable name="listViewSeparator">
      <dp:input>
         <dp:section1>
            <xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS"/>
         </dp:section1>
         <dp:section2>
            <utml:select name="m_po_listViewSeparator">
               <utml:default-value>
                  <out:value-of select="$defaultValues/param[@name='listViewSeparator']"/>
               </utml:default-value>
               <utml:option value="line"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_GL"/>   </utml:option>
               <utml:option value="background"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_AB"/>   </utml:option>
               <utml:option value="none"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_NS"/>   </utml:option>
            </utml:select>
         </dp:section2>
      </dp:input>
   </out:variable>

      
   <out:variable name="skin">
      <!-- Skins -->
      <utml:input type="hidden" name="p_style_back" value=""/>
      <dp:input>
         <dp:section1>
            <xts:string id="IDS_PERS_TAB_GENERAL_SKIN"/>
         </dp:section1>
         <dp:section2>
            <utml:select name="m_po_skin">
               <utml:default-value><out:value-of select="$defaultValues/param[@name='skin']"/></utml:default-value>
               <out:for-each select="$skin-objects/*">
                  <out:if test="cm:published='' or cm:published='true'">
                     <out:variable name="currentSkinID"><out:value-of select="cm:storeID"/></out:variable>
                      <utml:option>
                         <utml:value>storeID("<out:value-of select="$currentSkinID"/>")</utml:value> 
                         <out:value-of select="cm:defaultName"/>
                     </utml:option>
                  </out:if>
               </out:for-each>   
            </utml:select>
            <img height="1" width="10">
               <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
            </img>
            <!-- do not show the preview link for readonly named users as links do not show very nicely in readonly forms.  Additionally do not show the link if there
            are no skins in the list-->
            <out:if test="(not($isNamedAccountReadOnly) and (count($skin-objects/*) &gt; 0))">
               <a href="javascript:preview()" ><xts:string id="IDS_PERS_TAB_GENERAL_SKIN_PREVIEW"/>[/url]
            </out:if>
         </dp:section2>
      </dp:input>
   </out:variable>
</out:if>
[/size]


3) Inserted the names of the UI elements to hide in the syntax.xml
   
<!-- =================PARAM NAME UI HIDE = List of hidden UI Elements in Cognos connection, inserted by MSZ 28.11.2011=================== -->
   <param name="ui_hide">
      <CC_Listview_Separator/>
      <CC_Showwelcomescreen/>
   </param>

   

I restarted Cognos, but i can still see the Options...and i am confused. After trying it with some ui objects on the main page, it really works.
So i assume the system.xml is the right one...


Again, thank you Paul and rest of cognoise for helping out...its great to develop and learn stuff.
Still, it would be awesome to get the correct resutlts as well  ;D

Any Ideas why the modificaitons wont do the trick for me?
greetz charon

- knuffel the muffel in the puffel -

Offline charon

  • Statesman
  • ******
  • Join Date: Nov 2011
  • Posts: 398
  • Forum Citizenship: +19/-3
Re: Customize C. Connection further (customers preferences)
« Reply #3 on: 28 Nov 2011 04:26:41 am »
edit:
also tried to delete all the code lines, it still shows the page (i also deleted cookies/ cache)...

maybe CC gets the information also from another source (another backup?!)

a kingdom for helping ideas!  :o
- knuffel the muffel in the puffel -

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,872
  • Forum Citizenship: +266/-1
    • Paul's Cognos Blog
Re: Customize C. Connection further (customers preferences)
« Reply #4 on: 29 Nov 2011 01:42:32 am »
That's really weird.

I'll check against my test machine tomorrow.

Offline charon

  • Statesman
  • ******
  • Join Date: Nov 2011
  • Posts: 398
  • Forum Citizenship: +19/-3
Re: Customize C. Connection further (customers preferences)
« Reply #5 on: 29 Nov 2011 02:15:42 am »
Im sorry im causing circumstances  :-\

And also, im confused myself. The steps you told me defintly make sense, it should work..no idea whats going wrong there.
I have looked in x-thousends (literaly!) of xml code lines, your way HAS to be correct.
But...my local installation still does not deliver the expected results.

I REALLY appcreciate your help Paul, not only i have 2 deliver results, i also really!!!! want to know why this does not work after all the days ive spend in it.
Lookin forward to your test reports...
best regards
"sad but not without hope" charon  :P
- knuffel the muffel in the puffel -

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,872
  • Forum Citizenship: +266/-1
    • Paul's Cognos Blog
Re: Customize C. Connection further (customers preferences)
« Reply #6 on: 30 Nov 2011 12:19:51 am »
Now that I have my test machine and an hour to spare (ain't commuting a joy?) I can look into this with more detail.

I notice you're wrapping the entire paragraph with the out:if. That would make the entire section disappear. Instead, lets try removing those options individually. First with comments, then with the blacklist code.

Code: [Select]
<out:variable name="listViewSeparator">
<dp:input>
<dp:section1>
<xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS"/>
</dp:section1>
<dp:section2>
<utml:select name="m_po_listViewSeparator">
<utml:default-value>
<out:value-of select="$defaultValues/param[@name='listViewSeparator']"/>
</utml:default-value>
<!--<utml:option value="line"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_GL"/> </utml:option>-->
<utml:option value="background"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_AB"/> </utml:option>
<utml:option value="none"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_NS"/> </utml:option>
</utml:select>
</dp:section2>
</dp:input>
</out:variable>

and

Code: [Select]
<lyt:section width="70%">
<!-- Format :  -->
<out:copy-of select="$format"/>
<!-- Show Welcome page -->
<!--<out:copy-of select="$showWelcomePage"/>-->
<!-- Run Options Confirmation  -->
<out:copy-of select="$showRunOptionsSummary"/>
<!-- Accessibility support for reports -->
<out:if test="count(/root/configuration/property[@name='overrideOptions']/*/value/item[name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures'])!=1">
<out:copy-of select="$enableAccessibilityForReports"/>
</out:if>
</lyt:section>

If the options successfully disappear when you modify the XML like this, then you know the blacklist code isn't working correctly.

Offline charon

  • Statesman
  • ******
  • Join Date: Nov 2011
  • Posts: 398
  • Forum Citizenship: +19/-3
Re: Customize C. Connection further (customers preferences)
« Reply #7 on: 30 Nov 2011 03:06:04 am »
 :P
Hi Paul,

jeha, commuting is fun  ;D
especially for those who ask the experienced user for hours in front of their pc to solve problems that are not made for being solved.

And back to the topic: Thats exactly the point..these options WONT dissappear. I did not only "out-comment" the code lines, i also deleted them!
The options still appear...does this work on your pc?

E.G.:

<lyt:section width="70%">                                                   
               <!-- Format :  -->
               <out:copy-of select="$format"/>                                 
               <!-- Show Welcome page -->
               <!-- <out:copy-of select="$showWelcomePage"/> -->
               <!-- Run Options Confirmation  -->
               <out:copy-of select="$showRunOptionsSummary"/>      
               <!-- Accessibility support for reports -->   
               <out:if test="count(/root/configuration/property[@name='overrideOptions']/*/value/item[name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures'])!=1">   
                  <out:copy-of select="$enableAccessibilityForReports"/>
               </out:if>
            </lyt:section>   


--> should hide the welcome home page radio button...but what ever im doing, deleting, black list or comment, it will  be visible everytime.
Deleted portal.jar, of course restarted cognos.

I am starting to think that this is not even possible  :'(
Maybe cognos has backup like the portal and uses this in case it got modified? I can not imagine this version, but ...who knows?
Damn cognos, enjoys giving me headaches like this  >:(

- knuffel the muffel in the puffel -

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,872
  • Forum Citizenship: +266/-1
    • Paul's Cognos Blog
Re: Customize C. Connection further (customers preferences)
« Reply #8 on: 30 Nov 2011 05:58:22 am »
I tried on my laptop and it worked perfectly. It may be possible there's another jar that has more of the xml files saved, I'll go over my changelogs to see if there's anything else I changed.

Try renaming the file and restarting Cognos, just for the fun of it. If it still works then it's 100% proven that Cognos isn't paying attention to the file.

Is this a multi server environment? Do you have any other Cognos installations on the same server?

Offline charon

  • Statesman
  • ******
  • Join Date: Nov 2011
  • Posts: 398
  • Forum Citizenship: +19/-3
Re: Customize C. Connection further (customers preferences)
« Reply #9 on: 30 Nov 2011 09:49:54 am »
HI Paul
Hm, very good idea testing the preferences.xml as whole for itself.  ::)

I deleted the preferences.xml from  "portal\preferences\common\response", and: ...the preferences are still to see.
Means cognos ignores the file.  :-\

Question is, why, and how can i force cognos to take my changes..
Would it be possible, that this is because i am global Admin? Is there a kind of Adminpage with all Options on it? Nah, doubt it... :/

FYI: I have installed Cognos 10.1.1 for test purposes local on my laptop. It is running over Apache 2.2 webserver (64b). Under that is a MS SQL server 2008 connected, also a local installation. There are no other (older) or parallel Installations.

Is there a way for me 2 find out where Cognos takes his information for building the page?
hm...should i take a closer look at the presentations.xmlx files? try <param name="disable...> ?

I am starting to think that i wont be able to deliver the solution to my chef... :'(

Maybe, i gonne reinstall the whole system, but i wont be able to do that to soon.
NMVD, if you have any last idea il be there and would gladly hear/ read it :) If you know/ find out, what files cognos is using the build connection GUI, pls let me know...and ul get my SOUL!

:) ty for all your work,
best regards
+charon+
- knuffel the muffel in the puffel -

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,872
  • Forum Citizenship: +266/-1
    • Paul's Cognos Blog
Re: Customize C. Connection further (customers preferences)
« Reply #10 on: 30 Nov 2011 11:10:05 am »
Something must be cached somewhere. Check the temp directory. Delete everything in there.

Do other changes you make take effect? What happens if you delete (rename) the logicsheets folder?

Can you post the startup log? There might be a clue there. If it was a multiple server installation, I'd say the problem was working on the wrong server.

Offline charon

  • Statesman
  • ******
  • Join Date: Nov 2011
  • Posts: 398
  • Forum Citizenship: +19/-3
Re: Customize C. Connection further (customers preferences)
« Reply #11 on: 30 Nov 2011 04:00:46 pm »
I also think there must be sth cached...

Followed your advise and
1) deleted content of the temp dir. then modified preferences.xml and restarted cog = no success
2) as i wrote bevore, trying to hide top level elements like the home button, the connection header and so on works perfectly. so the system xml and the presentation.xml wont be ignored only the preferences.xml. i am also able to hide the
"my preferences"  option in the "my area" menue, but once i am acutally IN there, the own preferences are not hideable.
3) i will gladly post any logs...but there are so many. could you please be a littlebit more precisly which one? the cogstartup out of the "configuration" folder?

Paul, honestly, i am so thankfull for the time you spend in to help me solving this mystery, i will bake you cake the next time your in germany!  ;)
- knuffel the muffel in the puffel -