Tuesday, August 6, 2013

Crystal Report for Visual Studio 2010

Crystal report is not included with Visual Studio 2010, instead you have to download it from SAP - Business Object website.
To make it workable with your code (c#/vb.net),  you have to follow below steps, quite easy for you as I did, so surely everyone dose...
1. Install Visual Studio 2010 IDE; download link: http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
2. Install Visual Studio 2010 Service Pack-1; download link: http://www.microsoft.com/en-us/download/details.aspx?id=23691
3. Download & Install Crystal Report;  download link: http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp
I downloaded from the first link, SAP Crystal Reports, version for Visual Studio 2010 - Standard, Standard EXE installation package which installs the software into the Visual Studio IDE.
You will also have Crystal Report run time engine as well as merge module for .net 4 (both for 32 & 64 bit)
Once you installed the above, then restart your computer and you are done with the installation...
Now,  open Visual Studio and select crystal report application; do the necessary report design and database connectivity etc...
Here comes one the point, when you are going to run your project then we will get an error "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information"
don't panic, you already done almost everything... just add following lines into application configuration (app.config) file inside configuration section, and then save & run your project.
<startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0"/>
      <requiredRuntime version="v4.0.20506"/>
</startup>
app.config_code
wow!!! you have done it... hope that will help you a bit...
Thanks...

1 comment: