NullReference

Stimulsoft Reports.WEB discussion
Post Reply
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

NullReference

Post by romulocpd »

Hello.

My reports stopped to work.

On code:

Code: Select all

public ActionResult DadosExibicaoRelatorio()
        {
            StiReport S = new Stimulsoft.Report.StiReport();

            string Arquivo = Server.MapPath("~/Content/Reports/" + Session["AreaMRT"].ToString() + "/" + Session["ArquivoMRT"].ToString());
            
            if (System.IO.File.Exists(Arquivo))
            {
                S.Load(Arquivo);  // HERE
                S.Compile();
            }
At S.Load an exception occours.

Code: Select all

System.NullReferenceException was unhandled by user code
  HResult=-2147467261
  Message=Referência de objeto não definida para uma instância de um objeto.
  Source=Stimulsoft.Report
  StackTrace:
       em Stimulsoft.Report.Dictionary.StiBusinessObjectsCollection.OnInsert(Int32 index, Object value)
       em System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
       em Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
       em Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
       em Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application)
       em Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream)
       em Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream)
       em Stimulsoft.Report.StiReport.Load(Stream stream)
       em Stimulsoft.Report.StiReport.Load(String path)
       em GPWeb.Areas.Sistema.Controllers.RelatorioController.DadosExibicaoRelatorio() na c:\Users\primotech\Google Drive\Projetos\Fontes\GP\gp\gdweb\areas\sistema\Controllers\RelatorioController.cs:linha 208
       em lambda_method(Closure , ControllerBase , Object[] )
       em System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
       em System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
       em System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       em System.Web.Mvc.Async.AsyncControllerActionInvoker.ActionInvocation.InvokeSynchronousActionMethod()
       em System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
       em System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
       em System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
       em System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
       em System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
       em System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
       em System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
  InnerException: 
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: NullReference

Post by Jan »

Hello,

Something wrong with loading your report. I need to check your report file to say something more. Can you send it to support@stimulsoft.com for examination?
Please in Email add url to this topic.

Thank you.
romulocpd
Posts: 73
Joined: Thu Oct 17, 2013 10:39 pm
Location: Nova Friburgo, Rio de Janeiro, Brasil

Re: NullReference

Post by romulocpd »

So... I've removed all Stimulsoft dll's references and make reference again... the reports are working....
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: NullReference

Post by Jan »

Hello,

Thank you for letting know!
Post Reply