Reputation: 1339
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");
}
Upvotes: 1
Views: 16267
Reputation: 691
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)
Upvotes: 0
Reputation: 1342
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
Upvotes: 0
Reputation: 14161
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 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.
Upvotes: 1