Hi All,
I have looked at a number of posts on this topic, most are close to what I’m after but I can’t get the syntax right (I think).
I am trying to pass multiple prompts, which are all single values, to a linked report. this is working OK, except when I am trying to pass a value that is choosen from a list by the user, which has a space in it.
The course code list the user chooses from includes items like these (they only choose one):
OHS1111 - Fire safety and evacuation
OHS2222 - Manual Handling
OHS3333 = Safty measures
If they choose the first one the problem is that only ‘OHS1111’ is passed to the subreport, not the full item: ‘OHS1111 - Fire safety and evacuation’
The full OpenDocument code I am using is as follows:
‘<a href=http://Servername/businessobjects/enterprise115/Infoview/scripts/opendocument.aspx?sType=wid&iDocID=100556&sRefresh=Y&sWindow=New’+’&lsSSelect%20Mandatory%20Training%20Code(s)=’+@Select(Class\Mandatory Training Class Codes)+’&lsSSelect%20Award%20Category=’+@Select(Person\Award Group inc unspec)+’&lsSSelect%20Cost%20Centre(s)=’+@Select(Person\Cost Centre2)+’">’+@Select(Person\Cost Centre2)+’’
The part of the code above that is referring to the course code is here:
+’&lsSSelect%20Mandatory%20Training%20Code(s)=’+@Select(Class\Mandatory Training Class Codes)
I have tried using the URLEncode function, but can’t seem to get it right
Thanks in advance
Brendan
Thanks for the help. I tried the UserResponse() but still had trouble with the syntax.
In the end I created a new object which had the same courses listed, but without spaces. It was not ideal but it worked.
If anybody has advice on how to solve the problem with the spaces (e.g syntax suggestions) it would be greatly appreciated, as I’m sure it will come up again. Not to mention I’d love to see how it would look with an ‘ideal’ solution.
brendanmc,
in addition to UserResponse() have you tried to wrap urlencode() around it? The problem is that a space ( ) is not valid in a URL, however, urlencode will convert the space to hex 20 (%20), which is the hex of ASCII 32…
That Works! Thanks to all for all suggestions and help.
Here is the full working code:
'<a href=http://server/businessobjects/enterprise115/Infoview/scripts/opendocument.aspx?sType=wid&iDocID=102215&sRefresh=Y&sWindow=New'+'&lsSSelect%20Mandatory%20Training%20Code(s)='+replace(@Select(Class\Mandatory Training Class Codes),' ','%20')+'&lsSSelect%20Award%20Category='+@Select(Person\Award Group inc unspec)+'&lsSSelect%20Cost%20Centre(s)='+@Select(Person\Cost Centre2)+'">'+@Select(Person\Cost Centre2)+'</a>'
Here is the line in the opendocument code that needed to be changed:
+'&lsSSelect%20Mandatory%20Training%20Code(s)='+replace(@Select(Class\Mandatory Training Class Codes),' ','%20')
Hi,
I am facing the above issue,when ever I am clicking in opendocumented-column rather pass the parameter it is prompting me to pass the parameter again. I have tried most of all the option available but not able to figure out why it is prompting me again and again,please help me.
I used replace as well but no result,I read one more suggestion in the forum order of the prompt & the opendocument syntax everything looks OK to me. Please suggets. I am attaching a Prompt popup screen as an attachment.
Sorry it was copy paste error that’s why Report Type case twice. I am able to fix the issue,problem was lying in URL Encode I was missing URL Encode in this part: '&lsSPlease+Enter+a+Report+Type+:=
Thanks for your reply.
Replace can be used, only if you know the spl characters to handle. But sometimes we will not know what kind of spl character will get. So any dynamic functions will be good.
Thanks.
Check out your string Ex: “Please Enter” here is a space between Please and Enter sometimes URL encode will not properly to solve this we can use replace.
Also check the left & right hand side string for your opendocument variable… there shound’t be any space…
I think this is referring to your question, it is an example of creating a web page link that connects to a WEBI document, in this case the Document ID is used rather than the document name. It works fine on a test site we have.
<a href=http://servername/businessobjects/enterprise115/Infoview/scripts/opendocument.aspx?sType=wid&iDocID=101482&sRefresh=Y&sWindow=New>this text appears as the link name</a>
I think you’re on the right track with URLEncode although it can be bad for your health getting the syntax exactly correct
Andreas, in your case are you passing a hard coded value or an object? If it’s an object it should be something like URLEncode([Team%20Enso]). If it’s hardcoded it should be something like URLEncode(“Team%20Enso”). From my experience you simply cannot have spaces anywhere in the URL string.
A) The Problem is NOT with the openDocument syntax, I got that one correct
B) I am trying to pass the value “Team EnSO”, which does include a blank/space to the openDocument function (the Webi document has a prompt). As “Team EnSO” contains a space I do need to wrap it with URLencode, which should transform “Team EnSO” into “Team%20EnSo”.
Of course this could be any value, for example “What Do I know which team value will be passed”…