Solved

How to add a crystal report to a .net web site

Posted on 2008-09-29
8
248 Views
Last Modified: 2013-11-26
I have created a report in crystal reports XI. The report contains 8 subreports. The main report is not connected to a datasource, but the 8 subreports are each connected to different data sources. I need to be able to add this report to my .net web site. I have added a crystal report viewer to my aspx page and i can see my report in design, but when i go to view my web page i get nothing except a blank screen.  I attached my html code.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TentativeBudget.aspx.vb" Inherits="TentativeBudget" %>
 
<%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Tentative Budget</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <CR:CrystalReportViewer id="CrystalReportViewer1" runat="server" DisplayGroupTree="False" 
            ReportSourceID="CrystalReportSource2" Width="893px" DisplayToolbar="False" Height="757px" />
        <CR:CrystalReportSource ID="CrystalReportSource2" runat="server">
            <Report FileName="\\Scg-misdev\wwwroot\ApplicationReports\content\Depts\Budget\Tentative\BudgetTentative.rpt">
            </Report>
        </CR:CrystalReportSource>
 
</div>
    </form>
</body>
</html>

Open in new window

0
Comment
Question by:SullivanMIS
[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
  • 5
  • 3
8 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 22605993
Is the data source in a different place for the web page than for your development environment?

mlmcc
0
 

Author Comment

by:SullivanMIS
ID: 22607063
Yes it is
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 22607352
You need to either change the data source through Crystal or through your web page.  It is trying to connect to the original data source.

I am not sure how to do it in HTML.

Here is a tutorial on VS2005 Crystal
I believe the part you need is on about page 131.  If not then check the table of contents.
http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

mlmcc
0
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

 

Author Comment

by:SullivanMIS
ID: 22608524
I think this document may be helpful. I will try it and get back to you.
0
 

Author Comment

by:SullivanMIS
ID: 22625196
ok so i went thru adding a crystal report to my web form step by step. I even went thru the section with subreports (page 141) and i am getting the following error: Error in File C:\WINDOWS\TEMP\TentativeBudget {ECE49B1E-91F5-452B-B35D-5C4D82BEE7F1}.rpt:
Access to report file denied. Another program may be using it.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 22626351
What is the code that is causing the problem?

mlmcc
0
 

Author Comment

by:SullivanMIS
ID: 22627515
It stops at line 13 to load the report:

Line 11:         TentativeBudgetReport = New ReportDocument()
Line 12:         Dim reportPath As String = Server.MapPath("TentativeBudget.rpt")
Line 13:         TentativeBudgetReport.Load(reportPath)
Line 14:         Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
Line 15:         myConnectionInfo.DatabaseName = "SC_Budget"
0
 

Author Closing Comment

by:SullivanMIS
ID: 31501231
I found my solution in the VS2005 Walkthroughs.pdf. Not on page 131 but starting around page 9.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

617 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