cancel
Showing results for 
Search instead for 
Did you mean: 

Logon Error for Crystal Report Viewed by User When Not Included In App

Former Member
0 Kudos

I have a Visual Basic 2008 SP1 application and I'm using Crystal Reports 2008 SP0 (with FP1 + 2). I have about 50 reports using integrated security that are all "embeded resources" in the application. When I want to print one of these reports I use code like this:

PrintReports(New MyEmbededReport)

And in my PrintReports routine it just creates a new instance of a form that has the report viewer control on it and passes the report over to it. This works GREAT and I can embed all my reports right into the app and call them when I need them.

Recently however I've had the need to add some custom reports that may change more often then the app changes so I need a way for users to access their reports without a new version of the app being pushed out. So I made a routine that lets me store the actual Report.rpt file into SQL and when a user goes to run it the report is pulled out of the database and saved into their temporary files and then passes it back to my PrintReports routine as a ReportDocument. This also works fine but only on my machine. On the client machines it asks for the login information and no combination will work. I've tried multiple ways of getting around it and have spent hours trying examples found on the internet including assigning the login information before preview, running through and assigning the login information to each table, I've gone through the "Using Integrated and SQL Autentication in .Net Applications" guide, turning on and off integrated security. Nothing seems to work.

What else is there to try? As a very last resort I will have to store the reports into the app like the other ones but I'm really trying not to do this.

-Allan

View Entire Topic
former_member183750
Active Contributor
0 Kudos

I think the simplest and possibly quickest way to find out what's going on, will be to install the CR designer on the user's computer - just for testing purposes. The you can load the report into the designer from the "temporary files" that you saved it to and see if the report runs there. You will either get an error, possibly a better error than at runtime, or the report will work. Either will be a good piece of the puzzle. If you wish, you can download an eval of CR 2008 from here;

http://www.businessobjects.com/forms/default.asp?id=701600000009BXP

Ludek

Former Member
0 Kudos

Ludek,

Your suggestion helped a little although now I'm more confused. I installed CR2008 onto a client machine that logs in with a different login them myself and then ran my app. I launched the report form within my app and watched as it added a "ReportFromSQL.rpt" file into the temp directory (name is example of course) and popped up the login screen. I then made a copy of this file and closed my app (and it deleted the original as it should). So I opened up the copy in CR 2008 and it opened fine. I then clicked Preview and it popped up the "OLE DB Provider - Select a provider form the list or select a data link file." screen. If I select "Microsoft OLE DB Provider for SQL" then pick the server, click "Integrated Security", and click the database it works fine. It's like the report lost it's connectiong information if thats possible?

Not sure if this matters also....all the reports that are part of the app were built within VS2008, these extra reports that are being put into SQL were built within CR 2008. Is there some way they're losing there connection info and if so I how do I prevent this?

-Allan