using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using System.Data.SqlClient; ReportDocument report = new ReportDocument(); SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Suresh\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\Database.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"); string q = "select * from Table1"; SqlCommand cmd = new SqlCommand(q, con); SqlDataAdapter adp = new SqlDataAdapter(cmd); DataSet1 user = new DataSet1(); adp.Fill(user, "users"); report.FileName = Server.MapPath("CrystalReport.rpt"); report.SetDataSource(user); CrystalReportViewer1.ReportSource = report;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)