Page 1 of 1

Object reference not set to an instance of an object

Posted: Fri Sep 23, 2016 3:28 am
by velhonavio
Hi,

I try to put a StiWebDesigner inside a DIV but not in a whole page, i found a response said to put
"StiWebDesigner1.Report = myReport;" instead to use "StiWebDesigner1.Design( myReport );"
but this cause the following error :

[NullReferenceException: Object reference not set to an instance of an object.]
Stimulsoft.Report.Web.StiWebDesigner.RegisterClientScriptBlockIntoHeader(String key, String script) +292
Stimulsoft.Report.Web.StiWebDesigner.RegisterClientScripts() +176
Stimulsoft.Report.Web.StiWebDesigner.OnPreRender(EventArgs e) +82
System.Web.UI.Control.PreRenderRecursiveInternal() +88
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883

Any help is welcome, please
Regards
Arthur

Re: Object reference not set to an instance of an object

Posted: Fri Sep 23, 2016 9:21 am
by HighAley
Hello.

Please, try to set the Visible option with the next code:

Code: Select all

<div>
    <cc3:StiWebDesigner runat="server" ID="StiWebDesigner1" Width="1200px" Height="700px" Visible="true" >
    </cc3:StiWebDesigner>
</div>
Thank you.

Re: Object reference not set to an instance of an object

Posted: Fri Sep 23, 2016 4:50 pm
by velhonavio
Hi,

I found the problem, im my code a remove basic HTML tags <html>, <head> and <body> and start inmy page with <form> tag
In this case i think Report try to find one this tags to register something... and not found causing the error ( this could be treated more friendly in next versions ).

So, its my mistake.. The Report.Net is perfect....

Thank for the help
Best Regards
Arthur

Re: Object reference not set to an instance of an object

Posted: Mon Sep 26, 2016 9:41 am
by HighAley
Hello, Arthur.

Did you remove them from the Site.Master file or there were duplicated tags?
Anyway we are glad that you have solved the issue.
Let us know if you need our help.

Thank you.