maqskywalker
asked on
Basic Crystal Report not showing up on ASP.NET page
Hi Experts,
I'm using Visual Studio 2013 Ultimate.
I'm using the Customers table of the Northwind SQL Server Database.
I'm using SQL Server 2012.
At this link it shows the different versions of Crystal reports
http://scn.sap.com/docs/DOC-7824?
I installed this version of Crystal Reports
Support Pack 16
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_16.exe
After I installed Support Pack 16, I create a new ASP.NET Empty website using C# as the language.
I created a Crystal report called CrystalReport1.rpt and a page called Default.aspx
My directory looks like this:
My Crystal Report looks like this. I'm displaying the CustomerID, CompanyName, ContactName from the Customers table.
When I click the Main Report Preview tab it looks like this:
The layout of my page called Default.aspx looks like this
The code for Default.aspx looks like this:
The code for Default.aspx.cs looks like this:
But when I run my Default.aspx page I just get a blank page like this:
My crystal report and aspx page can be downloaded here: https://github.com/starbuc k2000/Webs ite2
Anyone why my report is not showing up on the page? Anyone know what I'm doing wrong?
I'm using Visual Studio 2013 Ultimate.
I'm using the Customers table of the Northwind SQL Server Database.
I'm using SQL Server 2012.
At this link it shows the different versions of Crystal reports
http://scn.sap.com/docs/DOC-7824?
I installed this version of Crystal Reports
Support Pack 16
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_16.exe
After I installed Support Pack 16, I create a new ASP.NET Empty website using C# as the language.
I created a Crystal report called CrystalReport1.rpt and a page called Default.aspx
My directory looks like this:
My Crystal Report looks like this. I'm displaying the CustomerID, CompanyName, ContactName from the Customers table.
When I click the Main Report Preview tab it looks like this:
The layout of my page called Default.aspx looks like this
The code for Default.aspx looks like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ 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" ReportSourceID="CrystalReportSource1" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="CrystalReport1.rpt">
</Report>
</CR:CrystalReportSource>
</div>
</form>
</body>
</html>
The code for Default.aspx.cs looks like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
But when I run my Default.aspx page I just get a blank page like this:
My crystal report and aspx page can be downloaded here: https://github.com/starbuc
Anyone why my report is not showing up on the page? Anyone know what I'm doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi
try to bind your report at "Page_Init"
for me i bind my report at code behind
try to bind your report at "Page_Init"
for me i bind my report at code behind
mlmcc