reportDocument.SetDatabaseLogon does not work

Note: using VS2005/Crystal 8.5

I have created a report in Crystal and I am using the CrystalReportViewer control to display this report on an ASP page.  I get the impression from read around the 'net that I perhaps should be passing a dataset to the report, but currently I've got all the data access happening in the report (via an ODBC link to an SQL server)

Trouble is, when I use the SetDatabaseLogon method it still prompts me for a username and password.  The database fields are filled out however.  When I provide my username/password it ONLY works if I tick the 'Use Integrated Security' option. 

I'm figuring that I somehow have to tell the SetDatabaseLogon method to use integrated security, but I can not find any references to this on the web. Can anyone here assist?



3/7/2007 1:08:34 AM 7043 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 53

I tried switching to OLE DB and this worked without getting the login prompt, however it killed some of my sub reports.

I switched back to ODBC and added this code after the SetDatabaseLogon call.  It now works just fine.

foreach (CrystalDecisions.Shared.IConnectionInfo connection in reportDocument.DataSourceConnections)


connection.IntegratedSecurity =


for (int i = 0; i < reportDocument.DataSourceConnections.Count; i++)


reportDocument.DataSourceConnections[i].SetConnection(servername, databasename, username, password);




3/9/2007 3:35:07 AM

I'm having exactly the same problem.  Reports have OLE DB connections pulling data directly from the database.  Works fine on my development box when I use the ReportDocument.SetDatabaseLogon().  When I publish to the server, I get a database logon prompt, pre-filled with the fields from my SetDatabaseLogon call.  Then, no matter what I click it does nothing....


3/14/2008 6:18:18 PM

Similar Artilces:

Converting Crystal Reports 9 report to Crystal Reports .NET report
I have a web page that is supposed to display a crystal report.  The report is fully written and functional in crystal 9 (non-.Net)  .  Is there a way to convert my .rpt so that I can just include it in the new web site? why you don't try to compile project with .net and include your report. then if crystal report is power tool will suggests you with conversation tool    My blog is here.Please remember to 'Mark as Answer' if this post answered your question! Wow it really was that easy!  I just added the old crystal report into my .NET proj...

crystal reports .net -> crystal reports .net 2003
recently converted a project from .net to .net 2003. The 2 crystal reports I had in the project do not load when executing the application. The project itself within 2003 will allow me to multiplat the crystal reports, however when it comes to execution time I get the error: Invalid Data Source. If this isn't the right forum please point me to the right one as this is really the only website I know of with a large reader base. >to multiplat the crystal reports To what the crystal reports? Do you have the same database connections established and verified in your 2003 s...

