Troubleshooting Database Login Errors using Crystal Reports with .NET
Published: 23 Jul 2004
Unedited - Community Contributed
Many of the issues addressed on the forums are about logging onto Crystal Reports. This article shows how to debug some of these issues.
by Eric Landes
Average Rating: 
Views (Total / Last 10 Days): 74328/ 53


I participate in a few Crystal Reports centric mailing lists and forums.  One common area of issues I see are problems when logging onto a database in an ASP.NET application.  To help with these issues, I thought I would write this article with some troubleshooting techniques for database logon problems.

I assume that you are familiar with ASP.NET, and Crystal Reports (either .Net or 8.5 and greater).  The databases covered will be SQL Server and DataSets. 


Logon Error when Binding DataSet

Logon Error When Binding a DataSet

I have seen this error posted more than a few times.  And it's a deceiving to some users, because, you shouldn't have to log onto your dataset.  And that statement is true.  You only have to logon when you are filling the dataset.  The first step to troubleshooting this error is to find out exactly what line your code is erroring out on.  Below is some standard code used to fill a dataset, and then to bind it to your report.  I've included an error in this code to show how we might troubleshoot it.

Protected CrystalReportViewer1 As CrystalDecisions.Web.CrystalReportViewer 

Private CrystalReport1 As myReport= New myReport() 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 

Dim objConn As SqlConnection = m_oSystem.OpenConnection() 
Dim strSQL As String = "SELECT a.*, b.Corporation_Name " & _ 
"FROM Projects a, Corporations b " & _ 
"WHERE a.Corporation_ID=b.Corporation_ID " & _ 
"Order By a.Project_ID" 

Dim objDA As SqlDataAdapter = New SqlDataAdapter(strSQL, objConn) 
Dim objDS As myDataset= New myDataset() 
objDA.Fill(objDS, "myDataset") 


CrystalReportViewer1.ReportSource = CrystalReport1 

Since I don't believe a login error can be caused by the dataset, I'm going to make sure that dataset is actually filled.  I might initially think the problem occurs before binding to the viewer.  One method to test this theory would be to use the WriteXML method of the dataset to write an actual xml file to disk.  Put this method in before setting the datasource.  If it works, I know that the problem is either in setting the datasource, or in binding to the viewer.

objDA.Fill(objDS, "myDataset") 



In this particular case however, once I write that file, I discover that it works.  So the problem appears to be in the SetDataSource.  My next method would be to experiment with what I'm setting.  Why not set the datasource to just the dataset without specifying a table?  When I do that, I discover that this solves the problem.  Crystal wants a DATASET, not a DATATABLE.  Seems simple now that we know that, but it's a bit frustrating when you are trying to debug the problem.

LogOnException: Logon failed. when binding to database

Another problem that I've seen mentioned a lot on the message boards involves binding directly to the data via SQL, a Stored Procedure, a view, etc.  The ASP.NET page gives out this error: Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. 

This one is pretty hard to troubleshoot.  When I got this error, I would step through the code in Visual Studio in debug mode. In doing this, I discover no errors are encountered when stepping through the initial code.  I then tried using a technique to log onto all tables in the report documents tables collection.  The code to do this is below:

