Crystal Report .NET Rules and Tips
- Rule 1:
- Crystal in .NET doesn’t work properly always, it gives proper functional.
- Rule 2:
- The error message you see has got nothing to do what you need to fix.
- Rule 3:
- The IDE does weird things; there are work arounds to get them working.
Common Problem 1:
Crystal report when deployed to web server complains “keyCode” is invalid.Cause: Could be invalid keycode as it saysReal cause: The version you are using during compilation is not same as the one installed on server.
- Check if there Crystal reports 2.0 is install on server and development PC. If its installed then there should be a directory called “C:\Program Files\Common Files\Crystal Decisions\2.0”
- If it’s not installed use file://abi/CRWebSetup/Release folder and install it, it has got Crystal License KEY and all sorts in it. Ensure both development box and web server has the software
- When you open a crystal report project first time, delete all REFERENCES in VS.NET for the project and re add references from the following CrystalDecisions.Web.dll CrystalDecisions.ReportSource.dll CrystalDecisions.Shared.dll CrystalDecisions.CrystalReports.Engine.dllAll DLLs are should be under C:\Program Files\Common Files\Crystal Decisions\2.0\Managed directory. This is to be done as Visual Studio always adds reference to old version ALWAYS.
Common Problem 2:
“Query Engine error”
The DataSet’s Name, DataTable’s Name, DataRelation’s Name, DataColumn’s Name or data types did not match the one given in XSD. This happens for the fact when we give the XSD; we usually tend to give good names for DataTable, DataSet, columns. But when we do dataAdapter.Fill(ds), it always gets filled as DataSet1, DataTable1, DataTable2, relations will not be added and Primary Key’s are not assigned.
So if you match the names and relations it will work.
Common Problem 3:
Visual Studio just disappears when you Undo check out
It just does it!! Good thing is that it does it when file is opened in VS.NET already.
Always close .RPT files before you do undo checkout.
I belive Crystal Reports is still the BEST reporting out there in market, SQL Server Reporting comes close, not complete.