SSRS ReportViewer URL in CRM Ribbon - reporting-services

I've added a button to print a SSRS report to one of my CRM ribbons. The only issue is that every time it calls the URL the path is removed from the url parameters. For example the URL I have in the XML is:
<CommandDefinition Id="Company.Form.quote.MainTab.Actions.PrintQuote.Command">
<EnableRules />
<DisplayRules />
<Actions>
<Url Address="http://<Server>/ReportServer/Pages/ReportViewer.aspx?/Test/ReportName">
<CrmParameter Name="QuoteId" Value="FirstPrimaryItemId" />
<StringParameter Value="Render" Name="rs:Command" />
<StringParameter Name="rs:Format" Value="PDF" />
</Url>
</Actions>
</CommandDefinition>
And the URL it navigates to is:
http://<server>/ReportServer?QuoteId=%7bE6D8DC8B-6381-E411-80BC-00155D18D500%7d&rs%3aCommand=Render&rs%3aFormat=PDF
It seems that I need a name for the ItemPath, but ReportServer doesn't accept one I know of, is there a way around this?
Any help is appreciated.

Found a workaround,
I did the same thing, just instead of putting the URL in the CommandDefinition I used javascript to redirect.

Related

How can I use an appSetting parameter (located in web.config) in my .master template

appSetting parameters
I have a value within app settings that I would like to use in my master page file but I think I am using the wrong syntax. Please bear with me because I am very new to Umbraco
My Web.config code is
<appSettings>
<add key="myKey" value="7829e" />
</appSettings>
The code within my master page is
<umbraco:Macro runat="server" language="cshtml">
#AppSetting.myKey
</umbraco:Macro>
It's not Umbraco related at all, you should be able to do
ConfigurationManager.AppSettings["key"]
Just like you would in standard ASP.NET.

how to pass a URL as a parameter in web.config in ASP.net

I am trying to pass a URL from the web.config file to .ASPX file
I have tried creating a add key property in the web.config file
and used that key in the .aspx page, but it does not take the URL.
<add key="ManageToken" value="http://www.w3schools.com/html/"/>
<tr>
<td align="right"><font color="blue"> Manage Token</font>|
Any ideas.
Thanks!
You have to put the expression in a code render block:
<a href="<%= System.Configuration.ConfigurationManager.AppSettings("ManageToken") %>">
I was able to find the issue. I had to use the System Configuration namespace to use the URL parameter.
Mark, Thanks for all the input.

POST verb not allowed

A bit basic, but I have tried some of the methods to tackle the following error but could not get the right solution.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<form method="post">
<input type="text" name="query1"></input>
<input type="text" name="query2"></input>
<input type="submit"></input>
</form>
</body>
</html>
Error on running :
HTTP Error 405.0 - Method Not Allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
In the mappings of IIS, I have added the POST method but that did not work!
Suggestions please!
The following code has solved the problem for me(it's for php on iis).
web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read, Execute, Script">
<remove name="PHP55_via_FastCGI" />
<add name="PHP55_via_FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe" resourceType="Either" requireAccess="Script" />
<add name="HTML_via_FastCGI" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe" resourceType="Either" requireAccess="Script" />
<add name="HTM_via_FastCGI" path="*.htm" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.5\php-cgi.exe" resourceType="Either" requireAccess="Script" />
</handlers>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".php" allowed="true" />
</fileExtensions>
<verbs>
<add verb="POST" allowed="true" />
<add verb="GET" allowed="true" />
<add verb="HEAD" allowed="true" />
<add verb="DELETE" allowed="true" />
<add verb="PUT" allowed="true" />
</verbs>
</requestFiltering>
</security>
</system.webServer>
Without seeing more, this could be a variety of problems. With that in mind, here is a list of possible fixes for your issue:
Cause 1
This problem occurs because the client makes an HTTP request by using
an HTTP method that does not comply with the HTTP specifications.
To resolve this problem, see resolution 1.
Cause 2
This problem occurs because a client makes an HTTP request by sending
the POST method to a page that is configured to be handled by the
StaticFile handler. For example, a client sends the POST method to a
static HTML page. However, pages that are configured for the
StaticFile handler do not support the POST method.
To resolve this problem, see resolution 2.
Resolution 1
Make sure that the client sends a request that contains a valid HTTP
method. To do this, follow these steps:
Click Start, type Notepad in
the Start Search box, right-click Notepad, and then click Run as
administrator.
Note If you are prompted for an administrator password or for a
confirmation, type the password, or provide confirmation. On the File
menu, click Open. In the File name box, type
%windir%\system32\inetsrv\config\applicationhost.config, and then
click Open.
In the ApplicationHost.config file, locate the
tag.
Make sure that all the handlers use valid HTTP methods.
Save the ApplicationHost.config file.
Resolution 2
Send the POST request to a page that is configured to be handled by a
handler other than the StaticFile handler (for example, the ASPClassic
handler). Or, change the request that is being handled by the
StaticFile handler so that it is a GET request instead of a POST
request.
MSDN Source
In my opinion you have 2 errors:
1) If your file extension is *.html change it to for example *.asp, *.php and it will work.
2)The input tag doesn't have closing tag.

chrome omnibox how to add the search on domain

How one configure his web site to let users search only on his domain using omnibox?
Example:
type youtube.com then press tab
or type yahoo.com then press
trying with vimeo wouldn't work
I didn't find anyhing in the source code.
Yes it's possible.
I did this for my blog.
<link rel="search" type="application/opensearchdescription+xml" title="The Sheng Blog" href="/resources/opensearch.php"/>
opensearch.php looks likes this:
<?xml version="1.0"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>The Sheng Blog (Beta)</ShortName>
<Description>The Sheng Blog Search</Description>
<Developer>Sheng Slogar</Developer>
<LongName>Search the entire Sheng Blog</LongName>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
<Query role="example" searchTerms="code"/>
<SyndicationRight>open</SyndicationRight>
<AdultContent>false</AdultContent>
<Language>en-us</Language>
<Contact>contact#theshengblogg.comule.com</Contact>
<Tags>code posts tutorials ideas playground</Tags>
<Image width="16" height="16" type="image/x-icon">data:/ico;base64,AAABA...(Icon in base64)</Image>
<Url type="text/html" template="http://theshengblogg.comule.com/search.php?s={searchTerms}"></Url>
<Url type="application/x-suggestions+json" method="GET" template="http://theshengblogg.comule.com/autocomplete.php?search={searchTerms}&json=true"/>
</OpenSearchDescription>
I learned this from http://www.opensearch.org/Specifications/OpenSearch/1.1. The autocomplete part is optional. Return it in JSON format.
For example, if you search "a", return ["a","about","across","all","and"]. (Notice I put your query in the array as item 0.)
My autocomplete only seems to work in Firefox. This might be something with my sub domain.
I also couldn't get it to work in IE or Chrome.
http://dev.chromium.org/tab-to-search has the information on how to do it, potentially you could use a chrome addon to force the page to have the needed code for this to function, but I'm not sure how well such would work.

Facebook share URL with get parameters

I'm trying to generate a share URL with get parameters and it's doing some double encoding shenanigans.
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.bing.com%2Fsearch%3Fq%3Dkeyword" />
produces an error url while
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.bing.com" />
is fine. Anyone have ideas?
Facebook share link needed to be cached on their side. This has since be resolved on facebooks end.