Dim rptDoc As New ReportDocument Dim ds As New DataSet1 Dim sqlCon As SqlClient.SqlConnection Dim dt As New DataTable dt.TableName = "Crystal Report Example" sqlCon = New SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\TrainingPlanDatabase.mdf;Integrated Security=True;User Instance=True") Dim da As New SqlClient.SqlDataAdapter("Select CourseTitle, CourseCode,TargetAttendees,TotalBatches, TotalTrainingHours, discipline, TotalExpenses, Year, TotalExpensesUSD, Attendees2, Batch2, TotalTrainingHours2, TotalExpenses2 from tblTrainingPlan", sqlCon) da.Fill(dt) ds.Tables(0).Merge(dt) rptDoc.Load(Server.MapPath("CrystalReport3.rpt")) rptDoc.SetDataSource(ds) CrystalReportViewer1.ReportSource = rptDoc Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo Dim p_code As New ParameterField p_code.Name = "Year" Dim p_CourseCode_Value As New ParameterDiscreteValue p_CourseCode_Value.Value = Me.txtyear.Text p_code.CurrentValues.Add(p_CourseCode_Value) ParamFields.Add(p_code)
The maximum report processing jobs limit configured by your system administrator has been reached.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)