I am using a dataset (.xsd) as the datasource for my crystal report. I am populating my dayaset without using the database (i.e. I am using an array to populate the dataset). But when I am running my application, it is Database Login poping me the dialog to enter the database details. Donno why? The following is theprocedure how I am going about: 1> Added a New DataSet Item namely SampleDataset.xsd 2> Added an Element from the toolbox and named it "PricingTable" and added columns to it Pric1, Pric2, Pric 3 3> Added a report namely "SampleCrystalReport.rpt" and added the datasource from the DatabaseExpert -- ProjectData > ADO.NET DataSet > SampleDataSet > PricingTable and added it to Selected Tables and grouped on Pric3. Then designed the Crystal REport 4> In the Form1 OnLoad, wrote the following code: try { string[,] arrTotData = new string[,]{ {"101","Test Account 1","12/12/2004","01 / Opttion","01 Plan 1"}, {"101","Test Account 1","12/12/2004","01 / Opttion","01 Plan 2"}, {"101","Test Account 1","12/12/2004","01 / Opttion","01 Plan 3"}, {"101","Test Account 1","12/12/2004","01 / Opttion","01 Plan 4"} }; SampleDataset dSet = new SampleDataset(); int iNumOfPlans = 3; string[] arrData = new string[arrTotData.Length/4]; for(int iCtr = 0 ; iCtr < iNumOfPlans; iCtr++) { for(int i = 0 ; i<arrTotData.Length/4; i++) { arrData[i] = arrTotData[iCtr,i].ToString(); } dSet.Tables[0].Rows.Add(arrData); } if(dSet.Tables[0].Rows.Count < 1) { MessageBox.Show("No Data found in the dataset"); } else { SampleCrystalReport cReportdSet = new SampleCrystalReport(); //MessageBox.Show(""+cReportdSet.DataDefinition.GroupNameFields.ToString()); crystalReportViewer1.ReportSource = cReportdSet; crystalReportViewer1.Visible = true; } } catch(Exception ex) { MessageBox.Show("ERROR : "+ex.Message); } Please Help. Please let me know where I am going wrong. |