list index out of bounds (-1 )
I had the code snip below which was working well in 3.x and 4.09. However after I upgrade to 4.10, it stop working, and cause a crash with error message of [ List Index out of bound (-1) ].
TfrxReportPage *frxPage = new TfrxReportPage ( frxReportX );
if ( frxPage ) {
frxReport2->PrepareReport( true );
frxPreview2->LoadFromFile( filename1 );
frxReportX->PrepareReport( true );
ok = frxReportX->PreviewPages->LoadFromFile( filename2 );
frxReportX->PreviewPages->AddFrom( frxReport2 );
/**************************
CRASH AND DISPLAY
List index out of bounds(-1)
*************************/
frxReportX->PrepareReport( false );
//frxPreview3->Show();
int npgcount = frxReportX->PreviewPages->Count;
frxReportX->PreviewPages->SaveToFile ("c:\\temp\\combined.fp3");
frxPreview2->LoadFromFile( "c:\\temp\\combined.fp3" );
}
delete frxReportX;
}
frxPreview2->Show();
TfrxReportPage *frxPage = new TfrxReportPage ( frxReportX );
if ( frxPage ) {
frxReport2->PrepareReport( true );
frxPreview2->LoadFromFile( filename1 );
frxReportX->PrepareReport( true );
ok = frxReportX->PreviewPages->LoadFromFile( filename2 );
frxReportX->PreviewPages->AddFrom( frxReport2 );
/**************************
CRASH AND DISPLAY
List index out of bounds(-1)
*************************/
frxReportX->PrepareReport( false );
//frxPreview3->Show();
int npgcount = frxReportX->PreviewPages->Count;
frxReportX->PreviewPages->SaveToFile ("c:\\temp\\combined.fp3");
frxPreview2->LoadFromFile( "c:\\temp\\combined.fp3" );
}
delete frxReportX;
}
frxPreview2->Show();