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

How to pass multiselect parameter in URL

Started by Kindness, 24 Mar 2011 12:00:48 PM

Previous topic - Next topic

Kindness

I want to use iframe to display target report in the source report. The target report depends on prompt in the source report. when i select single value in prompt then the target report is shown correctly. but when i select more than one value then target report in the frame is failed.
Does anyone know how to correctly pass value of multiselect prompt in URL in iframe?

Thanks!


Kindness

Thank you, Peter B, for your reply.

I have to create a report, it should look like this:
-----------------------------------------------------------------------------------------
|                                           head                                                    |
-----------------------------------------------------------------------------------------
|  Prompt 1  |       |  placeholder |                           |  placeholder |        |
|                |                                                                                    |
|                |       |  placeholder |                           |  placeholder |        |
|                |                                                                                    |
|  Prompt 2  |       |  placeholder |                           |  placeholder |        |
|                |                                                                                    |
|                |       |  placeholder |                           |  placeholder |        |
|                |           ...........                                       .........              |
-----------------------------------------------------------------------------------------

In placeholders i have to insert some small chart and tables. Small chart and tables are created in separated reports. i am tryed to use portlets, but i have problem with passing prompts to target reports.
I decided to use iframe. and iframe warks except one thing. when i pass single value (&p_DateParameter=[Dimensional Layer].[Time].[Main Hierarchy].[Month]->[all].[2010].[2010-09-01 00:00:00.000]) it works, but when i pass multipl value (&p_DateParameter=[Dimensional Layer].[Time].[Main Hierarchy].[Month]->[all].[2010].[2010-09-01 00:00:00.000], [Dimensional Layer].[Time].[Main Hierarchy].[Month]->[all].[2010].[2010-10-01 00:00:00.000]
) it doesn't work. i don't know why.

thanks

AussiePete2011

Hi there,

URL with Parameters 101

How to construct a parameterized URL
E.g.

http://server-name/Cognos8/cgi-bin/cognos.cgi
?b_action=xts.run&m=portal/launch.xts
&ui.tool=CognosViewer
&ui.object= /content/package[@name='GO Sales and Retailers']/folder[@name='New Reports']/report[@name='product revenue - prompt']
&ui.action=run
&p_Product name=Bear Edge
&p_Product name=Aloe Relief
&run.prompt=false

You will notice that in the above example you must define each parameter as a separate condition
In your example you have only defined one parameter and then added a comma as a separator.
Comma's are invalid in a URL unless they are part of a complete string.  Therefore what you are trying to pass to your first parameter is
[Dimensional Layer].[Time].[Main Hierarchy].[Month]->[all].[2010].[2010-09-01 00:00:00.000], [Dimensional Layer].[Time].[Main Hierarchy].[Month]->[all].[2010].[2010-10-01 00:00:00.000]
Where as if you have two parameters then you should be passing them as
&p_DateParameter1=[Dimensional Layer].[Time].[Main Hierarchy].[Month]->[all].[2010].[2010-09-01 00:00:00.000]
&p_DateParameter2=[Dimensional Layer].[Time].[Main Hierarchy].[Month]->[all].[2010].[2010-10-01 00:00:00.000]

Hope this helps
Cheers
Peter B

Kindness

Thanks , Peter B,  for useful hints.

But i have multi-select prompt. it can have more than 2 value selected.

Lynn

There are many examples in the documentation for multi-select prompts and Peter's example also includes one:

Quote from: AussiePete2011 on 27 Mar 2011 04:03:23 PM
&p_Product name=Bear Edge
&p_Product name=Aloe Relief

You just repeat the parameter name with the "p_" prefix for as many values as needed.