views:

63

answers:

2

I have built a Crystal Report in VS2008 for an asp.net c# site. I can run the rpt file and view the report.

I can't get it do display in the web page.

I've never used Crystal before so I may have this totally wrong. I dragged a CrystalReportViewer and CrystalReportSource onto the designer and used the menu to configure the source and report name.

<%@ Page Language="C#" MasterPageFile="~/TimeTracker/MasterPage.master" AutoEventWireup="true" CodeFile="EmployeeReport.aspx.cs" Inherits="TimeTracker_EmployeeReport" Title="Untitled Page" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>



<asp:Content ID="Content1" ContentPlaceHolderID="maincontent" Runat="Server">


    <CR:CrystalReportViewer 
        ID="CrystalReportViewer1" 
        runat="server" 
        AutoDataBind="True" 
        Height="1200px" ReportSourceID="CrystalReportSource1" 
        Width="1000px" HasRefreshButton="True" />




    <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
        <Report FileName="EmployeeHours.rpt">
        </Report>
    </CR:CrystalReportSource>




</asp:Content>
A: 

Where is EmployeeHours.rpt actually located? If it's in the sub folder TimeTracker try this:

FileName="~/TimeTracker/EmployeeHours.rpt".

Does the page generate any javascript errors like object bobj is undefined?

Jeroen
It's not in the TimeTracker folder There are no error messages when i view it in Firefox, but in IE there is a message on the webpage that says "Load Report Failed"
Joshua Slocum
The point is to specify the complete relative path starting with ~. Have you tried that?
Jeroen
that was it! I had to change the Filepath to <Report FileName="~/EmployeeHours.rpt">The page is in the TimeTracker folder but the report is notThank you for the help
Joshua Slocum
A: 

Are you getting errors? You need to have Crystal installed on your web server.

Beth