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

 

& in parameter value when passing the parameter through URL

Started by stancho, 01 Jul 2015 04:23:17 AM

Previous topic - Next topic

stancho

Hi all,

I'm invoking my report skipping the prompt page and passing some parameters through URL.
One of my dimensions which needs to be filtered by parameter in the URL contains a value which includes & in it.
Ex. 'A&B'.

How can I pass this value in the url?
I tried the following:
p_MyParam=<selectChoices><selectOption>useValue='A&B'/></selectChoices>
p_MyParam=<selectChoices><selectOption>useValue="A&B"/></selectChoices>
p_MyParam=<selectChoices><selectOption>useValue=A&B/></selectChoices>
p_MyParam=<selectChoices><selectOption>useValue='A%26B'/></selectChoices>
p_MyParam=<selectChoices><selectOption>useValue="A%26B"/></selectChoices>
p_MyParam=<selectChoices><selectOption>useValue=A%26B/></selectChoices>

but all of these seems to make the report skipping this filter.

Any ideas?

Thanks,
Stancho

bdbits

I think you are saying you want to pass the value of the parameter in the URL? Parameters in the URL are usually just name/value pairs, though you do have to escape 'special' characters like the ampersand.

This should suffice: p_MyParam=A%26B

stancho

Hi bdbits,

thanks for your reply!

That could be ok, but the this filter is required to be multi-select. So several values should be able to be passed.

bdbits

You just repeat the parameter name with more values, e.g. &p_MyParam=firstvalue&p_MyParam=secondvalue&p_MyParam=thirdvalue

Here is an older post on the topic which still works in current versions, and there is information in the product documentation (particularly SDK).

http://www.cognoise.com/index.php?topic=13670.0

stancho

bdbits,
it's working using this syntax.

Thanks a lot!

bdbits