Print Page | Close Window

Where are the Report Classes?

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Talk with the Author
Forum Discription: Ask Brian questions about his books and give him your comments. Like the book? Hate the book? Have suggestions? Let me know!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12585
Printed Date: 27 Apr 2024 at 2:57pm


Topic: Where are the Report Classes?
Posted By: FunkMonkey33
Subject: Where are the Report Classes?
Date Posted: 10 Mar 2011 at 11:07am
This may seem like a stupid question, but...
 
I'm using Visual Studio 2010.  I can't seem to find the ReportDocument class.  I googled it, and got that it lives in the CrystalDecisions.CrystalReport.Engine assembly.  Trouble is, here in VS 2010 (my copy at least), there is no such assembly. 
 
Assemblies that appear in my add reference dialog include:
 
CrystalDecisions.CrystalReports.TemplateEngine
CrystalDecisions.Data.AdoDotNetInterop
CrystalDecisions.Enterprise.Viewing.ReportSource
CrystalDecisions.ReportAppServer.ClientDoc
CrystalDecisions.ReportAppServer.CommLayer
CrystalDecisions.ReportAppServer.commonControls
CrystalDecisions.ReportAppServer.CommonObjectModel
CrystalDecisions.ReportAppServer.Controllers
CrystalDecisions.ReportAppServer.CubeDefModel
CrystalDecisions.ReportAppServer.DataDefModel
CrystalDecisions.ReportAppServer.ObjectFactory
CrystalDecisions.ReportAppServer.Prompting
CrystalDecisions.ReportAppServer.ReportDefModel
CrystalDecisions.ReportAppServer.XmlSerialize
 
And that is it.
 
I added a reference to all of these, and looked around for the ReportDocument class.  I could not find it...
 
I'm wondering if, once again, Microsoft is taking over this class, as in naming it something else.
 
I sure do hope I can complete this project in VS 2010.  It would be very painful to have to downgrade it to 2008.
 
Thanks!
 
Aaron



Replies:
Posted By: FunkMonkey33
Date Posted: 10 Mar 2011 at 12:47pm
A quick update:
 
I did some research and saw that it's a separate download now. 
 
I downloaded it and installed it, but didn't see any new assemblies pop up in the add reference dialog (actually, I think I'd already installed this, because where else would the other CystalDecisions asseblies have come from?).
 
I went into Visual Studio 2008, and went to the add reference dialog, and looked at the path for CrystalDecisions.CrystalReports.Endgine.  I then went back into VS 2010 and attempted to add a reference to it by browsing directly to it. That didn't work.  I can add the reference, and even add a using dircetive to import the namespace. When I add the namespace, Visual Studio's intellisense even helps me out.  But when I try to compile, I get this message:
The referenced assembly "CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
I have since installed both the 64-bit and 32 bit versions of the runtime.  I thought that since I'm targeting the x86 framework in my project (though I develop on a 64-bit machine) maybe I needed that version. Neither one added any assemblies into my Visual Studio's add reference dialog. 
 
Thanks in advance for any help!
 
Aaron
 
 
 


Posted By: FunkMonkey33
Date Posted: 10 Mar 2011 at 12:56pm
I figured it out.
 
My project was targeting the .NET 4.0 Client Profile framework, instead of just .NET 4.0.  I don't know why it was, but it was.
 
As soon as I fixed that, the Engine assembly appeared in my Add Reference dialog.
 
hallelujah!
 
Aaron


Posted By: BrianBischof
Date Posted: 11 Mar 2011 at 7:54am
Hi Aaron - here is a video you should probably watch as well. It's tips on getting started with VS 2010 and Crystal Reports.

http://www.youtube.com/watch?v=wud4VtqpetU - http://www.youtube.com/watch?v=wud4VtqpetU


Brian

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: FunkMonkey33
Date Posted: 11 Mar 2011 at 9:36am
Really great video, Brian.  Thank you for making it.
 
I need to ask one question:
 
Just to be clear, will all of my end users need to download and install a Crystal Reports .Net runtime?  When I deploy my project (using a Setup project type), doesn't Visual Studio just detect CR.NET as a detected dependancy and include the DLL in the MSI installer package?
 
Is it the same with Visual Studio 2008?
 
Thanks.
 
Aaron


Posted By: FunkMonkey33
Date Posted: 16 Mar 2011 at 8:55am
I answered my own question.
 
End users will need to install the CrystalReports.NET runtime in order for the application to work.
 
Too bad.  Hopefully I can figure out how to have it installed silently when my Setup package is installed.
 
Still curious if the same is true of Visual Studio 2008 though.  If anyone knows first hand, please post the answer.
 
Aaron


Posted By: charlesasantos
Date Posted: 17 Mar 2011 at 3:19am
Hi Aaron,
I can confirm that VS2008 also requries additional files to be installed at the client.  With VS2005, there were 'merge modules' which you could add to the visual studio deployment package,  it was a really neat solution. 
 
With VS2008, I never managed to find these.  Instead, I had to download Crystal reports for Visual Studio 2008, which I got from
http://resources.businessobjects.com/support/additional_downloads/runtime.asp#08 - http://resources.businessobjects.com/support/additional_downloads/runtime.asp#08
 
I then had to distribute this to all clients as a separate msi, not as neet as with VS2005.  It looks like I'll have to go down the same road for VS2010.
 
Hope it helps
 
Charles


Posted By: FunkMonkey33
Date Posted: 17 Mar 2011 at 5:34am
There is some possibility of bootstrapping your application with the CR.NET runtime.  I've never done it before, but my understanding is that you can mark it as a prerequisite just like you do for the .NET framework.  Then the installer automatically downloads and installs it, then returns to the installation of your application.
 
I'm going to try doing it that way in the next couple of days, to see how it works.  I'll report back.
 
Aaron


Posted By: charlesasantos
Date Posted: 17 Mar 2011 at 6:00am
Hi Aaron, 
if I remember correctly, the bootstrapping is done through use of the merge modules.  It turns out vs2010 has them available:
http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp - http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp
 
I managed to do this years ago using vs2005, and I remember it was not very complicated.  If you right click on the deployment package, you can select 'add' and then 'merge module'.  This integrates it into your deployment package.
 
I'll try and give it a go over the next few days and will post here if I have any luck with this
 
Charles


Posted By: charlesasantos
Date Posted: 17 Mar 2011 at 6:44am
Hello again,
 
I just tried using the merge modules and came across errors on the client side.  Not to mention the deployment package increased by about 150MBs in size too.  I also think it slows down the installation of my application, which is a bummer given it is updated on the company's clients on a weekly basis. 
 
For now it looks like I'll be using the redistributables instead.
 
Hope you're luckier than I am
 
Charles


Posted By: FunkMonkey33
Date Posted: 24 Mar 2011 at 4:36am
It looks like there is an updated merge module available from the SAP Community Network:
 
https://www.sdn.sap.com/downloads/BusinessObjects/cr2008fp34_mm.zip - https://www.sdn.sap.com/downloads/BusinessObjects/cr2008fp34_mm.zip
 
Hopefully this will fix the problems you had.
 
Request to Brian (or anyone else who wants to take this on): would you please post a video or blog entry about how to bootstrap the CR Runtime with your application?  This would be very useful.
 
Thanks!
 
Aaron


Posted By: FunkMonkey33
Date Posted: 24 Mar 2011 at 1:55pm
Yeah, I just tried this too, with the latest version, the one out today.
 
No luck.  It compiled fine in Visual Studio, but when I installed it on another machine it neither installed the Crystal Reports runtime, nor did my application work when I tried to print a report.
 
Any ideas?
 
Thanks.



Print Page | Close Window