soonhuat81

soonhuat81

  • NA
  • 31
  • 0

Error Occured when loading the customized report after QUIT the program

Jun 8 2004 5:43 AM
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.