• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 647
  • Last Modified:

CR for VS .Net and CR 9 Developer

Hi Experts,

I was using CR for VS .Net. Recently I discovered that there are some nice features in CR 9 Developer (which we also have) that are not available in CR for VS.NET. I installed CR 9 Developer on my machine and now I have two problems:

1. I cannot create/edit ANY reports any more in VS.NET. I create a brand new report and try to edit it which fails with an error "Class not registered". I reinstalled VS.NET and the result is the same. VS.NET is version 2003. How can I fix this? I would like to be able to use both versions of CR on the same machine.

2. I cannot create now C# files from the reports. I want to deploy the executable containing the reports as class files, not as RPT files. It is possible to create .CS files from reports created with CR 9 Developer and how?

Thanks in advance.
TheAvenger
0
TheAvenger
Asked:
TheAvenger
  • 8
  • 6
  • 2
  • +2
3 Solutions
 
mlmccCommented:
CR9 can run with previous versions of CR (8,7,..)
http://support.businessobjects.com/library/kbase/articles/c2002466.asp

Since the .Net versions are built on the CR9 engine and are a subset, I suspect you cannot run the 2 on the same machine.  I found nothing on the CR knowledge base about other versions.

mlmcc
0
 
TheAvengerAuthor Commented:
OK, I solved problem 1 by installing CR 9.2.2. Problem 2 however remains for the EXTRA features of CR 9 (the ones that are already in CR .NET are OK, i.e. the CS file is generated so, that it covers the features, that were also part of CR .NET but does not contain the changes that are features of CR 9 and not part of CR .NET)
0
 
mlmccCommented:
What are .CS files?

mlmcc
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
TheAvengerAuthor Commented:
C# file with a class that represents the report. Later I access the report by creating an instance of this class rather than deploying the RPT files. This way I deploy less files and the reports can entirly be accessed/manipulated through the code
0
 
sazbill1Commented:
This is how I've deployed Crystal reports in the past, but using VB.Net.  When you add a Crystal Report to a .Net project (either as a new report or a new class) is runs a Custom Tool (CrystalDecisions.VSShell.CodeGen.ReportCodeGenerator) that generates an class for the report that can be instantiated within your code.  When you deploy your project, the .rpt and .cs file will be rolled up into your project's msi file.

Scott in MN
0
 
TheAvengerAuthor Commented:
It works fine when I use the built in CR for .Net. However when I use the external CR 9 it will not automatically rebuild the CS/VB file (I think it's the same for both VB and C#). So I open the report inside VS and resave it (to regenerate the CS file) and this works BUT ONLY for the features that are already in CR for .NET, i.e. when I change a line chart line color (supported by CR 9, not supported by CR .NET) it will generate a new CS file but the line color will not be changed.

So the question is: how do I rebuild the VB/CS file in such a way that it has ALL the changes from the CR 9?
0
 
mlmccCommented:
Have you included the new Crystal dlls in the project or are you still using the .Net dlls?

mlmcc
0
 
TheAvengerAuthor Commented:
Hmmm
Which files shall I check/change? Do you know how do I later include the correct ones in the setup for my application?
0
 
mlmccCommented:
I am not familiar with CR9 and .Net

The VB program references will probably be
CRAXDRT9.dll
CRViewer9.dll

Look at
http://support.businessobjects.com/library/kbase/articles/C2012421.asp


As far as when you rebuild it should include the correct files at least for the files being referenced.  The others, just try to ensure you are referencing them from the CR9 directory.

mlmcc
0
 
TheAvengerAuthor Commented:
Hmm, it's not so easy, because CR supplies different .Net libraries for .Net applications. They are also specially deployed - with some registration keys, etc. However I will have a look tomorrow at work and will give you a response.
0
 
TheAvengerAuthor Commented:
OK, unfortunately this is not the problem. I am referencing the managed components from CR with version 9.2.3300.0 which are the newest ones that I can reference at all.

Any other ideas?
0
 
mlmccCommented:
I don't know.  As I said earlier I have no experience with CR.Net or CR9.

mlmcc
0
 
TheAvengerAuthor Commented:
:-(

I will try to attract more experts to see if someone has an idea. Increasing points
0
 
rama_krishna580Commented:
Please check..

1.  Do you have valid License....
2.  And check below details with links....

Likely a dependent DLL is not installed and/or registered on the target machine. CR has a few decent tools for sniffing dependencies and logging dependent associated DLLs on the development system and the runtime system, which can be compared. Notably the first two.

dsx32.exe
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/dsx32.zip.asp

rptchk32.exe
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/rptchk32.zip.asp

Modules.exe
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/modules.zip.asp

Dependency Walker
http://support.crystaldecisions.com/communityCS/FilesAndUpdates/depends21.zip.asp

Files Index
http://support.crystaldecisions.com/search/filelists/filesandupdates.asp
0
 
TheAvengerAuthor Commented:
Yes, I have a valid license for both CR 9 and for CR .Net. The problem is on the development machine, not on the client system, where CR 9 is installed, so I don't think it's a missing library
0
 
frodomanCommented:
>>> 1. I cannot create/edit ANY reports any more in VS.NET. I create a brand new report and try to edit it which fails with an error "Class not registered". I reinstalled VS.NET and the result is the same. VS.NET is version 2003. How can I fix this? I would like to be able to use both versions of CR on the same machine.

This is a known problem that is solved by a hotfix you can download from Biz Objects.  I don't have the link handy at the moment but I can find it if you need it - looks like you may already have done this if ALL of your components are now at the 9.2.x revision.

>>> 2. I cannot create now C# files from the reports. I want to deploy the executable containing the reports as class files, not as RPT files. It is possible to create .CS files from reports created with CR 9 Developer and how?

I'm not familiar with C#, but I've used standalone CR9 with VB.Net and I believe they react the same way.  You can create a .vb file (with I believe to be equivalent of .cs file).  In Solution Explorer you rt-click and Add Existing Item -> Crystal Report -> Select your .rpt file.  This adds the .rpt file to the report - make sure the properties has Embedded Resource selected.  You can then instantiate this report within your code: RptViewer.ReportSource = NEW YourCRReport.rpt

I believe the .vb file doesn't show in your Solution Explorer until you've compiled the code.  The .rpt file itself is not distributed with your application when you do this - it's compiled into your executable.

Note that if you do this, you CANNOT open the .rpt file from within Visual Studio because this will dump any features that aren't supported in the .Net version of Crystal.  I don't know any way around this.  Honestly I don't even use the editor that's included with .Net - I do all my report design in CR and just pull in the finished reports as described above.

Hope this helps

frodoman
0
 
rama_krishna580Commented:
0
 
mlmccCommented:
Glad I could help

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 8
  • 6
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now