Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Occured when loading the customized report after QUIT the progra

Status
Not open for further replies.

beginner81

Programmer
Oct 27, 2003
44
MY
When i customize a report(report1.repx) and save it, then click the "Load" button to load the report1.repx to preview it, it's work fine. The problem is after i quit the program and run the program again, then click at the "Load" button to locate the path for report1.repx, an error message promt out as following:

"An unhandled exception of type 'DevExpress.XtraReports.Serialization.XRSerialization' occured in devexpress.xtrareports.dll

Addtional information: An error occurred during deserialization - possible wrong report class name"


What is the reason can anyone there help me ?? And what's the way to solve it. The following is the code that im write for the "Load" function:

private void buttonLoad_Click(object sender, System.EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "c:\\" ;
openFileDialog1.Filter = "repx files (*.repx)|*.repx";
openFileDialog1.FilterIndex = 2 ;
openFileDialog1.RestoreDirectory = true ;

if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
XtraReport1 rep = new XtraReport1();
rep.LoadState(openFileDialog1.FileName);
rep.SetDataSource(this.getDataSource);
rep.ShowPreview();
}

}



Ur help will be appreciated thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top