Jump to content

Crystal Report


pulpfiction

Recommended Posts

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

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

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

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

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

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

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

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

  • 4 weeks later...

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

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

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

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
Its 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

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

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

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 Command
Are 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...