cancel
Showing results for 
Search instead for 
Did you mean: 

: 'CrystalReportViewer' is ambiguous in the namespace 'CrystalDecisions.Web'

Former Member
0 Kudos

I realise this is an often asked question, but i am stuck.

On my Windows 7 laptop, i have installed VS2010 as well as my original
vs2005.  I have websites that were running on VS2005, and converted one to
vs2010. It uses Crystal Reports.

It didn't work correctly on my clients server, Windows 2003, so i installed Crystal Reports
Development for VS2010 CRforVS_13_0_6.exe on my laptop. and
CRforVS_redist_install_32bit_13_0_6.zip on client server.

Converted the project and uploaded new version to the client server. I get this
error in the subject text. Many posts say look for duplicate definitions for the two versions of
crystal. But i cant find them. So i tried creating a very simple web project
just with one page. It works in visual studio and on a server I use, but not on
client server.  I think my client server is set up very similarly to my
server, i.e. both old and new versions of the application are installed and it
works on my server.

This simple website is listed below.  It only refers to 13.0.2000.0.  In
C:\Windows\assembly i can see the two versions of crystaldecisions.web but
should the website not select the one i refer too.  I cant uninstall
the 10.2.3600 as it says it is in use. What do I need to do to get this working.  Can I delete the 10.2.3600 version, if so how. I am not sure if any other programs use this version o Crystal Reports, so I am reluctant to delete/uninstall it.  How would I delete it and how would I reinstall it if the deletion caused a problem.  In essence I would like my application to run with both versions crystal installed.

Any help most appreciated.

Thanks
Mike

So this simple website has web.config:

<?xml
version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><configSections>
  <sectionGroup name="businessObjects">   
<sectionGroup name="crystalReports">
      <section name="rptBuildProvider"
type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared,
Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304,
Custom=null"/>     </sectionGroup> 
</sectionGroup> </configSections>  <appSettings>
  <add key="CrystalImageCleaner-AutoStart"
value="true"/>   <add key="CrystalImageCleaner-Sleep"
value="60000"/>   <add
key="CrystalImageCleaner-Age" value="120000"/>
</appSettings>  <connectionStrings/>
<system.web>   <compilation debug="true"
strict="false" explicit="true"
targetFramework="4.0">    <assemblies>
    <add assembly="CrystalDecisions.CrystalReports.Engine,
Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/>     <add
assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
    <add assembly="CrystalDecisions.Shared,
Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/>     <add
assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/>     <add
assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
    <add
assembly="CrystalDecisions.Data.AdoDotNetInterop, Version=13.0.2000.0,
Culture=neutral, PublicKeyToken=692FBEA5521E1304"/></assemblies>
   <buildProviders><add extension=".rpt"
type="CrystalDecisions.Web.Compilation.RptBuildProvider,
CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/></buildProviders></compilation>
  <pages>    <namespaces>
    <clear/>     <add namespace="System"/>
    <add namespace="System.Collections"/>
    <add
namespace="System.Collections.Generic"/>
    <add namespace="System.Collections.Specialized"/>
    <add namespace="System.Configuration"/>
    <add namespace="System.Text"/>
    <add namespace="System.Text.RegularExpressions"/>
    <add namespace="System.Web"/>
    <add namespace="System.Web.Caching"/>
    <add namespace="System.Web.SessionState"/>
    <add namespace="System.Web.Security"/>
    <add namespace="System.Web.Profile"/>
    <add namespace="System.Web.UI"/>
    <add
namespace="System.Web.UI.WebControls"/>
    <add
namespace="System.Web.UI.WebControls.WebParts"/>
    <add namespace="System.Web.UI.HtmlControls"/>
   </namespaces>   </pages>
  <authentication mode="Windows"/>
  <httpHandlers>    <add verb="GET"
path="CrystalImageHandler.aspx"
type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web,
Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
  </httpHandlers>  </system.web>
<system.webServer>   <validation
validateIntegratedModeConfiguration="false"/>
  <handlers>    <add
name="CrystalImageHandler.aspx_GET"
path="CrystalImageHandler.aspx" verb="GET" type="CrystalDecisions.Web.CrystalImageHandler,
CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"
preCondition="integratedMode"/>   </handlers>
</system.webServer>  <businessObjects>
  <crystalReports>    <rptBuildProvider>
    <add
embedRptInResource="true"/></rptBuildProvider>
  </crystalReports>  </businessObjects>
</configuration>

 

and the page is...  default.aspx

<%@
Page Language="VB" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %> <%@
Register TagPrefix="CR" Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral,

PublicKeyToken=692fbea5521e1304" %>

<html
xmlns="http://www.w3.org/1999/xhtml"
> <head runat="server">   
<title>Untitled Page</title> </head> <body>
    <form id="form1" runat="server">
    <div>       
<CR:CrystalReportViewer ID="CrystalReportViewer1"
Runat="server" AutoDataBind="True"
          
Height="947px" ReportSourceID="CrystalReportSource1"
Width="845px" />       
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report
FileName="CrystalReport1.rpt">
          
</Report>       
</CR:CrystalReportSource>       
</div>     </form> </body> </html>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Discovered what was wrong..

My website was running in a virtual directory.  http://localhost/myweb/

The web.config in the virtual directory was set up correctly as was all references
in the web pages.  But the web.config in the default directory http://localhost/ still referred to the old version of crystal.  I had thought my application would only look at my web.config, but obviously not!!

I removed all references to crystal in that web.config.. And all worked.

That's the problem resolved.

Answers (0)