Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>Here is a sample it is working for me</p> <p>Web config ...</p> </blockquote> <pre><code>&lt;!-- Reporting --&gt; &lt;add key="ReportingUserName" value="xxxxx\xxxx" /&gt; &lt;add key="ReportingPassword" value="xxxxxxxxx" /&gt; &lt;add key="ReportingDomain" value="xxxxxxx" /&gt; &lt;endpoint address="http://xxxxxx/ReportServer/ReportExecution2005.asmx" binding="basicHttpBinding" bindingConfiguration="basicHttpBindingConfig" contract="SSRS.ReportExecutionServiceSoap" name="ReportExecutionServiceSoap" /&gt; &lt;!-- Binding for Reporting Services over HTTP --&gt; &lt;binding name="basicHttpBindingConfig" allowCookies="true" maxReceivedMessageSize="52428800" sendTimeout="00:10:00"&gt; &lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt; &lt;/security&gt; &lt;/binding&gt; </code></pre> <blockquote> <p>outputType ReportFormat i.e, Pdf,Image,Excel,Ffd </p> <p>deviceInfo contains the XML string for reporting services based on the ReportFormat</p> <p>reportPath contains report path on SSRS server "/xxx/datarecord-Table"</p> </blockquote> <pre><code> private SsrsResponse ExecuteSsrsReport(string reportPath, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt; parameters, string outputType, string deviceInfo) { using (var rs = new ReportExecutionServiceSoapClient()) { if (rs.ClientCredentials != null) { rs.ClientCredentials.Windows.ClientCredential = GetReportingCredentials(); rs.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; } byte[] result; Warning[] warnings; string[] streamIds; ParameterValue[] parameterValues = parameters.Select(p =&gt; new ParameterValue { Name = p.Key, Value = p.Value }).ToArray(); ExecutionInfo execInfo; ServerInfoHeader serverInfoHeader; ExecutionHeader execHeader = rs.LoadReport(null, reportPath, null, out serverInfoHeader, out execInfo); rs.SetExecutionParameters(execHeader, null, parameterValues, "en-us", out execInfo); string extension, mimeType, encoding; rs.Render(execHeader, null, outputType, deviceInfo, out result, out extension, out mimeType, out encoding, out warnings, out streamIds); return new SsrsResponse(result, extension, mimeType, encoding); } } private NetworkCredential GetReportingCredentials() { return new NetworkCredential( ConfigurationManager.AppSettings["ReportingUserName"], ConfigurationManager.AppSettings["ReportingPassword"], ConfigurationManager.AppSettings["ReportingDomain"] ); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload