Print Page | Close Window

An Crystal Report Error when Embedded with ASP.Net

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2093
Printed Date: 16 Apr 2024 at 1:42pm


Topic: An Crystal Report Error when Embedded with ASP.Net
Posted By: azharrahi
Subject: An Crystal Report Error when Embedded with ASP.Net
Date Posted: 21 Jan 2008 at 1:33pm
I am working on a ASP.Net web site in 2.0. Now I create a CrystalReportViewer on a page and allocate its ReportSource to CrystalReports2. On Design time the report works fine and get connected to DB. But when I run that page containing CrystalReportView which contains the above Crystal Report, it throws the following error.

Logon failed. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user 'sa'. SQL State: 42000 Native Error: Error in File C:\DOCUME~1\RAHI-4~1\ASPNET\LOCALS~1\Temp\CrystalReport2 {814B9C6D-3262-460D-A4CC-F05EAAF322FB}.rpt: Unable to connect: incorrect log on parameters

However the page does not fail and show the CrystalReportViewer. The above error is shown above the CrystalReportViewer. Also one more thing, as I dont know whether it is true or wrong, I have not passed the connection string to the Crystal Report on runtime. Is this the reason of above error or anyother reason? Also if this is the reason, then how can I pass the connection string to the Crystal Report on runtime?


-------------
Azhar Rahi
Web Developer
PTI, USA



Print Page | Close Window