Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Ao fazer a chamada do relatório ocorre o erro:a abaixo:
System.Web.Services.Protocols.SoapException: The operation you are attempting on item "/Report_ProspCBancario/Report_prospCB" is not allowed for this item type. ---> Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The operation you are attempting on item "/Report_ProspCBancario/Report_prospCB" is not allowed for this item type. ---> Microsoft.ReportingServices.Diagnostics.Utilities.WrongItemTypeException: The operation you are attempting on item "/Report_ProspCBancario/Report_prospCB" is not allowed for this item type. at Microsoft.ReportingServices.Library.RSService.EnsureItemType(ItemType actualType, ItemType expectedType1, ItemType expectedType2, String path) at Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromC
atalog(CatalogItemContext reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32& executionOption, String& savedParametersXml, ReportSnapshot& compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime& historyOrSnapshotDate, Byte[]& secDesc) at Microsoft.ReportingServices.Library.RSService._GetReportParameters(ClientRequest
session, String report, String historyID, Boolean forRendering, NameValueCollection values, DatasourceCredentialsCollection credentials) at Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItem
Context reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters) at Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames) at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute() at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper() --- End of inner exception stack trace --- at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper() at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSServ
ice rs, CatalogItemContext reportContext, ClientRequest session, JobType type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames) at Microsoft.ReportingServices.WebServer.ReportingService.Render(String Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle, Byte[]& Result, String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed, Warning[]& Warnings, String[]& StreamIds) --- End of inner exception stack trace --- at Microsoft.ReportingServices.WebServer.ReportingService.Render(String Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle, Byte[]& Result, String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed, Warning[]& Warnings, String[]& StreamIds)
abaixo a chamada da aplicação:
private void Page_Load(object sender, System.EventArgs e)
{
string Seql_Prosp;
Seql_Prosp = Session["Seql_Prospect"].ToString();
if (Seql_Prosp == string.Empty)
{
Response.Write ("Não foi possivel gerar o relatório.!");
}
else
{
ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();
cepheus.ReportingService rs = new cepheus.ReportingService();
string xml = BaseXML.Documento.GetElementsByTagName("reporting_services")[0].InnerXml;
string webservice_path = xml.Substring(xml.IndexOf("<webservice_path>"),(xml.LastIndexOf("</webservice_path>") - xml.LastIndexOf("<webservice_path>"))).Replace("<webservice_path>","").Replace("</webservice_path>","");
rs.Url = webservice_path ;
string encoding = "",mimetype = "";
cepheus.ParameterValue[] parametersvaluesused = new cepheus.ParameterValue[0];
cepheus.Warning[] warnings = new cepheus.Warning[0];
string[] streamids = new string[0];
cepheus.ParameterValue str = new cepheus.ParameterValue();
str.Name = "Seql_Prosp";
str.Value = Seql_Prosp;
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
string dados = BaseXML.Documento.GetElementsByTagName("reporting_services")[0].InnerXml;
string user = dados.Substring(dados.IndexOf("<user>"),(dados.LastIndexOf("</user>") - dados.LastIndexOf("<user>"))).Replace("<user>","").Replace("</user>","");
string pass = dados.Substring(dados.IndexOf("<pass>"),(dados.LastIndexOf("</pass>") - dados.LastIndexOf("<pass>"))).Replace("<pass>","").Replace("</pass>","");
rs.Credentials = new System.Net.NetworkCredential(user, pass);
cepheus.DataSourceCredentials cred = new cepheus.DataSourceCredentials();
cred.DataSourceName = "CE_Corporativo"; //Nome do Data Source criado acima com o mesmo nome que estiver no report manager
cred.Password = BaseXML.PegaBanco("corporativo").Senha;
cred.UserName = BaseXML.PegaBanco("corporativo").Usuario;
byte[] result;
try
{
result = rs.Render(@"/Report_ProspCBancario/Report_prospCB","PDF",null,null,new cepheus.ParameterValue[]{str}, new cepheus.DataSourceCredentials[]{cred},"",out encoding,out mimetype, out parametersvaluesused,out warnings, out streamids);
}
catch(Exception ex)
{
throw new Exception(ex.Message);
}
for(int i = 0;i <result.Length;i++ )
{
Response.OutputStream.WriteByte(result*);*
}
}
}
Desculpe, mas não ajudou...teria alguma idéia? este relatório funciona em um servidor de teste, mas dá este erro em outro servidor já fi\ várias comparações de ambiente não não consigo encontrar a solução.
Camarada,
Não tenho experiência com Reporting Services mas se roda em um ambiente e não roda em outro só pode msm ser problema de configuração.
Todos os usuários estão com as permissões corretas de gravação, exlcusão e alteração?
Não existe problema com firewall? Não estou afirmando mas as vezes se o firewaal não esta configurado legal pode aconter erros.
Os dois servidores estão na mesm rede?
Estão com a mesma versão dos softwares usados?
Pela msg de erro:
System.Web.Services.Protocols.SoapException: The operation you are attempting on item "/Report_ProspCBancario/Report_prospCB" is not allowed for this item type. --->
is not allowed me parece porblemas de permissão e usuários msm.
t+
Você está com algum problema no protocolo SOAP, proveniente de alguma configuração. Qual o Web Server que você está utilizando?
Ola.
de uma ohada nestes links:
http://msdn2.microsoft.com/en-us/library/s...ion(VS.71).aspx.aspx)
http://www.theserverside.net/discussions/t...thread_id=38387
Pode lhe ajudar.
Abs