Link to home
Start Free TrialLog in
Avatar of brooksgroup
brooksgroup

asked on

Visual Studio 2005 and Crystal Reports - Load report failed Error

I installed Visual Studio 2005 Professional. When I try to view Crystal Report, I get "Load report failed" error. I did not have a previous version of Crystal Report installed before I install VS 2005. I'm new to Crystal Report and am not sure if this is the configuration problem or something else.

Here is what I did:

1. Created a report called samplereport.rpt. It is a simple blank report with nothing on it.

2. I made a .aspx page called Report.aspx. Then I dropped CrystalReportViewer. Here is the code

        <CR:CrystalReportViewer ID="myCrystalReportViewer" runat="server" AutoDataBind="True" Height="50px" Width="350px" ReportSourceID="CrystalReportSource1" />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="samplereport.rpt">
            </Report>
        </CR:CrystalReportSource>

for code behind page I added:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

3. when I try to view report.aspx page, I get the "load report failed" error.

I appreciate any help or insights.

Thank you.
      
Avatar of brooksgroup
brooksgroup

ASKER

I added the following to web.cofig file and fixed the problem.

 
            <pages>
                  <namespaces>
                        <clear/>
                        <add namespace="System"/>
                        <add namespace="System.Collections"/>
                        <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>

However, I now have a different problem. I cannot view crystal report toolbar images from the web. I'm not sure where the images files are pulled from. Does anyone know how to fix this? As I stated earlier, I use VS 2005 Professional.

ASKER CERTIFIED SOLUTION
Avatar of brooksgroup
brooksgroup

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, please close this question. Thank you.