Solved

Basic Crystal Report not showing up on ASP.NET page

Posted on 2016-08-20
4
155 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 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 82

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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