Page 1 of 1

Report - Viewer - throwing exception

Posted: Wed Jan 04, 2012 12:22 pm
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?

Report - Viewer - throwing exception

Posted: Thu Jan 05, 2012 1:44 am
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.