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
Solved

Basic Crystal Report not showing up on ASP.NET page

Posted on 2016-08-20
4
97 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
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 80

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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