Jump to content
Sign in to follow this  
pulpfiction

Crystal Report

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.... :)

Share this post


Link to post
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.

Share this post


Link to post
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....."

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

really? I use stored proceudures with temp tables with CR 11 a lot. What error do you get?

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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. :)

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

you could call you SP from Add Command

YourSP {?crParam}

something like that

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...