Print Page | Close Window

Export/print failure

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=8571
Printed Date: 01 May 2024 at 8:04am


Topic: Export/print failure
Posted By: dclarkwa
Subject: Export/print failure
Date Posted: 05 Dec 2009 at 12:25pm
I am using VS2008/builtin CrystalDecisions.  My application is ASP.net.  My report displays fine.  I am seting parameters and login in my .cs page, in the page_load event handler like so:

protected void Page_Load(object sender, EventArgs e)

{

if (!Page.IsPostBack)

{

When I try to export or print the report I get the following error:
 
Logon failed. Details: ADO Error Code: 0x Source: Microsoft SQL Native Client Description: Login failed for user 'WacadASPUser'. SQL State: 28000 Native Error: Error in File C:\DOCUME~1\DAVIDC~1\LOCALS~1\Temp\AgencyUtsteinReport {39E5623E-7794-49D8-9CB6-E201B2C70818}.rpt: Unable to connect: incorrect log on parameters.
 
If I delete the if (!Page.IsPostBack) code, I get a "Missing parameter Values" error.
 
Any suggestion will be much appreciated.



Replies:
Posted By: dclarkwa
Date Posted: 05 Dec 2009 at 1:25pm
I solved this by removing the if (!Page.IsPostBack) code and moving the code from the Page_Load event handler to the Page_Init event handler.



Print Page | Close Window