C# .NET VS.NET 2003 CrystalReports CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed

I bring this problem to your attention only after thoroughly attempting every implementation I could find in this forum and on the web elsewhere -- I'm stumped!

Everything seems to be working, including making a database connection and populating my dataset.  I've attempted to implement both an OleDB solution and a SqlConnection solution in both a ReportDocument and CrystalReportViewer flavors.

Each time the result is this same Logon failed error.

I have a SQL statement that returns a recordset that I am successfully filling into a DataTable in a DataSet.  There are no logon problems obtaining this DataSet.

I used the results of this query to create an .xsd model that I have named GroupRecMinutesByIT.xsd.  I did this so that when I created my Crystal Report this DataTable would be available for me to choose inthe Project Data --> ADO.NET DataSets folder on the Data tab in the Standard Report Expert dialog.

One major thing I don't understand about a "login" error is how I can possibly log into a table that doesn't exist in the database schema.  There's a lot I don't undersand about this right now, so at this initial point I'll just insert my .xsd file in case there's something obviously wrong with it.

Thanks for your help!

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="GroupRecMinutesByIT" targetNamespace="http://tempuri.org/GroupRecMinutesByIT.xsd"
     xmlns:mstns="http://tempuri.org/GroupRecMinutesByIT.xsd" xmlns="http://tempuri.org/GroupRecMinutesByIT.xsd"
     xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
     attributeFormDefault="qualified" elementFormDefault="qualified">
     <xs:element name="GroupRecMinutesByIT" msdata:IsDataSet="true">
               <xs:choice maxOccurs="unbounded">
                    <xs:element name="GroupRecMinutesByIT_dt">
                                   <xs:element name="Child_ID" type="xs:int" minOccurs="0" />
                                   <xs:element name="First_Name" type="xs:string" minOccurs="0" />
                                   <xs:element name="Last_Name" type="xs:string" minOccurs="0" />
                                   <xs:element name="Group_ID" type="xs:int" minOccurs="0" />
                                   <xs:element name="Group_Number" type="xs:int" minOccurs="0" />
                                   <xs:element name="Description" type="xs:string" minOccurs="0" />
                                   <xs:element name="Bar_Display_Color" type="xs:string" minOccurs="0" />
                                   <xs:element name="Yij" type="xs:double" minOccurs="0" />
                                   <xs:element name="Grade_Equivalent" type="xs:double" minOccurs="0" />
                                   <xs:element name="Age_Equivalent" type="xs:double" minOccurs="0" />
                                   <xs:element name="Regroup_Value" type="xs:string" minOccurs="0" />
                                   <xs:element name="Classroom_Description" type="xs:string" minOccurs="0" />
                                   <xs:element name="Classroom_Status" type="xs:string" minOccurs="0" />
                                   <xs:element name="School_Name" type="xs:string" minOccurs="0" />
                                   <xs:element name="Full_Name" type="xs:string" minOccurs="0" />
                                   <xs:element name="tmmf" type="xs:int" minOccurs="0" />
                                   <xs:element name="tmcf" type="xs:int" minOccurs="0" />
                                   <xs:element name="cmmf" type="xs:int" minOccurs="0" />
                                   <xs:element name="cmcf" type="xs:int" minOccurs="0" />
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If I follow correctly you can get the data into the dataset right?

if thats true even if you can't set the datasource of the report at design-time, why not just do it at run-time.

rpt.SetDataSource(ds.table("yourtablenamehere")) // where rpt is a ReportDocument
//you also may need a .DataBind on your viewer

you don't have to fool around with dataadapters or connections for the Report since you have the data in the dataset.  

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smoogaAuthor Commented:
Thanks for your point!  I didn't need to .DataBind, but I did need to do a few things to get it to work properly.  I did need to create the .xsd file in order to have the dataset fields around which to build the report.  When I created a new instance of the dataset schema, it automatically created a datatable within it named GroupRecMinutesByIT_dt.  Then when I was generating my actual datatable and adding it to the dataset, I wound up with my newly added table as Table[1] (named "Table" cleverly by .NET).  Here's the code behind from the .aspx page containing the CrystalReportViewer I used to successfully generate and display the report.

protected CrystalReportViewer CrystalReportViewer1;
private GroupRecMinutesByIT xsdDataSet = new GroupRecMinutesByIT();
private void Page_Load(object sender, System.EventArgs e)
     int iClassroomID = (int) Session[ "Classroom_ID" ];
     DataManager myDataManager = new DataManager( iClassroomID, "Monday" );
     DataTable dt1 = new DataTable();
     dt1 = myDataManager.GetClassroomData();
     // Load the table into the DataSet and name it
     xsdDataSet.Tables[0].TableName = "GroupRecMinutesByIT_dt";
     // Assign DataSet to Report
     ReportDocument rpt = new ReportDocument();
     CrystalReportViewer1.ReportSource = rpt;
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.