Quantcast
Viewing all articles
Browse latest Browse all 3636

Report+ReportViewer SetDataSource exception on Windows 8

Hello,


I have a .NET-application that references Crystal Reports Development Version for Visual Studio 13.0.8 and utilizes the WinForms ReportViewer. When run on Windows 8, it'll occasionally crash with an uncatchable exception when I try to update the set datasource for a loaded report in the ReportViewer from a locally created DataTable. No connection to a database is used. This happen in the development environment, when run through Visual Studio and in a production environment when deployed together with the corresponding MergeModules. The application is built as a x86-executable with .NET 4.5.


I cannot reproduce the crashes when I run the application with compatibility mode set for Windows 7 or lower.


The crashes are not constant and I can sometime update the datasource multiple times in a row before one occurs.

I receive the following two error reports from Windows:


Event Name: BEX

Response: Not available

Cab Id: 0

Problem signature:

P1: CRTest01.exe

P2: 1.0.0.0

P3: 53032f3f

P4: StackHash_5861

P5: 0.0.0.0

P6: 00000000

P7: PCH_26_FROM_ntdll+0x0002E1A4

P8: c0000005

P9: 00000008

 

Event Name: APPCRASH

Response: Not available

Cab Id: 0

Problem signature:

P1: CRTest01.exe

P2: 1.0.0.0

P3: 5303516b

P4: datadefmodel.dll

P5: 13.0.8.1216

P6: 52a9a8db

P7: c0000005

P8: 00040e99


A simple test application that I use to reproduce the crash is a WinForm with a ReportViewer and two buttons:


protected void bStep1_Click(object sender, EventArgs e)

{

    mReport = new ReportDocument();

    mReport.Load(msFilePath, OpenReportMethod.OpenReportByTempCopy);

    crvViewer.ReportSource = mReport;

}

 

protected void bStep2_Click(object sender, EventArgs e)

{

    DataTable dtData = new DataTable();

    dtData.TableName = mReport.Database.Tables[0].Name;

 

    //Populate the DataTable according to the report.

    //...

 

    mReport.Database.Tables[0].SetDataSource(dtData); //<-- Crash occurs here.

    crvViewer.RefreshReport();

}


Please feel free to respond with any idea of what might be causing this.

 

Thank you very much in advance!

 

Victor Lundberg


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>