Problems with C# and Crystal Report integration
Posted on 2003-02-27
I'm using Visual Studio C# .NET, and have created a program that does basic data retrieval from an SQL Database. One of the requirements of the program is to create reports based off the data, so I'm trying to figure out Crystal Reports to do it. However, I've tried setting it up, and I keep running into this problem:
Load Report Failed - "CrystalDecisions.CrystalReports.Engine.LoadSaveReportException"
I created the report within the .NET project, and set up a ReportDocument within the form with the CrystalReportViewer, and set the report source to the ReportDocument. The report itself is set to 'embedded resource'
From everything I can figure out, my program crashes as soon as the ReportDocument object is added to my project. Specifically, it crashes when it hits the print properties for the ReportDocument. I tried simply removing those properties, and it did stop crashing, but the program still refused to load the report.
I have also tried doing it programmatically, using this basic setup in the Load for the form - DriversByLocation.ReportSource = new cr_drivers_by_location();" - where DriversByLocation is the CrystalReportViewer and cr_drivers_by_location is the the embedded report. This didn't cause the program to crash, but the report will still not load.
I am at a complete loss in trying to figure this out, and all the documentation I've been able to find doesn't cover this error, besides telling me that the program can't open the report. I would prefer to keep the reports embedded in the program, so that I don't have to deal with external report files. Any help?