'CrystalReportViewer' is ambiguous in the namespace 'CrystalDecisions.

Discussion in 'ASP .Net' started by Nancy., Sep 28, 2004.

  1. Nancy.

    Nancy. Guest

    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?
     
    Nancy., Sep 28, 2004
    #1
    1. Advertising

  2. Nancy.

    i. Wiin Guest

    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)







    "Nancy." <> wrote in message
    news:2ec901c4a580$29fb52b0$...
    > 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. Wiin, Sep 28, 2004
    #2
    1. Advertising

  3. Nancy.

    Nancy Guest

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

    >-----Original Message-----
    >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)
    >
    >
    >
    >
    >
    >
    >
    >"Nancy." <> wrote in message
    >news:2ec901c4a580$29fb52b0$...
    >> 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?

    >
    >
    >.
    >
     
    Nancy, Sep 28, 2004
    #3
  4. Nancy.

    i. Wiin Guest

    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.

    "Nancy" <> wrote in message
    news:027d01c4a590$ed14e620$...
    > Thanks for your prompt response. I am not getting the
    > error anymore, but the report is not displaying in the
    > screen.
     
    i. Wiin, Sep 28, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UmV6YSBOYWJp?=
    Replies:
    3
    Views:
    5,553
    =?Utf-8?B?ZWlsZWVuIG0=?=
    Jun 16, 2004
  2. John
    Replies:
    1
    Views:
    4,791
    Patrice
    Jun 24, 2005
  3. TS
    Replies:
    1
    Views:
    2,218
    Steven Cheng[MSFT]
    Jan 25, 2006
  4. =?Utf-8?B?SGFucyBCYXVtYW5u?=

    'mycontrol_ascx' is ambiguous in namespace ASP

    =?Utf-8?B?SGFucyBCYXVtYW5u?=, Nov 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    477
    =?Utf-8?B?SGFucyBCYXVtYW5u?=
    Nov 23, 2006
  5. Nemisis
    Replies:
    4
    Views:
    687
    Nemisis
    Apr 16, 2007
Loading...

Share This Page