Dim oReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument()


   Public Sub DoCRLogin(ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
        Dim _applyLogin As New ApplyCRLogin

        ' use ApplyLogin object to apply login info to all tables in CR object
        _applyLogin._dbName = "Northwind"
        _applyLogin._passWord = "CrystalUser"
        _applyLogin._serverName = "(local)"
        _applyLogin._userID = "CrystalUser"

        ' clean up
        _applyLogin = Nothing
    End Sub

Public Class ApplyCRLogin
    Public _dbName As String
    Public _serverName As String
    Public _userID As String
    Public _passWord As String
    Public Sub ApplyInfo(ByRef _oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
        Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = _oRpt.Database
        Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables
        Dim oCRTable As CrystalDecisions.CrystalReports.Engine.Table
        Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
        Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo()
        oCRConnectionInfo.DatabaseName = _dbName
        oCRConnectionInfo.ServerName = _serverName
        oCRConnectionInfo.UserID = _userID
        oCRConnectionInfo.Password = _passWord
        For Each oCRTable In oCRTables
            oCRTableLogonInfo = oCRTable.LogOnInfo
            oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo


    End Sub

End Class

The class ApplyCRLogin has the method that applies the login to each table in the report.  This is instantiated via the DoCRLogin method, which sets the user name, password, server name and database.  In this instance, the login info is the same for all.  A different method would have to be created to accommodate different tables to login.  This seems to solve a lot of login problems similar to what I've mentioned. 

If that still doesn't solve the issue, I've seen folks change from OLEDB to ODBC drivers, along with this login technique.  That seems to solve some tricky login problems as well.


These are a couple of login problems I have seen on the mailing lists.  Keep in mind the object oriented nature of the CR document when working on login problems.  That may help in solving login problems not covered by this article.  I hope this helps, and keep on coding!

User Comments

Title: Load Report Failed   
Name: Chirag Bhandula
Date: 2006-02-17 12:14:48 AM
Hi I am using Crystal Reports for visual studio 2005. I Have to make connections thru wizard. And when i upload my report on server then i just receive a browser on which there is a message, Load Report Failed
Title: Re: C# error reading mysql   
Name: Eric Bos
Date: 2006-02-06 3:30:24 AM
Syed Aftab Hayat,

Did you base your report on a XSD?
In that case your report should not ask you about login, since there should be no reason to login. :S
Makes sense uh?

If you did, make sure you name your datatable you retrieve has the same name as the table in your XSD.

Hope it works
Title: C# error reading mysql   
Name: Syed Aftab Hayat
Date: 2006-02-04 2:04:26 PM
I am trying to use crystal reports to view the MySql db in c# in visual 2003.
1. Trying directly connecting through making a dsn an error occurs when the form of report viewer is loaded. It says unable to load row set.

2. Trying through a data set, the report viewer but gives a login denied error when asks for password, db, uid and server name.

ASAP reply would be appreciated. Thank you very much
Title: Logon errors   
Name: Eric Bos
Date: 2006-02-03 7:37:20 AM
After some hard suffering and thinking I think I figured it out how to bind a dataset to the report.

I will put some sample code (VB.NET):

'create report object
Dim rpt As New ReportDocument
'load the report

'create dataset
dim ds as new DataSet
'get your data
dim dt as DataTable = DatabaseClass.GetSomeQuery()
'add your table to the dataset
ds.Tables.Add (dt)

'this is important : table name = name in your XSD
dt.TableName = "MyTable"
'add the dataSET to the report

'if you have subreports
Dim rptdoc As ReportDocument
'get the subreport
'remember, names are case sensitive
rptdoc = rpt.OpenSubreport("mySubReport")

'create new dataset
ds = new DataSet
'get your data
dim dt as DataTable = DatabaseClass.GetSomeDataForSubreport()
'add your table to the dataset
ds.Tables.Add (dt)
'should match the one in the XSD
dt.TableName= "MySubReportName"

'set the datasource on the subreport

to make this work do the following to your report:
export a XSD from your dataset
use e.g. ds.WriteXMLSchema(yourXSDFile)

then use the XSD as your datasource for your report.

choose datasource: ADO.NET (XML)
filepath: select your XSDFile
check : use dataset from class
and press finish.

drag/drop your fields from your xsd and you're done.

hope this helps
Title: Hot to call crystal report in with vb code (I have already report file)   
Name: venkatesh
Date: 2006-01-27 5:14:13 AM
Hi ,

I create a web application .In my system I have one report file .

shall i call that report file.

If i call crystal report using query (with in a application i create blank report and select databse and table )this application i got putput fine in vb code

even i copyed(out side report) and paste in my application folder.and then what step can i do?

pls give me code.
my email id
Title: Null values in crystal report   
Name: sandy
Date: 2006-01-19 11:51:20 PM
This article is good. I am facing another problem I am binding a dataset with a view and binding that dataset into crystal report. In that view two fields contain null values also, so when i am binding that fields to the report it is showing blank in the place of null fields. how can i avoid that?
Title: Crystal Reports With Multi Tables   
Name: Babu A
Date: 2006-01-02 9:03:58 AM
I Have Created One Report With 2 Tables. I have Passed Connection Info and Filled Data Set, Report Is Appearing as Blank. But Data Existed in the Data Set , Ply Help Me .

Thanks In Advance
Title: how to pass pass query in crytrpt in   
Name: saritha
Date: 2005-12-29 4:19:51 PM
Hi all,
Am saritha am still facing problem with this coz my query contains outerjoin may be due to this am unable to diaply my report so kindly plz try to help me
Title: Crystal Report 9 Logon Error   
Name: Tejas Chonkar
Date: 2005-12-09 7:38:51 AM
Please help me with this error:

I'm having a report in my ASP.Net application with subreports, I'm using SQL Server authentication in my development environment, and Windows Authentication on live server. I'm actually populating a local dataset with the query results from the database and attaching this dataset as the source of the report document, the same is done for all the subreports, The report works fine in development environment but on live server it fails.
Title: Crystal Report 9 Logon Error   
Name: Tejas Chonkar
Date: 2005-12-09 7:34:50 AM
Please help me with this error:
Title: Logon Error when binding dataset   
Name: Pip Danby
Date: 2005-11-15 3:43:51 PM
My similar problems were completely solved, thanks to CR supports by downloading the latest merge modules from

As a note: all articles to this subject recommend that the binding object is a DataSet, not DataTables.
Title: Logon Failed error for DataSets in crystal Report   
Name: venkat
Date: 2005-11-07 12:49:40 AM
I have problem in sending DataSet to Crystal Report.I have created DataSet and when I'm trying to add DataSet to the crystal report,it it asking for connection information Dialog box.Even if I refresh the connection information ,Object reference not set to an instance of an object error is coming,and I am using DataBase on remote machine.This is problem is for all DataSets and all Crystal Reports in my application.This problem is not found in my other application.Please give me solution.
Thanks in advance
Title: Changing Server Name throu DSN   
Name: Ahmad
Date: 2005-10-12 10:13:22 AM
I had no logon problem with that technique but when i changed my database to a new server 'logon problem' retuen back.thanks for your any help
Title: Logon Error When Building a DataSet   
Name: Nauras Jamal
Date: 2005-10-01 4:32:01 AM
I was facing the same problem. Even after trying
CrystalReport1.SetDataSource(objDS.Tables[0]) AND
What i found made it work was:
ReportDocument cReport;
Hope this helps!
Title: Logon Error when Binding DataSet   
Name: Melvin Ramirez
Date: 2005-09-09 5:18:04 PM
Title: create crystal report for   
Name: DuongNga
Date: 2005-07-30 2:41:04 AM
I have been a file report1.rpt. I wants to view file report1.rpt in application web by Please help me
Title: RE: Logon Error Wrok around (By Jonathan)   
Name: Todd Kneib
Date: 2005-06-07 9:55:03 AM
I was have the logon error binding my multitable Dataset to my report (which uses both table). Interestingly, this problem started happening when my company got us new developer boxes. On my old box, the report SetDataSource worked, but on the new box it did not. If I copied the compiled assembly (either compiled on the old or new box) to the old box, it worked fine, but on the new box it had logon issues.
This tells me its a runtime issue.
Having said that, the solution Johnathan suggested works on both boxes, so that change is getting checked in and on to production.
There could be a gotcha with the solution though, if the tables in your dataset are somehow not in the same order as in the report, you may need to do more work, but I would expect it to work.

Thanks Jonathan!
Title: Takes hours to run a crystal report   
Name: rk
Date: 2005-06-06 11:25:41 AM
I have a crystal report in version 1.0).It uses a stored procedure that gets data from multiple tables.It takes just 3 seconds to run from query analyser.The same data takes 1 hr to load on the crystal report.So I not able to understand what's going wrong with my case.
Thanks for any help.
Title: code error   
Name: hossni hendy
Date: 2005-06-06 10:32:18 AM
(System.InvalidOperationException: The ConnectionString property has not been initialized.)
what the error could be for ?
Title: InitializeComponent   
Name: hossni hendy
Date: 2005-06-06 5:22:29 AM
i am creating a form with using c# language, if it's no code error shown and every thing looks fine but there is no connection with the database.
i think the problem with InitializeComponent so how can i test this or how can i figure that out?
Title: It's very Nice Yaaar.....   
Name: Praveen.K
Date: 2005-06-04 4:48:41 AM

It's very nice code. I implemented successfully. Thanks for providing this code. And this is basic problem error. Give different processes and methods for developing Crystal Reports and Runtime Parameters.

Software Developer.
Title: Login ODBC DSN?   
Name: Sandy
Date: 2005-06-02 3:07:33 PM
I cannot get the login information to work and am thinking it is because my report was created using a DSN. Does anyone know how to pass the DSN login information from an ASP.Net page to the report?
Title: Logon Error When Binding a DataSet   
Name: James Tyree
Date: 2005-06-01 4:02:14 PM
I have found that if you create a report using an ODBC DSN, that you cannot switch gears, so to speak, in your code and try and specify SQL Server login info (non odbc/dsn).

Is this correct??

Title: Logon Error Wrok around   
Name: Jonathan
Date: 2005-05-23 10:40:00 AM
Excellent Article... Thanks Jonathan
that error make me sleepless till i found ur article.
assinging setDataSource to individual works fine
i spent for nearly 8 hourse and become semi dead
thanks again.
Title: logon failed using dsn connection   
Name: manisha
Date: 2005-05-04 8:52:46 AM
i m trying to make a crystal report using excel sheet & sql database without dsn it was working ,but for dsn i gave uid,pwd,dsn name... everything still when i run the program ,it is showing me logon failed error, please help me!!!!!
Title: crystal reports with stored procedure for oracle   
Name: Kamy
Date: 2005-05-02 5:52:02 PM
Eric...what are the steps for creating crystal reports .net using stored procedure for oracle.
Title: Reports with Dataset   
Name: SAM
Date: 2005-05-02 5:02:01 PM
How can i create a report by setting the datsource to a dataset.I have a very complex i am thinking not to create a dataset.xsd file.but just create a datset with the query in the code and Bind it to Crystal it possible?if not then when i create a dataset.xsd i need to link the tables in design time.I cannot link it using visual link..since in my query the Joins are complex with expressions.plz help eric.if possible tell me the such i am familiar with crystal reports and datasets.
Title: RE:Crystal Reports Bind Problem   
Name: Eric Landes
Date: 2005-04-28 10:07:46 PM
Have you tried binding to your dataset in design time? Write out your dataset to a file using ds.writexml, then set datasource with that dataset. See if that helps.
Title: Mac   
Name: Crystal report fields
Date: 2005-04-28 4:00:51 PM
I have a crystal report with some 30 fields.for some fields i need to write a separate query to get the record and show them along with these can i do?

thanks in advance
Title: Crystal report Bind Problem   
Name: sameer
Date: 2005-04-28 3:50:22 PM
Hi I have a crystal report which takes datasource from Multiple tables (7 in my case) which i set during design time.Now when I am writing a similar query with few modifications..and binding the crystal report with still takes the query which i created during run even if i change the causes it has no effect on the report.I am using the Following
Title: RE: dynamic parameter   
Name: Eric Landes
Date: 2005-04-26 10:02:55 PM
If you're talking about classic asp, I'm not sure where you can look. However, if this is an application, go to to look at some articles, or check out the community link for some mailing lists that can help also. Since I'm not sure how you're displaying your report, I can't really answer the question here, but check out the mailing lists that have experts also.
Title: dynamic parameter   
Name: sopakiriba Lawson
Date: 2005-04-25 8:35:37 AM
When trying to view my crystal report from ASP i get this error message "Error Occurred on server. -2147217394: Missing parameter values". How do i solve this problem? My report has parameters
Title: nightmare - Crystal Report too wide   
Name: Scott
Date: 2005-04-09 6:40:32 AM
For some reason when I create reports all the sections have a width of 11518. It's readonly so I can't change it and theres nowhere in the wizard where this is specified.

Its driving me bonkers as my reports appear completely off to the right. I can't find anything in the documentation or on the net, surely other people must be having this problem with Crystal Reports and there must be some simple solution cause without it the whole reporting engine is pretty useless.

Sorry, I know this isn't related but since you seem to be one of the few people on the net who seem to be able to make sense of this product maybe you or one of the other readers might have experienced this and found a work around.

Title: RE: Cached reports   
Name: Eric Landes
Date: 2005-04-07 10:24:38 PM
S. I'll look into Cached reports, although that's not currently in the works. Thanks for the complement.
Title: Cached Reports - How do I use them?   
Name: Scott
Date: 2005-04-07 1:49:45 PM
Thats what i was going to ask( as well as giving a complement ). I have been trying to use the Cached features of Crystal Reports but without much luck. Do you have any tips or maybe an article on how this works. Im sure is pretty straight forward but I just can't work it.

Title: nice   
Name: Scott
Date: 2005-04-07 1:44:51 PM
You sir are a legend.

Title: Problem Resolved   
Name: Marius
Date: 2005-03-22 11:14:27 AM
I kind of resolved the problem.

Some say you have to oRpt.SetDataSource(ds), others say oRpt.SetDataSource(ds.Tables[0])...

Well, I say when you have ONLY 1 table in the data set, it expects for a Table, rather than for a DataSet. From TWO tables on, it expects a DataSet.
To be sure and to have a constant design, I introduce another table in the datasource and I ALSO INSERT IT IN THE REPORT, even if I do not use it. I Fill my DataSet with both tables from an SQLCommand, initially setting the XML Schema:
// fill the xmlSchema which should match the DataAdapter's schema
dataSet.ReadXmlSchema(new System.IO.StringReader(strXmlSchema));
//create table mappings
int i = 0;
foreach(System.Data.DataTable dt in dataSet.Tables)
dataAdapter.TableMappings.Add((i == 0)?"Table":("Table"+i.ToString()), dt.TableName);
// fill the DataSet using our DataAdapter
dataAdapter.Fill(dataSet, "Table");

strXmlSchema was necessary to set the name of the tables AND the way the data is presented (for example, I encountered a problem when the XSD contained an AutoCompelte attribute to one of the Fields. When NULL values were encountered, the field was autoincremented... resulting into a false report. I deleted from strXmlSchema those attributes and everything went OK)
The TableMappings were necessary because when filling the DataSet, every Table supplied by the Query (sqlCommand execution) is named in order: Table, Table1, Table2 and so on. Without the Mappings, the DataSet would have contained the tables from the XSD, but empty ones, and some Table, Table1, Table2...

Happy Coding to everyone! (Even if you have to use Crystal Reports :D)
Title: RE: Persistent Logon Failed Error   
Name: Eric Landes
Date: 2005-03-10 10:06:08 PM
Also try Richard Dudley's excellent followup to this at
Title: Persistent Logon Failed Error   
Name: Curt
Date: 2005-03-10 1:09:28 PM
I tried what you listed (in C#), but it seems that no matter what I do I still get a logon error. If you know of any other sources of information regarding this problem, I'd greatly appreciate it.
Title: crystal report db login prompt   
Name: Dave
Date: 2005-03-06 10:02:52 AM
Excellant article! Was having a huge problem setting up a windows .net program on the client. Every report was prompting for a db login. Assigning the ds directly was causing multiple logins. Setting the datasource to ds.tables(0) resolve this issue. Spent 9 hours working on this issue,
became BRAIN DEAD. Again, Excellant article.

Thank you!
Title: Logon Error Wrok around   
Name: Jonathan
Date: 2005-02-04 1:43:12 PM
I still have bad dreams about this problem and the solutions are tough since this error appears for both a lack of proper loging information and permission errors. A work around is to to bind your tables from a dataset at runtime. Using a loop similar to this:

DataSet myDataSet = new DataSet();

CrReport myReport = new CrReport();
for(int i=0; i < crReport.Database.Tables.Count; i++)

CrystalReportViewer1.ReportSource = myReport;

works since all authentication is done when you fill your dataset and not when you load the report. note: this workaround implies that your dataset has a 1 to 1 table mapping with your report. If not things will not display as you would expect. I hope this sets you in right direction...
Title: Can i make Crystal Report Run time   
Name: Pradeep
Date: 2005-01-07 1:37:41 AM
In our Product , we are using Multipul Database and i want to know about can i make crystal report on run time in .net like visual basic.

Title: Logon Error When Binding to a DataSet   
Name: KL
Date: 2004-10-18 4:39:57 PM
I've been having a similar problem which I resolved by emperically deducing the following (No thanks to the myriad of books and help resources that I have.)

If your dataset has only one table, then the ReportDocument.SetDataSource() should be passed a DataTable object.

If your dataset has multiple tables that are linked, then ReportDocument.SetDataSource() should be passed a DataSet object.

Hope this helps someone.
Title: Problem with Databse login   
Name: Chirag Rai
Date: 2004-10-15 2:29:25 AM
i am using Crystal Report 10 & sql server 2000. In report used store procedure via "Add Command" because store procedure has parameters so it will not create parameter automatically. But when i connect from vb .net it will ask password for login and databse name is not display in database text field.
if in store procedure parameter is not theire then its not problem. And if parameter is their but i dont want to pass its value or dont need to pass value.

in report i used store procedure & table both together.

E mail :

please give me suggetion about the problem


Chirag Rai
Title: Logon problem   
Name: DJ
Date: 2004-08-19 2:51:28 AM
I have try to use your technique to log onto all tables code and still appear the logon problem. Could you show me how to use the ODBC driver to login.

Thank you very much
Title: error when binding a code-generated dataset   
Name: AaronC
Date: 2004-08-17 11:46:02 AM
Anyone have an idea what to do if you get login errors when binding a report to a dataset (not table) that isn't pulled from a database? (Because that seems to eliminate the 2 listed problems here)
Title: But what we really want is...   
Name: Roger Hill
Date: 2004-08-17 5:44:29 AM
This is fine as it goes, but doesn't address the real issue, which is that what I as a developer want is an easy way to take a standard Windows DB connection string (as used in .Net SqlConnection etc) and to apply this to a report that takes its data from a database.

This was quite easy to do with VB6 and CR 9. (Once you had spent a month of puzzling over the documentation, then using trial and error to find out that a call to SetTableLocation with the right parameters on each table was sufficient)

Either it is now impossible to do this with VB.Net and CR10, or I haven't managed to find the right function call.

As to why I want to swap the database connection: If it's not obvious (and it should be), consider people like me who want to do automated testing on our apps. Currently this is extremely difficult to do on any part of the app that uses crystal because we cannot easily change the database connection. (Other than doing it by hand on all of our reports, which rather defeats the point of automated testing.)
Title: my program runs fine under the environment   
Name: Simon Li
Date: 2004-08-12 11:56:50 AM
but somehow after I deploy and install the program onto the targetmachine, It will always prompt for user name and password. my report contains tow different datasets, the following is my code.

Dim orpt As New rptEncounter

Dim ds As New DataSet
Dim sqlString As String = "SELECT * FROM Encounter INNER JOIN Patients ON Encounter.PatientID = Patients.PatientID WHERE EncounterID = " & txtEncounterID.Text
Dim da As New SqlDataAdapter(sqlString, SqlConnection1)
Dim frm As New Print
frm.crv.ReportSource = orpt
'frm.crv.SelectionFormula = "{Encounter.EncounterID} = " & Me.txtEncounterID.Text

I have try different method, including using a for loop to assign logoninfos, but doesn't work at all.
Please help me to find out what's wrong with my program. thank you.
Title: Logon Error When PrintToPrinter function   
Name: Bünyamin AKYILDIZ
Date: 2004-08-12 4:00:13 AM
This logon problem is solved for crystalReportViewer.
"CrystalReportViewer1.ReportSource = CrystalReport1;" works fine.
But if you try this code you will get still the logon error "CrystalReport1.PrintToPrinter(1,false,0,0);"
Printing the report directly to printer does not work. :(
Title: Logon Error When Showing Report   
Name: Joseph Wholey
Date: 2004-08-10 9:46:23 AM
Can Crystal .NET show a collection?

In my application, I am working with a set of data that originated in a SQL database, but was resorted, edited, etc by the user and stored in a C# Collection datatype variable.

I created the DataSet to be used with the Solution Explorer, (right-click on the project==>Add New Item===> DataSet), and pointed it to a SQL stored procedure that would have all of the data items which I planned to have present in the later collection, just so that I could have a working report.

In a user control with the reportviewer present, I bound the collection to the report, and then the report to the reportviewer, without erroring on those lines, but when the debugger gets to the last bracket in the Page_Load function of the webform that contains the user control, I get the Logon failed message.

Have I broken any rules in this approach? Should I can the collection into a proper DataSet variable? Should I have designed the report viewer to be directly assigned to the web form?
Title: Logon Error When Binding a DataSet   
Name: Nasimul Gani
Date: 2004-08-06 10:44:42 AM
I has been suffering for sending the dataset to crystal object. Cystal for windows form support CrystalReport1.SetDataSource(objDS) but web form does not support. Now my problems was solved by using CrystalReport1.SetDataSource(objDS.Tables(0)) at crystal object.

Thanks you very much for your excillent support.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-07-12 11:52:33 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search