Object reference not set to an instance of an object

Stimulsoft Reports.WEB discussion
Post Reply
velhonavio
Posts: 2
Joined: Fri Sep 23, 2016 3:20 am

Object reference not set to an instance of an object

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post 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.
velhonavio
Posts: 2
Joined: Fri Sep 23, 2016 3:20 am

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

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post 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.
Post Reply