Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using crystal report for windows application...
my code is like this

C#
private void crystalReportViewer1_Load(object sender, EventArgs e)
       {

           Cls_data obj = new Cls_data();
           ReportDocument rptDoc = new ReportDocument();
           DataSet ds = new DataSet();
           ds = obj.data();
           rptDoc.Load(@"D:\BillingSoftware\BillingSoftware\CrystalReport1.rpt");
           rptDoc.SetDataSource(ds);
           crystalReportViewer1.ReportSource = rptDoc;
           crystalReportViewer1.Refresh();
       }



but when i run it i got an error like this...



Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.


Plz help me.
Posted
Updated 28-Oct-12 23:31pm
v2

XML
add this to config file... you should be all set...




<startup useLegacyV2RuntimeActivationPolicy="true">

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

</startup>
 
Share this answer
 
Comments
Member 9492907 29-Oct-12 7:34am    
sorry i am using windows application ...not web...in windows what i want to do ....
Philip Stuyck 29-Oct-12 8:19am    
you are supposed to update the config file that belongs to your windows application. This is a .NET project right ? If so, then there is a configfile that belongs to it.
In visual studio it appears as app.config, if you take a look at the location of the binary you will find a config file there as well which is a copy of the app.config
Member 9492907 30-Oct-12 2:42am    
thank u ...its working...
You must be missing Crystal report runtime, Install the crystal report runtime.

http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900