Solved

Basic Crystal Report not showing up on ASP.NET page

Posted on 2016-08-20
4
124 Views
Last Modified: 2016-08-26
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 directory
My Crystal Report looks like this. I'm displaying the CustomerID, CompanyName, ContactName from the Customers table.

my crystal report
When I click the Main Report Preview tab it looks like this:

main report preview tab
The layout of my page called Default.aspx looks like this

my Default.aspx page layout
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:

when I run my page

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?
0
Comment
Question by:maqskywalker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 41763763
Did you install the r8untimes on the server?

mlmcc
0
 
LVL 1

Author Comment

by:maqskywalker
ID: 41763774
Yes. I installed this version of the runtime

p5.png
0
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 41763971
If I use IE I get an exception bobj is undefined (line 75 column 1)

HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR)GET - http://localhost:2902/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style.css
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
GET - http://localhost:2902/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js
SCRIPT5009: 'bobj' is undefined Default.aspx (75,1)
SCRIPT5009: 'bobj' is undefined Default.aspx (60,3)

Big discussion here https://scn.sap.com/thread/3824701

One workaround was uninstall .net framework 4.6.1, you will have to reinstall .net 4.0-4.5
0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 41764078
Hi
try to bind your report at "Page_Init"

for me i bind my report at code behind
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question