开发者

display crystal report in asp.net page

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">
        </Rep开发者_运维百科ort>
    </CR:CrystalReportSource>




</asp:Content>


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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