Solved

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

Posted on 2008-09-29
8
243 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
  • 5
  • 3
8 Comments
 
LVL 100

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 100

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
 

Author Comment

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

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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 100

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now