Joseph Alborida
Joseph Alborida

Reputation: 11

Error in Crystal Reports (Failed to load database information)

I am developing a system and I need to produce reports. I am using Crystal Report and my language is C#. The problem is, when I execute the program, it gives me an error like what you see in the picture below but there is no error in code. What is the solution for these?

My code in windows form application:

private void MedReceipt_Load(object sender, EventArgs e)
{           
            ReportDocument cryRpt = new ReportDocument();
            cryRpt.Load("C:\\Users\\Joseph\\Documents\\Visual Studio 2010\\Projects\\PRMS-Capstone\\PRMS-Capstone\\Receipt1.rpt");
            reportMedReceipt.ReportSource = cryRpt;
            reportMedReceipt.Refresh();
}

Upvotes: 0

Views: 6269

Answers (1)

Tiago S
Tiago S

Reputation: 1326

Try this answer


Add the <startup> code below code under the <configuration> element in your app.config

<startup useLegacyV2RuntimeActivationPolicy="true"></startup>

Upvotes: 1

Related Questions