Link to home
Start Free TrialLog in
Avatar of maqskywalker
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:

User generated image
My Crystal Report looks like this. I'm displaying the CustomerID, CompanyName, ContactName from the Customers table.

User generated image
When I click the Main Report Preview tab it looks like this:

User generated image
The layout of my page called Default.aspx looks like this

User generated image
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>

Open in new window


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)
    {

    }
}

Open in new window



But when I run my Default.aspx page I just get a blank page like this:

User generated image

My crystal report and aspx page can be downloaded here:  https://github.com/starbuck2000/Website2


Anyone why my report is not showing up on the page? Anyone know what I'm doing wrong?
Avatar of Mike McCracken
Mike McCracken

Did you install the r8untimes on the server?

mlmcc
Avatar of maqskywalker

ASKER

Yes. I installed this version of the runtime

User generated image
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi
try to bind your report at "Page_Init"

for me i bind my report at code behind