In SSRS 2000 SP2 the documentation for ReportingService.Render states that
the ParametersUsed output parameter should only be populated only if the
report being rendered is a report history snapshot. I'm invoking the Render
method with a null HistoryId as follows, so I would expect the ParametersUsed
output parameter not to get populated.
results = m_RptService.Render(m_RptCatalogItem.Path /*Report*/,
m_Format /*Format*/,
null /*HistoryID*/,
null /*DeviceInfo*/,
m_RptParameters /*Parameters*/,
null /*Credentials*/,
null /*ShowHideToggle*/,
out encoding /*Encoding*/,
out mimeType /*MimeType*/,
out historyParms /*ParametersUsed*/,
out warnings /*Warnings*/,
out streamIDs /*StreamIds*/);
The call generates the following HTTP traffic. As you can see the HistoryId
is not sent in the request yet ParametersUsed is populated in the result. If
I'm interpreting the documentation correctly this value should not be
populated in the response. I really don't what ParametersUsed to be
populated in the response. Is this the correct behavior?
POST /ReportServer/ReportService.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Render"
Content-Length: 524
Expect: 100-continue
Host: localhost
Cookie: sqlAuthCookie=****; UsrTkn=>****; AppTkn=>****
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><Render
xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><Report>/ReportServerStatistics/PTest</Report><Format>HTML4.0</Format><Parameters><ParameterValue><Name>p1</Name><Value>2/11/2007
7:32:50
PM</Value></ParameterValue></Parameters></Render></soap:Body></soap:Envelope>
HTTP/1.1 200 OK
Date: Mon, 12 Feb 2007 00:32:50 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 9021
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><ServerInfoHeader
xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><ReportServerVersionNumber>Microsoft
SQL Server Reporting Services Version
8.00.1038.00</ReportServerVersionNumber><ReportServerEdition>Enterprise</ReportServerEdition></ServerInfoHeader><SessionHeader
xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><SessionId>glbci3rl3utt1iqmon253t45</SessionId><IsNewExecution>true</IsNewExecution><ExecutionDateTime>2007-02-11T19:32:50</ExecutionDateTime><ExpirationDateTime>2007-02-11T19:32:50</ExpirationDateTime></SessionHeader></soap:Header><soap:Body><RenderResponse
xmlns="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><Result>
Base 64 Encoded response removed to shorten post
</Result><Encoding>Unicode
(UTF-8)</Encoding><MimeType>text/html</MimeType><ParametersUsed><ParameterValue><Name>p1</Name><Value>2/11/2007
7:32:50 PM</Value></ParameterValue></ParametersUsed><StreamIds
/></RenderResponse></soap:Body></soap:Envelope>Reporting Services 2005 exhibits the same behavior. The following
application produces the following output "Length: 3" indicating that the
ParametersUsed output parameter was populated even though no histryid was
provided. Is this the correct behavior? If so how do I turn it off?
According to the following documentation this does not seem like the correct
behavior (http://msdn2.microsoft.com/en-us/library/aa258532(SQL.80).aspx).
Notice that the description for ParametersUsed states that the output
parameter is only populated of a history snapshot is being rendered. This
causes fairly significant performance issues for me because in some cases I
am passing large parameters. Instead of these parameters just being in the
request, they are in both the request and the response causing the response
to be much larger than I desire.
using System;
using System.Collections.Generic;
using System.Text;
using ConsoleApplication9.rs;
namespace ConsoleApplication9
{
class Program
{
static void Main(string[] args)
{
string encoding, mimeType;
ParameterValue[] pout;
Warning[] w;
string[] s;
ReportingService rs = new ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
ParameterValue[] pin = new ParameterValue[3];
pin[0] = new ParameterValue();
pin[0].Name = "stdt";
pin[0].Value = "2/19/2007";
pin[1] = new ParameterValue();
pin[1].Name = "enddt";
pin[1].Value = "2/20/2007";
pin[2] = new ParameterValue();
pin[2].Name = "sopco";
pin[2].Value = "A";
rs.Render("/VRU Reports/VRUAppSuccessPercent" /*Report*/,
"PDF" /*Format*/,
null /*HistoryID*/,
null /*DeviceInfo*/,
pin /*Parameters*/,
null /*Credentials*/,
null /*ShowHideToggle*/,
out encoding /*Encoding*/,
out mimeType /*MimeType*/,
out pout /*ParametersUsed*/,
out w /*Warnings*/,
out s /*StreamIds*/);
Console.WriteLine("Length: " + pout.Length);
Console.ReadLine();
}
}
}
"Jerry" wrote:
> In SSRS 2000 SP2 the documentation for ReportingService.Render states that
> the ParametersUsed output parameter should only be populated only if the
> report being rendered is a report history snapshot. I'm invoking the Render
> method with a null HistoryId as follows, so I would expect the ParametersUsed
> output parameter not to get populated.
> results = m_RptService.Render(m_RptCatalogItem.Path /*Report*/,
> m_Format /*Format*/,
> null /*HistoryID*/,
> null /*DeviceInfo*/,
> m_RptParameters /*Parameters*/,
> null /*Credentials*/,
> null /*ShowHideToggle*/,
> out encoding /*Encoding*/,
> out mimeType /*MimeType*/,
> out historyParms /*ParametersUsed*/,
> out warnings /*Warnings*/,
> out streamIDs /*StreamIds*/);
> The call generates the following HTTP traffic. As you can see the HistoryId
> is not sent in the request yet ParametersUsed is populated in the result. If
> I'm interpreting the documentation correctly this value should not be
> populated in the response. I really don't what ParametersUsed to be
> populated in the response. Is this the correct behavior?
> POST /ReportServer/ReportService.asmx HTTP/1.1
> Content-Type: text/xml; charset=utf-8
> SOAPAction:
> "http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Render"
> Content-Length: 524
> Expect: 100-continue
> Host: localhost
> Cookie: sqlAuthCookie=****; UsrTkn=>****; AppTkn=>****
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="<soap:Body><Render">http://www.w3.org/2001/XMLSchema"><soap:Body><Render
> xmlns="<Report>/ReportServerStatistics/PTest</Report><Format>HTML4.0</Format><Parameters><ParameterValue><Name>p1</Name><Value>2/11/2007">http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><Report>/ReportServerStatistics/PTest</Report><Format>HTML4.0</Format><Parameters><ParameterValue><Name>p1</Name><Value>2/11/2007
> 7:32:50
> PM</Value></ParameterValue></Parameters></Render></soap:Body></soap:Envelope>
> HTTP/1.1 200 OK
> Date: Mon, 12 Feb 2007 00:32:50 GMT
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> X-AspNet-Version: 1.1.4322
> Cache-Control: private, max-age=0
> Content-Type: text/xml; charset=utf-8
> Content-Length: 9021
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="<soap:Header><ServerInfoHeader">http://www.w3.org/2001/XMLSchema"><soap:Header><ServerInfoHeader
> xmlns="<ReportServerVersionNumber>Microsoft">http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><ReportServerVersionNumber>Microsoft
> SQL Server Reporting Services Version
> 8.00.1038.00</ReportServerVersionNumber><ReportServerEdition>Enterprise</ReportServerEdition></ServerInfoHeader><SessionHeader
> xmlns="<SessionId>glbci3rl3utt1iqmon253t45</SessionId><IsNewExecution>true</IsNewExecution><ExecutionDateTime>2007-02-11T19:32:50</ExecutionDateTime><ExpirationDateTime>2007-02-11T19:32:50</ExpirationDateTime></SessionHeader></soap:Header><soap:Body><RenderResponse">http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><SessionId>glbci3rl3utt1iqmon253t45</SessionId><IsNewExecution>true</IsNewExecution><ExecutionDateTime>2007-02-11T19:32:50</ExecutionDateTime><ExpirationDateTime>2007-02-11T19:32:50</ExpirationDateTime></SessionHeader></soap:Header><soap:Body><RenderResponse
> xmlns="<Result>">http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices"><Result>
> Base 64 Encoded response removed to shorten post
> </Result><Encoding>Unicode
> (UTF-8)</Encoding><MimeType>text/html</MimeType><ParametersUsed><ParameterValue><Name>p1</Name><Value>2/11/2007
> 7:32:50 PM</Value></ParameterValue></ParametersUsed><StreamIds
> /></RenderResponse></soap:Body></soap:Envelope>
>
Tuesday, March 20, 2012
ParametersUsed Always Polulated after calling ReportingService.Ren
Labels:
calling,
database,
documentation,
microsoft,
mysql,
oracle,
output,
parameter,
parametersused,
polulated,
populated,
render,
reportingservice,
reportingserviceren,
server,
sp2,
sql,
ssrs,
states
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment