'CrystalReportViewer' is ambiguous in the namespace 'CrystalDecisions.

N

Nancy.

It seems that I can not be able to display a crystal
report with the crystal viewer in a web application.
However, in Windows Application I do not have this kind
of problems.

In a Web form, I have the CrystalReportViewer1 and
databind to a SampleDorm.rpt that is part of my project.

The following code binds the dataset to the report's
setdatasource.

Dim oRpt As SampleDorm
oRpt = New SampleDorm
oRpt.SetDataSource(m_dstG)
Once I executed this code I get the error message.
Any help?
 
I

i. Wiin

Make sure you include both CrystalDecisions.Web and
CrystalDecisions.CrystalReports.Engine

Then when you dim your oRpt as a
CrystalDecisions.CrystalReports.Engine.ReportDocument instead of the class
of your actual report as you were doing.

So it should look something like this: (pardon my VB.NET code below as I use
C# usually).

Dim oRpt as ReportDocument
oRpt = new SampleDorm
oRpt.SetDataSource(m_dstG)
 
N

Nancy

Thanks for your prompt response. I am not getting the
error anymore, but the report is not displaying in the
screen.
 
I

i. Wiin

Are you seeing the CrystalReportsViewer control when viewing the page in a
browser? Is that control the only control you have on your page? Try
placing a Label just above and another just below the report viewer control.
Programmatically set the Text of the upper label at the beginnging of your
code that populates the report and then programmatically set the Text lower
label after you do the DataBind(). This way you know the code is being
processed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top