pulpfiction Posted April 3, 2007 Share Posted April 3, 2007 We had to move a ASP.NET 1.1 application to a new application pool. Now the Crystal Reports are failing.... Thanks.Error:Logon failed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. Link to comment Share on other sites More sharing options...
aspnetguy Posted April 4, 2007 Share Posted April 4, 2007 You need to add a sql login and password in the database connection string. Windows authentication won't work.I feel your pain. I spent 2 weeks trying to make the CR.Net that shipps with Visual Studio work and in the end bought another reporting tool. Since then our company has bought CR XI which is so much better than CR.Net.CR is very fussy about permissions. Link to comment Share on other sites More sharing options...
pulpfiction Posted April 4, 2007 Author Share Posted April 4, 2007 Actually I should have mentioned this, the reports were working fine till we changed the pool. It also uses separate dataset file [.xsd].Struggling with this for the past 2 days.... Link to comment Share on other sites More sharing options...
aspnetguy Posted April 4, 2007 Share Posted April 4, 2007 So, the location of the application did not change just the app pool?In IIS look at the properties of the old app pool and the new one and make sure that both Identity tabs are the same. Link to comment Share on other sites More sharing options...
pulpfiction Posted April 4, 2007 Author Share Posted April 4, 2007 So, the location of the application did not change just the app pool?Yeah its in the same old location...After some online research, found this information, but i dont think this is true for my situation.. guess I need to check the properties of both the pools...."The problem stems from ASP.NET Security and the need of the report document to logon to the database to pull information. This happens if the source for the report data is a DataSet that is structured and is part of the application's classes. The solution is to declare a unique DataAdapter and DataSet and pull the data on the spot....." Link to comment Share on other sites More sharing options...
aspnetguy Posted April 4, 2007 Share Posted April 4, 2007 did you check the app pool properties -> identity tab???Where you originally using the DefaultAppPool and changed it to a custom one? The identity tab on the new one should be the same as the Default one. Link to comment Share on other sites More sharing options...
pulpfiction Posted April 4, 2007 Author Share Posted April 4, 2007 did you check the app pool properties -> identity tab???I dont have access to that server.... so have mailed another guy, waiting for a reply from him... Link to comment Share on other sites More sharing options...
aspnetguy Posted April 4, 2007 Share Posted April 4, 2007 ok, I would be surprised if that is not it. When an app pool is set up you choose the identity it will run as. DefaultAppPool is set to LocalSystem while, on our servers, SharePoint is set to NetworkService. Link to comment Share on other sites More sharing options...
pulpfiction Posted April 4, 2007 Author Share Posted April 4, 2007 Some more confusion to this issue..... seems like all this started off when a new 2.0 application was added in the server. for both 1.1 and 2.0 apps to work, a new application was created and only the 2.0 apps were moved. and the 1.1 application is in the old pool. This removes the chance it could be any security issue. but seems like this could be a bug with CR and .NET. Link to comment Share on other sites More sharing options...
aspnetguy Posted April 4, 2007 Share Posted April 4, 2007 I am afraid I can't help you here. I have never run 1.1 and 2.0 on the same server.Has 2.0 been installed all along or was that recently added? Could be a conflict between which version of CR the app is trying to use. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 1, 2007 Author Share Posted May 1, 2007 After 2 weeks of struggling with CR finally found the work around. its to totally avoid dataset. you need to directly connect with the database [OLE DB]and pull the stored procedure. and add some CR connection info code. Next problem is, one of the stored procedures has temporary table and final data comes from a temp data. CR cannot use that SP. any suggestions? thanks. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 2, 2007 Share Posted May 2, 2007 really? I use stored proceudures with temp tables with CR 11 a lot. What error do you get? Link to comment Share on other sites More sharing options...
pulpfiction Posted May 2, 2007 Author Share Posted May 2, 2007 I use VS 2003 and CR bundled with it. When I add a SP, it appears under "database fields" this SP must be expandable and must show the fields to drag into the report. but its not expandable at all. no [+] appears when SP is added. Also SP ends like SELECT fldname from #temp. Data from different tables are collected in a temp table. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 2, 2007 Share Posted May 2, 2007 okay, I guess I won't be much help on that issue. In CR 11 it allows SP, drag n drop datasource, and direct sql commands then in the designer you can drag all fields returned from the SELECT regardless if it is a temp table or not. Sorry. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 2, 2007 Author Share Posted May 2, 2007 In CR 11 it allows SP, drag n drop datasource, and direct sql commands then in the designer you can drag all fields returned from the SELECTIts the same procedure in CR 9, but temp tables are messing it up. guess there's no other option other than to rewrite the SP. its gonna get really complex. Link to comment Share on other sites More sharing options...
jesh Posted May 2, 2007 Share Posted May 2, 2007 Sorry to butt in here. I've never used Crystal Reports. Do you have to use the Designer to set up your report? Can you programmatically do it in the code instead? Or is the only way to set it up to use the Designer view where it can go in and look at the database structure? If you can programmatically do it, you should be able to specify the columns that your proc is returning even if they come from temporary tables. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 2, 2007 Author Share Posted May 2, 2007 No AFAIK, the reports must be designed manually and there's no other way to do that.... Link to comment Share on other sites More sharing options...
aspnetguy Posted May 2, 2007 Share Posted May 2, 2007 does the designer refuse your temp table right away or only at runtime? I set up a sample project in VS2003 using hte builtin CR. I setup a connection to Northwind and then added a Sql Command instead of dragging fields from the the Northwind object. create table #Yaks(yakColor varchar(50) , yakName varchar(50))insert into #Yaksvalues('brown','Tibetan')select * from #Yaks Link to comment Share on other sites More sharing options...
pulpfiction Posted May 2, 2007 Author Share Posted May 2, 2007 Problem is after I select the SP....... i select the SP in the "database expert" [ole db (ado)] when I select the SP in the expert window is gets added but there are no fields in it. then added a Sql CommandAre you telling about the "add command" under OLE DB. but the query I use requires parameters, how can I do that? Thanks. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 2, 2007 Share Posted May 2, 2007 you setup the parameters in the Add Command dialog.Take a look here for so info on passinf in parameters to your reporthttp://forums.microsoft.com/MSDN/ShowPost....33&SiteID=1 Link to comment Share on other sites More sharing options...
pulpfiction Posted May 4, 2007 Author Share Posted May 4, 2007 This adding parameter I can use in the report but cannot use it in SP parameter.Say if the query is like this. SELECT fldname FROM tlb WHERE id=@param.how can I give the value for @param Link to comment Share on other sites More sharing options...
aspnetguy Posted May 4, 2007 Share Posted May 4, 2007 you could call you SP from Add Command YourSP {?crParam} something like that Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now