CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

Moving Crystal reports to 2003, not that clear

I had updated a project from VS.NET 2002 to 2003. No big deal, till the moment I checked the (Crystal) reports. It took me some time to find out so let me share this with you.

In web.config theres is this section

 

<compilation defaultLanguage="c#" debug="true"><assemblies><add assembly="CrystalDecisions.CrystalReports.Engine, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>FONT color=#800000 size=3>assemblies>FONT color=#800000 size=3>compilation>

In there are some references to Crystal assemblies with an explicit version number. To get things to work again you have to update this version nummber to the version of the 1.1 assemblies. Which is 9.1.5000.0

 

<compilation defaultLanguage="c#" debug="true">

 

<assemblies>

 

<add assembly="CrystalDecisions.CrystalReports.Engine, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

 

<add assembly="CrystalDecisions.ReportSource, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

 

<add assembly="CrystalDecisions.Shared, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

 

<add assembly="CrystalDecisions.Web, Version=9.1.5000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

 

FONT color=#800000 size=3>assemblies>

 

FONT color=#800000 size=3>compilation>

After this all worked like a snap. I (Google) did not find any clear hints on this, had to find out step by step. Quite interesting but it does take some time.

Actually I am quite pleased with Crystal reports. Powerfull and flexible. But the docs are a traditional nightmare. This is what I destilled for my report:

  • Add a new report to the project.
  • Designing it using a local XML dataset for the data
  • Drop a report component on the webpage.
  • Make it a typed report, typed according to the report in the project
  • Drop a viewer on the webform
  • Tie everything together in the page_load :

reportProjekt1.SetDataSource(dataSetReport1);

CrystalReportViewer1.ReportSource = reportProjekt1;

That's all, a couple of clicks and two lines of code...

Blog on,

Peter



Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!

This Blog

Syndication

News