StackOverflowException during report.Compile() call
Posted: Tue Sep 16, 2008 3:59 am
Hi.
During some tests with Stimulsoft, a StackOverflowException raised in a (long ...) call to report.Compile().
My project is based on the RuntimeBuildReport sample project.
I've just changed the button1_Click method like this :
private void button1_Click(object sender, System.EventArgs e)
{
StiReport report = new StiReport();
// Try to generate a BIG report
GenerateMassiveReport(report);
report.Compile();
report.Design(true);
}
private void GenerateMassiveReport(StiReport report)
{
StiReportUnitType unit = report.ReportUnit;
report.ReportUnit = StiReportUnitType.Centimeters;
for (int p = 0; p < 20; ++p)
{
StiPage page = new StiPage(report);
page.Name = "P" + p;
for (int x = 0; x < 9; ++x)
{
for (int y = 0; y < 28; ++y)
{
StiText newText = new StiText(new RectangleD(x * 2, y * 1, 1.75, 0.75));
newText.Text = "P" + p + "Cel " + x + ":" + y;
newText.Name = "P" + p + "CelX" + x + "Y" + y;
page.Components.Add(newText);
}
}
report.Pages.Add(page);
}
report.ReportUnit = unit;
}
The exception raised when I call directly Compile as well as when I click on the Preview tab in the designer (in this case, I comment the "report.Compile();" in the source code).
The exact exception message is : An unhandled exception of type 'System.StackOverflowException' occurred in Stimulsoft.Report.dll
I'm testing the Version 2008.2.275 from 10 September 2008
Thank you for your help.
Gérald
During some tests with Stimulsoft, a StackOverflowException raised in a (long ...) call to report.Compile().
My project is based on the RuntimeBuildReport sample project.
I've just changed the button1_Click method like this :
private void button1_Click(object sender, System.EventArgs e)
{
StiReport report = new StiReport();
// Try to generate a BIG report
GenerateMassiveReport(report);
report.Compile();
report.Design(true);
}
private void GenerateMassiveReport(StiReport report)
{
StiReportUnitType unit = report.ReportUnit;
report.ReportUnit = StiReportUnitType.Centimeters;
for (int p = 0; p < 20; ++p)
{
StiPage page = new StiPage(report);
page.Name = "P" + p;
for (int x = 0; x < 9; ++x)
{
for (int y = 0; y < 28; ++y)
{
StiText newText = new StiText(new RectangleD(x * 2, y * 1, 1.75, 0.75));
newText.Text = "P" + p + "Cel " + x + ":" + y;
newText.Name = "P" + p + "CelX" + x + "Y" + y;
page.Components.Add(newText);
}
}
report.Pages.Add(page);
}
report.ReportUnit = unit;
}
The exception raised when I call directly Compile as well as when I click on the Preview tab in the designer (in this case, I comment the "report.Compile();" in the source code).
The exact exception message is : An unhandled exception of type 'System.StackOverflowException' occurred in Stimulsoft.Report.dll
I'm testing the Version 2008.2.275 from 10 September 2008
Thank you for your help.
Gérald