Answered by:
Reports seems to work... but don't

Question
-
Hi everyone,
My problem is that I'm trying to run a Crystal Report through VS 2013, and display it on the web in a web form. The code seems sound and the Designer shows the report, but when I run it in a browser, I get a blank page.
There are no errors... just a blank page. Can anyone give me an idea of why this might be happening? Here's the code to the page:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CrystalDecisions.CrystalReports.Engine; namespace test5noBuildChange { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ReportDocument reportdocument = new ReportDocument(); reportdocument.Load(Server.MapPath("CrystalReport1.rpt")); reportdocument.SetDatabaseLogon("THISISRIGHT", "THISISRIGHT", "THISISRIGHT", "THISISRIGHT"); CrystalReportViewer1.ReportSource = reportdocument; } } }
and here's the markup:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="test5noBuildChange.WebForm1" %> <%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" Height="1202px" ReportSourceID="CrystalReportSource1" ToolPanelWidth="200px" Width="1104px" /> <CR:CrystalReportSource ID="CrystalReportSource1" runat="server"> <Report FileName="CrystalReport1.rpt"> </Report> </CR:CrystalReportSource> </div> </form> </body> </html>
- Moved by Kristin Xie Monday, October 20, 2014 8:14 AM
Friday, October 17, 2014 10:45 PM
Answers
-
Hi thanZan,
This forum is to discuss problems of C# development. Your question is not related to the topic of this forum.
You can consider posting it in Crystal report forum for more efficient responses. Thanks for your understanding.
Have a nice day!
kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Monday, October 20, 2014 8:14 AM
All replies
-
Should you have a SetDataSource? See the link below.
http://chanmingman.wordpress.com/2007/02/14/using-dataset-with-crystal-decision/
chanmm
- Proposed as answer by chanmmMVP Saturday, October 18, 2014 2:58 AM
Saturday, October 18, 2014 2:58 AM -
Hi thanZan,
This forum is to discuss problems of C# development. Your question is not related to the topic of this forum.
You can consider posting it in Crystal report forum for more efficient responses. Thanks for your understanding.
Have a nice day!
kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Monday, October 20, 2014 8:14 AM