cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with the Viewer & Visual Studio 2005

Former Member
0 Kudos

I tried the trial version of Crystal XI release 2 and decided to purchase it. I now have it installed on my computer and when I am in Visual Studio (developing in Visual Basic) I try to create a report and it naturally goes out to the Crystal Reports software and I developed it there. Now I have it included in my project and I am attempting to attach it to a viewer. I created a form and placed an Crystal ActiveX Report Viewer Control on the form. There isn't a place for me to attach the Report Source. I tried by putting code in the form that called the report but it doesn't recognize the report as being a class in the project. I am thinking that I have something installed wrong. Is there anyone that has had this problem and/or might know the resolution for it? I would appreciate any kind of input.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Just to confirm if Crystal has got integrated with VS properly, you can go to Help-> About in the VS ide and in the list of Installed product's you should find an entry for CRXIR2.

Also if you are using VS2003 then you will get a class for the reports hence use the report by creating an object for it. In VS2005 this has to be done by yourself.

The sequence that you need to follow in your code are (C#):

// Including namespaces

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Shared;

using CrystalDecisions.Web;

//Code in Page Load

ReportDocument ReportDocumentObject = new ReportDocument();

ReportDocumentObject.Load(Server.MapPath("World Sales Report.rpt"));

CrystalReportViewer1.ReportSource= ReportDocumentObject;

Of course the samples, as suggested above, will definitely help you better.

Also please note that you must have VS edition as Standard, professionl or Developer and Crystal's developer edition.

Hope it helps!

AG.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Laura,

please see our NET samples on our diamond site.

Lots of samples cover topics like loading embedded or non embedded reports.

You will find the samples under the following link:

https://boc.sdn.sap.com/dotnet/samples

Falk