Report - Viewer - throwing exception

Stimulsoft Reports.NET discussion
Post Reply
HL
Posts: 1
Joined: Wed Jan 04, 2012 11:42 am

Report - Viewer - throwing exception

Post by HL »

I have implementet the following code (.NET 4) in a thread for viewing a StiReport:

public class MyStiReport : StiReport
{
....

private void RunStimulsoft(XMLWriter writer, string xml_filename)
{
try
{
DataSet dataSet1 = new DataSet();
dataSet1.ReadXml(xml_filename);
RegData(dataSet1);
Load(rapport_template_name);
Render(true);
Show(true);
}
catch (Exception e)
{

}
}
}


When calling RunStimulsoft in the code above the Stimulsoft 'Report - Viewer' shows the report as expected, but when I try to select 'Open' or 'Save'->'Document file...' from the report viewer top menu, an exception ("Object reference not set to an instance of an object.") is thrown and catched in the catch-branch in the RunStimulsoft method.

Any ideas how to solve this?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Report - Viewer - throwing exception

Post by HighAley »

Hello.
HL wrote:I have implementet the following code (.NET 4) in a thread for viewing a StiReport:

public class MyStiReport : StiReport
{
....

private void RunStimulsoft(XMLWriter writer, string xml_filename)
{
try
{
DataSet dataSet1 = new DataSet();
dataSet1.ReadXml(xml_filename);
RegData(dataSet1);
Load(rapport_template_name);
Render(true);
Show(true);
}
catch (Exception e)
{

}
}
}


When calling RunStimulsoft in the code above the Stimulsoft 'Report - Viewer' shows the report as expected, but when I try to select 'Open' or 'Save'->'Document file...' from the report viewer top menu, an exception ("Object reference not set to an instance of an object.") is thrown and catched in the catch-branch in the RunStimulsoft method.

Any ideas how to solve this?
Please, send us a sample project for analysis.

Thank you.
Post Reply