How to use Crystal Reports with ASP.NET?

10,141

Having just been through the pain of this myself, here's a couple of pointers that will hopefully save you time...

Crystal Reports on MSDN - lots of good stuff in here

Which Persistence Approach Should I Use with Crystal Reports - gives detail and code samples on how best to control the lifesycle of a report object

This post also gives some good advice around the report object lifecycle

Deployment... The latest Crystal Reports runtimes don't run in a 64 bit environment, so if deploying to a 64 bit server you will either have to configure IIS to run an 32 bit mode, or use a previous version of the runtime. I have had the most luck with the runtime that is distributed with VS2008, this can be found in

C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5

I note you are using ASP.NET 2.0 - i'm sure there is a VS2005 equivalent runtime. Try and get the deployment environment working early on in the project, as it will no doubt cause more headaches than you expect.

Finally, one last point that has cost us some time and is worth mentioning - the standard parameters screen in Crystal Reports will only take you so far. If you want to get complex with how you present your parameters to the user (e.g. by having a parameters dependent on the selection of another parameter) you will need to roll your own parameter screens. This is fairly easy as the object model gives you access to all the info you will need about parameters. We have gone down the route of creating a generic parameters screen that builds itself according to the parameters found in the report it is pointed at.

Share:
10,141
Admin
Author by

Admin

Updated on June 24, 2022

Comments

  • Admin
    Admin almost 2 years

    How to use crystal Reports with ASP.Net 2.0. Any Samples/Tutorials/Examples which shows how to deploy Crystal Reports on a production Server.