简体   繁体   中英

Crystal report viewer is not able to display when publish to server visual studio 2010

i need to ask some question about crystal report. I have successfully run crystal report locally with visual studio 2010, But when i deploy to the server. It causes me an error.

The crystal report viewer is no able to display report .It only give me an blank page.By the way I am using window server 2003 and IIS 6.

I also has installed the crystal report run-time on my server. Did i miss any step for configure? Please guide me with some ideas. Thanks

Here is my code

 protected void Page_Load(object sender, EventArgs e)
    {

        CrystalReportViewer1.ReportSource = Server.MapPath("~/Module/Report/CrystalReport1.rpt");
    }

There are a couple of issues that need to be handled:

You need to run "Verify Database" on the report again on the server if you are using SQL Server Native Client.

These links may help further:

Crystal reports in ASP.NET

Crystal report error (Load report failed) in asp.net

** Edited ** Report not running via IIS but runs well through VS2005

I also remember that I solved the issue after configuring Crystal Reports to run as Local Service instead of Network Service in IIS and also by using Integrated Security = True in connection string.

I know this is an old post. but For anyone still looking for the answer:

You need to register crystal reports in page markup

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

Set the property ' Copy to Output Directory' of the report to 'Copy always'

the path of the file in the crystalreportsource will be ~/bin/YOURFOLDER/YOURFILE

<CR: CrystalReportSource ID ="CrystalReportSource1" runat ="server">
            <Report FileName="~/bin/oilmovement/rptOMDayEnd.rpt">
            </Report>
        </CR: CrystalReportSource>

Now the report should work

There is a workaround. If you just copy the RPT files from your development machine and replace the published RPT files at server. That will solve the issue.

of-course you also need to install the run-time (v13.0 for VS2010, and 13.0.5 for VS2012)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM