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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Problem with a pagelet using parameterized URLs

Started by Fulvio, 20 Mar 2009 06:17:19 AM

Previous topic - Next topic

Fulvio

Hi,

my problem is as follows

I have a script, index.asp  that calls a javascript menu. For each menu item I have an associated report.
In one case instead of a single report I have a pagelet associated.
Each menu item calls a script asp to execute the report or the pagelet.

Example code for report:

form method="post" action="../../../cgi-bin/cognos.cgi" target="body">
   <input type="hidden" name="b_action" value="xts.run">
   <input type="hidden" name="m" value="portal/launch.xts">
   <input type="hidden" name="ui.tool" value="CognosViewer">
   <input type="hidden" name="ui.action" value="run">
   <input type="hidden" name="ui.object" value="/content/folder[@name='Samples']/folder[@name='Models']/package[@name='GO Data Warehouse (query)']/folder[@name='SDK Report Samples']/report[@name='Date Range List']">
   <input type="hidden" name="ui" value="h1h2h3h4">
</form>


Example code for pagelet:

<form method="post" action="../../../cgi-bin/cognos.cgi" target="body">
   <input type="hidden" name="b_action" value="xts.run">
   <input type="hidden" name="m" value="portal/cc.xts">
   <input type="hidden" name="m_page" value="i1D7C3A5B61E84D9994F5A1B385D6F6DB">
   <input type="hidden" name="ui" value="h1h2h3h4">
</form>


Once loaded the menu if the first selected item is a single report I have no problem, I have no problem even if we select in the menu, as second or third item, the pagelet.
If, however, once appeared on the menu, I select as first item the pagelet gives me the following error:

CPS-TRS-4107: The ASSEMBLER" transform instruction encountered an error while parsing the content

The knowledge base says:

Description:

When user try to access Cognos 8.4 for the first time using URL http://<Cog_Server>/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&CAMNamespace=<Namespace_ID>&m=portal/cc.xts&gohome= , we will get an error message saying:"CPS-TRS-4107: The "ASSEMBLER" transform instruction encountered an error while parsing the content

Error Message:

CPS-TRS-4107: The "ASSEMBLER" transform instruction encountered an error while parsing the content

com.ctc.wstx.exc.WstxEOFException : Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0]

Solution:

As a workaround we should use the following url :

http://<Cog_Server>/cognos8/cgi-bin/cognos.cgi?b_action=xts.run&CAMNamespace=<Namespace_ID>&m=portal/main.xts&startwel=yes


But if I apply these signs and change for the pagelet
<input type="hidden" name="m" value="portal/cc.xts">
with
<input type="hidden" name="m" value="portal/main.xts">
and add this parameter
<input type="hidden" name="startwel" value="yes">
i see the home page of Cognos.

How can I fix this problem?

Thank in advance

Fulvio


xiska

Hi Fulvo

First let me say what I understood: You createt an external application using several calls to build a part of the portal styled in your way used as a pagelet or you made an external asp file by hand. The parameter are used for the viewer to show the Headers. Then you try to call this report via url which is logging in the user.

In the store ID I can see that you created a tab which is non standard tab. In this case you need to refer to a portletinstance - which has it's own Store ID for each one who uses the pagelet you refer.
In one case you refer to the report viewer url and in the other you want to refer to a folder or package. This is completely different.

I do not get your taget right now. Do you want to link the user to a specific tab? Does the user have more than three? Do you use the Startpage ( you can turn them off)?

This <input type="hidden" name="startwel" value="yes"> means that the user goes to his startpage - whatever this might be.
If you provide all Users with this tab via SDK you can set this tab to the home of all. Then you add to the common profile with the tab and set it to the first. Then you take them the possibility to change the own profile.
The workaround is more a signon than anything else.

Go to the properties of the item you want to refer, take the url from the searchpath and uri link and copy it - this will work.
Your signon might destroy it - you need to use the javascript encodeURI method too.
Also try to use names like "Fulvo's special reports" - there is a nice change in the SP.

The "for the first time" brings up an other idea - take a look in the Namespace for the user - does he has a profile? If not please try if it makes a difference if the profile is created or not. If there is one use the sdk to copy profiles (you will find it in the KB) to activate the account's.

These problems will stay: If you make a release change you need to update your app. Not all URI's are correct.
The parameters will be difficult as well.


Fulvio

Hi,

if, in the code pagelet,  I replace  <input type="hidden" name="m_page" value="i1D7C3A5B61E84D9994F5A1B385D6F6DB">
with  <input type="hidden" name="ui.object" value="/content/package[@name='CognosEducation']/folder[@name='x Argomento']/folder[@name='From Dashboard To Dashboard']/pagelet[@name='Product']">
, in the way you say, I do not see the pagelet but
the public folders page

xiska


