One column is missing in crystal report using dataset
I have a stored procedure and a data set i am filling this data set using stored procedure , when i execute the stored procedure in sql server but when i place the crystal report in the page it is missing one column i check the data type and in stored procedure it is coming , what can be wrong ??


Raja TRank #685 · 3.5K reputationPosted Nov 12, 2015, 1:39 AM EST
// Create a data table with the same name of crystal report's table. demoTable = new DataTable("table1"); // Create table columns with the same fields name of crystal report's table. demoTable.Columns.Add("Name"); demoTable.Columns.Add("Age"); demoTable.Columns.Add("Address"); demoTable.Columns.Add("Phone"); // Adding 1000 rows to the data table for (int index = 1; index 1000; index++) { Random rnd = new Random(); // Create a data row of the created table. DataRow row = demoTable.NewRow(); // Assign values to each cell. We can assign any type of data to // the cell (object type) row["Name"] = "Prathap"; row["Age"] = rnd.Next(10,100); row["Address"] = "Trivandrum"; row["Phone"] = "954712449198"; demoTable.Rows.Add(row); } // Create instance of the crystal report. CrystalReportDemo report = new CrystalReportDemo(); // Set data source to the crystal report. If the report contains multiple // datatables, then we can index each tables by using the table // name. Following code explains how table name is used for indexing. report.Database.Tables["table1"].SetDataSource((DataTable)demoTable); // Assign the report to the Crystal report viewer. crystalReportViewer.ReportSource = report;Danish HabibRank #2,024 · 715 reputationPosted Nov 12, 2015, 2:18 AM EST
Danish HabibRank #2,024 · 715 reputationPosted Nov 13, 2015, 1:08 AM EST