Print Page | Close Window

connection error

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=168
Printed Date: 19 Apr 2024 at 8:20am


Topic: connection error
Posted By: vlntine82
Subject: connection error
Date Posted: 26 Jan 2007 at 1:25pm
I am trying to connect to a Crystal Report 10 from a web application written in VB.NET.  It will connect  correctly if I hardcode the path like C:\reportname.rpt, but when I try and put in the web path it will not work.  It says "unspecified error".  I have tried changing the direction of the slashes from / to \, but still get the same error.  Below is the code I am using to write the path. 

crDoc.Load("http://" & LCase(Request.ServerVariables("SERVER_NAME")) & "/prGraph.rpt")

Does anyone know how to fix this?



Replies:
Posted By: BrianBischof
Date Posted: 26 Jan 2007 at 1:43pm
Have you tried Server.MapPath()? Also, you can have problems with running web apps under the file system method (where it puts the :9999) in the URL. There is a fix for this if you upgrade to VS SP1 and set the root folder, but I haven't tried it yet.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: vlntine82
Date Posted: 31 Jan 2007 at 7:50am
I was able to use crDoc.Load(Server.MapPath(HttpRuntime.AppDomainAppVirtualPath) & "\pr\prGraphMean.rpt") to get the report to load; however, instead of the graph displaying it is just listing the name of the crystal report object like below

CrystalReportViewer - CrystalReportViewer1

Any thoughts?


Posted By: BrianBischof
Date Posted: 31 Jan 2007 at 8:51am
Hmmm.. I've seen this before, but don't remember how to resolve it. I think it's either an installation problem (try reinstalling on the server) or a permission problem where you can't reference the charting DLL. Try reinstalling to make sure all the DLLs are there and you have permission to access them.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window