integration of Crystal Report with .NET ; crystal report viewer not displaying in Toolbox
Hi I m new to Visual Web Developer 2005 Express Edition. I want to integrate Crystal Report with .NET. In my Toolbox , Crystal Report Viewer is not displaying. How to make it possible? + How to call my report from 2.0. Need source code plz.*Share Knowledge Every TIME Crystal Reports for .NET does not come with VWD Express.  It only comes with VS 2005 Professional (I'm not sure about the Standard edition).If you have Crystal Reports 10 or XI, you can installed the .NET libraries for Crystal and then use them within VWD Express, noting that you have to build your reports ...

Cassini, VS.Net and Crystal Reports
Hi,I am working with Win XP home, Cassini and VS.Net.I would like to play with some Crystal Reports.I create the report in VS as CrystalReport1.I put a CrystalReportViewer on my web form. It does not get recognized as a defined object type but there are no build errors.When I run the app I get an error: Type 'CrystalReport1' is not defined.I have googled on this and see several things people have suggested/tried to correct this. Most I have already tried or the suggestions are not very clear to me. Then I came across a msg that instructed me to set up virtual directories for IIS for CrystalR...

VS .net 2005 Crystal reports ok to run on Crystal Reports XI?
I am getting mixed messages from the website hosting providers - some say they do not support Crystal Reports due to a $25,000 per cpu licensing fee, others say all I need to do is install Crystal Reports XI (about $500) on a dedicated server and it will run fine. Will Reports developed with the embeded Crystal Reports in VS 2005 run in a Crystal Reports XI environment? Thanks....

Errors with all my reports after upgrade from Bundeled Crystal.NET (VS2003) to Crystal XI Developer for .NET
All my Crystal reports were developed using the bundled Crystal in VS 2003.  I just installed the Crystal XI for .NET Developer version that we purchased and now I get an error when running my reports.  (I am running them in debug mode on my development machine). I have tested it on several different reports.  I did not change the code, this worked fine in the previous version. First I reference my report (AccountList is the AccountList.rpt report that is in my project): Dim myReport As New AccountList Then I start rolling through the report's tables to update the log...

Crystal Reports and MS Reports working fine in Cassini....don't work through IIS
Ok, I have seriously exhausted all options on this one. I have scoured the internet and forums to no avail, contacted my .net architect buddy, looked through books, you name it. I have gotten nowhere. I have seen all kinds of posts sort of like this, but then it would always be quite not what I'm doing and even though I would try all suggestions for those problems, i still would be back at square one.I will try to give as much info as possible on my problem and what I've done to try and resolve it.I have a dock management system where users log in and then schedule times for pickup o...

how to work with XMLSchema.xsd with disconnected dataset using for builiding crystal report
hai! i heard recently we can build crystal reports dynamically through xmlschema.xsd so, how to work with XMLSchema.xsd with disconnected dataset using for builiding crystal report...

Reporting (Crystal Reports vs. Custom .NET)
Ok, so I have to confess, I have never tried Crystal Reports. I just recently started working for a marketing company now and reporting is VERY important to them.  I am currently migrating a lot of the applications they use from VB5 and VB6 to web based .NET 3.5 apps.   The whole company is running off ACCESS databases if you can believe that.  They sometimes have up to a few hundred agents taking sales on incoming calls and chat sessions and they are all getting streamed to FLAT file records (completely un-normalized database).  I am in the process of developing a c...

Crystal Report.NET and nested sub reports
I have a report where i need to have several nested subreports... A parent may have childs and childs may have other childs and so on... CrystalReport.NET and VS2005 seems to support one level of subreport (a report could have a nested subreport but this nested subreport can't have another nested subreport). I really need to handle multiple levels of nested subreports in order to complete my report. What is the solution ???   Thanks   Eviral     I'm not positive if this works but its worth a shot.  Create the subreports as se...

View report from the crystal report server using .NET
Hi,I am first time dealing with crystal report and I having problem with it. I need to use to link to the crystal report server and view the report, but don't know how? Is there a way to do that? or is there any better way to using .net and view report from the crystal report server?Thanks....

Bind crystal reports / sql reports to ADO.NET
Hi,  I'm a beginner trying to find out if it's possible to directly connect an sql report/crystal report to an ADO.NET data set?   It all depends on what version of Visual studio you are using. Here are the steps for VS2005 In VS2005 you need to do the following: 1) Right click on your solution and select add, New Item. 2) Add a dataset and create your queries in the dataset. Make sure you save this dataset or it will not show up later. 3) Add your reportviewer 4) Right click on your solution and select add new Item Again and then add a crystal report 5) In the cr...

Dynamically Calling Crystal Report from .net 2005 with no crystal login
Most of us develop .net applications and will try to integrate thecrystal reports with the applications.  I tried all possbile options,and succesfully implemented them. I would like share some of them withyou all.  Environment Visual Studio 2005 and Crystal Report XI. 1. Create a Crystal Report as usual in Visual studio 2005 .net   using ODBC connection. In this example "CrystalReport.rpt"   2. Create a aspx web form to display the report.  This form will   be a place holder for crystal report. 3. In design mode, drag and drop Crystal Report ...

Creating Reports using Crystal Reports for Visual Studio .NET
Hi i am trying to create a crystal report using C# coding but instead of creating a web application under new project i decided to choose create an website with C#. The problem is i get:- The report you requested requires further information. --------------------------------------------------------------------------------XP\SQLEXPRESS  Server name:    Database name:    User name:    Password:    All data is present except my password when i enter it, it works fine and the report works too with no problems. How do i ...

working with crystal reports
Hi All, I am using crystal reports with, I am feeling certain difficulties while passing parameter from asp page to the report.  Error message is The parameter is incorrect. Can anybody show me how to pass parameter from asp page to crystal reports.  Any code or link to the page will work for me. Thanks in advance. Hi,  Have a look on this link for passing parameters to a crystal report.,SasiPlease remember to click "Mark as Answer" on this post if it helpe...

Web resources about - reportDocument.SetDatabaseLogon does not work -

Resources last updated: 1/11/2016 3:41:09 PM