Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Basic Crystal Report not showing up on ASP.NET page

Posted on 2016-08-20
4
Medium Priority
?
204 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 101

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 84

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

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…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

772 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