I have an extjs application that sends a parameter to an application setting with a slash... for eg "Tiger/Cheetah", to print a report... my ssrs report also takes that parameter fine... but when going through a web browser the passed parameter does not take "Tiger/Cheetah" with the slash... it takes "Tiger" but there are no records for that in the report...
I tried to replace / with %2f like this
Tiger%2fCheetah
and it's not working...
is there any other way?
Well this is easy
encodeURIComponent('Tiger/Cheetah')
and the other side must do vice verse
decodeURIComponent('Tiger%2fCheetah')
Have you tried escaping the slash with another slash? Try passing
Tiger//Cheetah
If you were using BIDS (VB), you could call REPLACE() to do this for you. I use this when passing parameter containing slashes or backslashes.
REPLACE(VariableName,"/","/")
try replace(Fields!SomeName.Value,"\","\"). It worked when i have record set having black slash value to be passed to a javascript URL
Peter J
Related
I'm trying to access a SSPRS report that has the option to select the year and the month by adding the parameters in the URL as ¶m=value but I always get the default.
This are the parameters and I know I'm sending the correct values in the URL.
This is the report panel where I can select the Year and Month, I'm trying to get the specific report that I need by passing those parameters in the URL.
What could I be doing wrong?
Thank you everyone.
There are a couple of ways these go wrong, I'm guessing your problem is URL encoding of your date parameter, but I'll give you other stuff too. Here is a working URL with 3 parameters: a date, a string, and an integer.
https://db01.MyCompany.com/ReportServer_Prod?/Reports/R440_OutstandingRecp¶mDateEnd=12%2f31%2f2015¶mPropLiab=Property¶mRepPeriod=1
The key parts of this URL:
"https://db01.MyCompany.com/ReportServer_Prod?/" - db01.MyCompany.com is our database VM, and I'm using the "Prod" (production) instance of SQL on it.
NOTE: Check your Reporting Services Configuration application and look at the "Web Service URL" to get what "ReportServer_Prod" is on your installation.
"?/Reports/" is the path to the virtual directory, note that this is different from the path a browser would normally use. Normally my path would be "ReportServer_Prod/Pages/Report.aspx?ItemPath=%2fReports%2fR440_OutstandingRecp" if I was just viewing this from the Reporting Services interface.
Parameters are separated by "&" and it's "ParamName" "=" "ParamValue" so "¶mPropLiab=Property¶mRepPeriod=1" are the string and integer parameters respectively.
Lastly, parameter values are URL encoded if necessary. Mostly it doesn't show up, but for dates and some strings, it becomes necessary. We can't send something like "12/31/2015" because it looks like part of the path, we need a URL encoded string like "12%2f31%2f2015"
Hopefully one (or more) of these were what you needed, reply in the comments if it's still not working or if you need more explanation of why the parts are what they are.
EDIT: One more thing, if a parameter has a "Display" and a "Value" (i.e. in a drop down list) you must pass the value, not the display.
EDIT: I can't make the comment stop hiding my URL, so I'll put it here
WHAT WAS TRIED
https://slo2000/Reports_TECOVA?/Reports/TEXO%20CVA%20Reports%2fTEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
https://slo2000/Reports_TECOVA?/Reports/TEXO%20CVA%20Reports/TEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
https://slo2000/ReportServer_TECOVA?/Reports/TEXO+CVA+Reports/TEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
WHAT WORKS (From #Nacho in comments, brought here for visibility)
http://slo2000/ReportServer_TECOVA/Pages/ReportViewer.aspx?%2TEXO+CVA+Reports%2fTEXO_London_B_CVA_Report&rs:Command=Render&ReportMonth=January&ReportYear=2020
In my angular application, I need to make GET call to a Tomcat server. This GET call requires query parameters which could contain special characters too like "+", "/", "/+"
GET call is being made from angular controller using $window.open with target as "_blank"
Currently the redirection is getting failed without any encoding.
So, I added encoding in .js file before the GET call is being made by using encodeURIComponent.
Then I added decoding logic using URLDecode.decode in backend java code to decode query parameters.
But still it doesn't work.
It works only if I encode query parameters twice within the .js file using encodeURIComponent twice.
I am trying to find the root cause for double encoding but no luck yet. I would greatly appreciate if anyone could share any inputs.
Made it work by adding a * in path parameter in app.js. Adding a star means that the request will include multiple path parameters separated by /, and so angular will not try to encode / in the request.
Double encoding could also work but then the server side logic has to be modified to decode the request parameters twice and replace %2B2F by %2F
in Silverlight 5:
var uri= new Uri("http://www.last.fm/api/auth/?api_key=xyz&cb=http://localhost:19000/callback?bla=blu")
HtmlPage.Window.Navigate(uri);
lands my browser at:
http://www.last.fm/api/auth?api_key=xyz&cb=http://localhost:19000/callback%253Fbla=blu
Note how the "?" of the URL in the callback parameter gets escaped to %253F - even though, if I look at uri.ToString() in the debugger, it's not escaped.
How can I prevent that from happening?
Many thanks,
Max
I got no answer, but if anyone stumbles across the same issue, here's what I tried and what I finally did:
First, I attempted to use HtmlPage.Window.Eval() to execute javascript which would navigate to that URL. Again, the ? was escaped even though URL.ToString() didn't escape it.
So what I finally did - could have thought of it earlier, really ;P - was to change my callback handler to follow a REST like format. Instead of:
http://localhost:19000/callback?bla=blu
it now listens at:
http://localhost:19000/callback/bla=blu
and takes the parameter value out of the path. No question mark involved anymore, problem solved.
Hi I have this sentence
$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity');
Is it possible to call the "redirect" method and passing parameters via $_GET ? so in the page "newactivity" I can ask for $_GET['something'] ?
Something like this
$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity?id=1'); (this doesn't work)
or
$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity','id=1');
Thanks
What you need is to properly build destination URL.
http://agiletoolkit.org/learn/understand/page/link
->univ()->redirect($this->api->getDestinationURL('newactivity',array('id'=>1)));
using stickyGET will affect ALL the urls you are going to produce form this point on. So if you add 2 links, each of them would be passing ID.
stickyGET is better if you need to pass argument which was already passed through GET, such as
array('id'=>$_GET['id']);
Here is a place where other ATK4 Developers chat too, perhaps another resource for your ATK4 Q's. https://chat.stackoverflow.com/rooms/2966/agile-toolkit-atk4
Hi I got this really irritating problem and I'd like to know if there is some way around it.
The thing is, the secondary tiles I am creating have an URI with a parameter being a path (with backslashes). However, whenever I try to query the active tiles, the path parameter has all its backslashes converted into forward slashes...
Is there another way around this than just replacing all my back slashes by forward slashes?
Thanks!
Can we see your code? Im guessing something is being escaped incorrectly but without an example its hard to tell.