cancel
Showing results for 
Search instead for 
Did you mean: 

Error Creating Control CrystalReportSource

Former Member
0 Kudos

I am trying to develop a VS2005 vb.net web app in Crystal 2008. I have added a report viewer control and created a reportsource. The control says 'Error Creating Control CrystalReportSource1 The document has not been opened.' I have created a report and added data etc just as in previous versions but i am unable to get past this. Any ideas please?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you view the report in CR2008? If no then make sure we can view the report in designer first.

If yes, then make sure that Cr2008 got integrated with VS2005, for this go to Help -> About in VS ide and you should find an entry for CR2008 in integrated product list.

Then try the following simple code to test (Include the report in project):

// Adding namespaces
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.Web;


// Defining object
ReportDocument RdocObject = new ReportDocument();
// Loading the report
RdocObject.Load(Server.MapPath("Report1.rpt"));
// Viewing the report
CrystalReportViewer1.ReportSource = RdocObject;

You can get more samples [here|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm] under Crystal Report .Net sdk.

Hope it helps.

AG.

Former Member
0 Kudos

the code provided (when converted to VB) produced a compile error of "the document has not been opened" and references the crystalreport.rpt file. The report does load and preview in CR2008. CR2008 does show that it is integrated into VS

upon dragging a new crviewer onto the page and selecting a new reportsource and new report, the following error is displayed:

"error setting value '<new report source...>' to property 'reportsourceid'. Details: the document has not been opened"

Thanks for your assistance.

former_member183750
Active Contributor
0 Kudos

It just looks like you're missing some components or the components are not "interfacing" with .NET. I'd recommend either reinstalling Crystal Repots, or applying the SP 0 I mentioned in the previous post.

Ludek

Answers (2)

Answers (2)

Former Member
0 Kudos

SP0 was the key. Thanks for the help.

former_member183750
Active Contributor
0 Kudos

Apply SP 0 to CR 2008 and see if that helps. SP 0 can be downloaded from here:

ftp://ftp.businessobjects.com/pub/incoming/CR2008SP0.zip

Ludek