Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Failed to generate report in server side
posted

Hi

sorry for my bad english ...

I have a few days working with version 2011.2 reports, these reports are generated with data I get from a webservice. for this I have a method that returns a DataTable via an IEnumerable generated the report (is rendered on the server side).
the code I use to generate the report is as follows:
  and the error I get is:
"Can not Establish Connection with report server" and the error in detail is:

"Infragistics.Controls.Reports.ReportServerException: Cannot establish a connection with the report server. ---> System.ServiceModel.ProtocolException: Content Type application/soap+msbin1 was not supported by service http://localhost:1517/ReportService1.svc.  The client and service bindings may be mismatched. ---> System.Net.WebException: The remote server returned an error: (415) Unsupported Media Type.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
   --- End of inner exception stack trace ---

Server stack trace:
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeEndService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Infragistics.Controls.Reports.ReportProcessorService.IReportProcessorService.EndGetParametersValues(IAsyncResult result)
   at Infragistics.Controls.Reports.ReportProcessorService.ReportProcessorServiceClient.OnEndGetParametersValues(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
   --- End of inner exception stack trace ---".


the IEnumerable I use to generate the report is as follows :

        public IEnumerable<Reporte2> getReporte2()
        {
            DataTable ds_resultado = new DataTable();
            string Fdesde = "08/02/2012";
            string Fhasta = "10/16/2012";
            ds_resultado = ws_foxpro.VerBitacora(Fdesde, Fhasta);
            //VerBitacora(Fdesde, Fhasta);
            List<Reporte2> rep = new List<Reporte2>();
            foreach (DataRow row in ds_resultado.Rows)
            {
                rep.Add(new Reporte2()
                {
                    supervisor = row["SUPER"].ToString(),
                    cod_cajero = row["CAJERO"].ToString(),
                    tipo_mov = row["TIP_MOV"].ToString(),
                    fecha = DateTime.Parse(row["FECHA"].ToString()),
                    nombre = row["desc"].ToString(),
                    hora = row["HORA"].ToString(),
                    mtoefeso = double.Parse(row["MTO_EFE"].ToString()),
                    desde = Fdesde,
                    hasta = Fhasta,
                    numReg = ds_resultado.Rows.Count,
                    fechaact = DateTime.Parse(row["fechaact"].ToString())

                });

            }
            return rep;
        }

Any Idea

;)

Parents
  • 3070
    posted

    Hi Hernán,

    There is a problem with the communication between the viewer and the report service. In order to diagnose what is going on can you attach the report viewer code and the web.config where the service is configured?

    Can you reproduce this problem outside your main solution? If you can, please attach a complete solution where the problem can be reproduced.

    Best,

    Leo

Reply Children