Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: connection error Post Reply Post New Topic
Author Message
vlntine82
Newbie
Newbie


Joined: 05 Dec 2006
Online Status: Offline
Posts: 18
Quote vlntine82 Replybullet Topic: connection error
    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?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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>
IP IP Logged
vlntine82
Newbie
Newbie


Joined: 05 Dec 2006
Online Status: Offline
Posts: 18
Quote vlntine82 Replybullet 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?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.035 seconds.