Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Problems with CR & ODBC Post Reply Post New Topic
Author Message
Duke_Quakem
Newbie
Newbie
Avatar

Joined: 29 Oct 2008
Location: Chile
Online Status: Offline
Posts: 2
Quote Duke_Quakem Replybullet Topic: Problems with CR & ODBC
    Posted: 29 Oct 2008 at 2:34pm
First of all, I want to say hello to y'all. tryin' to find a solution to my problem I got here...

I have a website created using VS2005 C# and Crystal Report 10 that comes with it. The reports are using a DNS connection string ("DSN=myDsn;UID=myUser;PWD=myPass") that works perfectly in the deployment computer.

Also, If I put the site on the server, If I use the Server's IE the report comes out without any trouble.

But, when I try to see the report from another computer, I get this login screen that ask me the user & password, even if I had set them earlier in the Conn string... (the img shows what screen I get)Cry

http://img233.imageshack.us/img233/5743/crgx5.jpg

I don't know if that cause some security issues that can be fixed unisg web.config, or is it cause I'm missing something in the CR? I have tried to force the connection by code, but I can't figure how to do that.

Thx in advance 4 ur help
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Oct 2008 at 11:28pm
My initial idea is that the impersonation account for your website isn't an authorized user for SQL. Possibly there is a firewall security where someone on an outside IP can't query the database? I think it's definitely a security problem, but I can't say what part is breaking down.
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
Duke_Quakem
Newbie
Newbie
Avatar

Joined: 29 Oct 2008
Location: Chile
Online Status: Offline
Posts: 2
Quote Duke_Quakem Replybullet Posted: 30 Oct 2008 at 5:46am
In the website I use the same ODBC to populate some Gridviews and insert/update data into the DB (wich is Oracle. I forgot to tell that on my last post), and those forms works perfectly, so I'm pretty sure it's not the account's privilieges.

It seems CR does not allow to remote computers access thruought the ODBC into the DB, because as I said earlier, when I use the Server's borwsers (FF and IE), the report shows fine. The problem is when I try to see the report using the browser from another computer that is not the server itself, that's when I get that screen.

So far I tried to load the CR adding these lines in the .cs file:

protected void Page_Load(object sender, EventArgs e)
{
    doc.Load(Server.MapPath("report.rpt"));
    doc.SetDatabaseLogon("user","password","databaseName.world","",true);      
    CrystalReportViewer1.ReportSource = doc;
    CrystalReportViewer1.DataBind();
}

Getting the same issue. Later I tried using a .dns file and with that I can override the problem and the report shows on all browsers (server and clients) without getting that annoying screen. So I'm thinking in use that option.

Now, the new (darned) problem I have is that on development enviroment (the local server I use to test the sites I made) the website is in one direction (C:/Inetpub/wwwroot/website), but on it's final destination the website will be allocated in another path (D:/wwwprod/website). żDo you know if there is a way to set the .dns file path dinamically by code?




Edited by Duke_Quakem - 30 Oct 2008 at 5:52am
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.016 seconds.