well I have tested it as well.
If you have a pagelet in this case in my personal folder I can see the following:
seachpath: "CAMID("default:u:authid=4093036114")/folder[@name='Eigene Ordner']/pagelet[@name='Permission Simulation']".
ID: iCEE9353B8F1648FBA3A29C25BD7D7E40
standard url: http://myone:80/cognos8/cgi-bin/mod2_cognos.dll?b_action=dashboard&pathinfo=/cm&frag-header=true&path=storeID(%22iCEE9353B8F1648FBA3A29C25BD7D7E40%22)
The pagelet contans an extended application.

Having the pagelet added as a permanent tab and copying the target url from the link it shows:
http://myone/cognos8/cgi-bin/mod2_cognos.dll?b_action=xts.run&m=portal/cc.xts&m_tab=iCEE9353B8F1648FBA3A29C25BD7D7E40
Using the url to a user which does not have access simply it shows a warning.

using the same url and my user with a logon like that
http://myserver/cognos8/cgi-bin/mod2_cognos.dll?b_action=xts.run&m=portal/cc.xts&m_tab=iCEE9353B8F1648FBA3A29C25BD7D7E40&CAMUsername=username&CAMPassword=password&h_CAM_action=logonAs&CAMNamespace=namespace
it jumps out with a "Exception Exception: CM-REQ-4342 An error occurred with the client. AxisFault faultCode: Client faultSubcode: faultString: CM-REQ-4342 An error occurred with the client. faultActor: faultNode: faultDetail: {http://developer.cognos.com/schemas/bibus/3/}exception: ..."
But this is a sdk error.

Using the url without the login works fine.
I do think that you are right using the m_page and the main.xts.

I am still not sure about the following points:
Dou you have a extended application or a report inside the pagelet.
Do you call these url's from outside or are you already logged in?
Does the url work if you concat them by yourself?
If nothing works: Can you set up a sample and export them?

Fulvio

Hi,

the configuration of my server Cognos allows anonymous access, I do not login.
I have a extended application and when call, url i'm not yet execute Cognos.
The pagelet works if i copy its url into the browser

I've attached a sample (sample.zip) of two zip files.

The first zip file (asp.zip) contains the following script:

Index.html----->Index.asp (Header)
     ----->Blank.htm (Body)
Voci.js
Menu.js
Fatturatocategoria.asp
Fatturatoclientye.asp

Index.html is a frameset containing index.asp (header that contains the menu javascript) and blank.htm (body that contains the menu items calling a report or a pagelet).
Voci.js and Menu.js running the javascript menu content in index.asp.
Fatturatocategoria.asp  draws a single report and Fatturatocliente.asp that draws the pagelet containing 4 report.

Reports of pagelet are in xml format in the second zip (report.zip)

For the single report if you want, you can copy a report of the pagelet

Thank you

xiska

Hello

Today I can only take a small look inside.
You putted some work inside.
File: fatturatocategoria.asp i alwas use action="/cognos8/cgi-bin/cognos.cgi" instead of action="../../../cgi-bin/cognos.cgi" but thats not the point.

An extended application should be registered in the webapps\samples\cps4\application.xml but it is not essentially requiered - it is more like a helper.
These apps are running within the application server context on the report server (not on the dispatcher or the content manager).
If you configure them in the default way the files reside in c8\webapps\samples\cps4

If this is in the case you need to know that a direct call to fatturatocategoria.asp might work.
I had tried to use a frameset to put more than one admin tab inside but it doesnt work. There is an extra parameter inside of exteded applications usually "cognos_product=http://myserver:9300/p2pd/servlet/dispatch" the file inside the frameset does not know about. That caues no servlet context for the interpretion of the asp file on the server side.
If it works with the standalone there are some parameter missing.
I know how it works at jsp/jsf to print out all parameter - but not with asp.

Fulvio

Hi

How do I register the application under webapps\samples\cps4\application.xml ?
My application is currently under webcontent\samples\sdk\asp; is it wrong ?

I must add the following parameter in your opinion ?

<input type="hidden" name="cognos_product" value="http://myserver:9300/p2pd/servlet/dispatch">

xiska

Hi,

The easiest way is to look into c8\webapps\samples\cps4\applications.xml and look for basicnav.jsp inside the xml-file and for the file itself.
If the application is filled in like the basicnav you can select it in the web.
These Applications are build to enhance the functions of the portal using java sdk code within a page.
Attached you will find some pictures ... just a few works.
- a permission simulation: what can an other use and why (the other tabs are also jsp files)
- a user administration frontend
- a tree inside and outside the portaltab and in the background inside

Back to your case-
I think that's not the problem - the sides in your case are simply html code.
Why not: If you make a cognos content store query without the right conext it will show up like : AxisFault faultCode: Client faultSubcode: faultString: CM-REQ-4342 An error occurred with the client. faultActor: faultNode: faultDetail: {http://developer.cognos.com/schemas/bibus/3/}exception: error cmNoSelection CM-REQ-4029 ... and not with your assembler message.
Having a ectended application like the basicnav.jsp requieres the servlet context. That's for sure.

But HTML - to be more precise a url - sould do also from outside, may be with an logon in between.
According to the documentation i did not found an error.
I did not found enough time to test it yet.