or

Private Class ProcessProgressionColumn Inherits GridViewDataColumn Public Sub New(ByVal UniqueName As String, ByVal fieldName As String) MyBase.New(UniqueName, fieldName) End Sub Public Overrides Function GetCellType(row As Telerik.WinControls.UI.GridViewRowInfo) As System.Type If TypeOf row Is GridViewDataRowInfo Then Return GetType(ProcessProgressionCellElement) End If Return MyBase.GetCellType(row) End Function End Class Private Class ProcessProgressionCellElement Inherits GridDataCellElement Public Sub New(ByVal column As GridViewColumn, ByVal row As GridRowElement) MyBase.New(column, row) End Sub Protected Overrides ReadOnly Property ThemeEffectiveType As System.Type Get Return GetType(GridDataCellElement) End Get End Property Public Overrides Function IsCompatible(data As Telerik.WinControls.UI.GridViewColumn, context As Object) As Boolean Return TypeOf data Is ProcessProgressionColumn AndAlso TypeOf context Is GridDataRowElement End Function Private StateProgress As RadProgressBarElement Protected Overrides Sub CreateChildElements() MyBase.CreateChildElements() StateProgress = New RadProgressBarElement() With {.Maximum = 4} Me.Children.Add(StateProgress) End Sub Protected Overrides Sub SetContentCore(ByVal value As Object) If value IsNot Nothing AndAlso value IsNot DBNull.Value Then Me.StateProgress.Value1 = If(value > 0, value, 0) Me.StateProgress.Value2 = If(value < 0, Me.StateProgress.Maximum, 0) Me.StateProgress.Text = helper.GetDescription(CType(value, Process_Prospection.StatuProspection)) Me.StateProgress.IndicatorElement1.BackColor = If(value <> 4, Color.FromArgb(153, 238, 158), Color.FromArgb(153, 225, 238)) Me.StateProgress.IndicatorElement1.BackColor2 = If(value <> 4, Color.FromArgb(8, 208, 4), Color.FromArgb(4, 187, 208)) Me.StateProgress.IndicatorElement1.BackColor3 = If(value <> 4, Color.FromArgb(4, 208, 51), Color.FromArgb(4, 159, 208)) Me.StateProgress.IndicatorElement1.BackColor4 = If(value <> 4, Color.FromArgb(160, 238, 153), Color.FromArgb(153, 219, 238)) End If End Sub End Class

DateTime StartDate; DateTime EndDate; BuildDate(cboDate.Text, out StartDate, out EndDate); if (cboDate.Text == "Range") { StartDate = new DateTime(dtpStart.Value.Year, dtpStart.Value.Month, dtpStart.Value.Day, 0, 0, 0); EndDate = new DateTime(dtpEnd.Value.Year, dtpEnd.Value.Month, dtpEnd.Value.Day, 23, 59, 59); } using (ProductionService service = new ProductionService()) { DataTable results = service.Report_BillingReport(StartDate, EndDate); results.TableName = "BillingReport"; //results.WriteXmlSchema("C:\\ESS\\ESSProduction\\Reports\\DataSet\\Billingreport.xsd"); Reports.BillingReport water = new Reports.BillingReport(); water.Load(); water.SetDataSource(results); frmReport rpt = new frmReport(); rpt.LoadedReport = water; rpt.StartDate = StartDate; rpt.EndDate = EndDate; rpt.ShowDialog(); }
now i do not believe that i need to set the data source on the click event because the report itself has been attached to the openaccess entity object as will all of the reports. However I am trying to figure out how to use a single reportviewer that has been created for opening multiple different reports I.E. Setting the reportsource for the reportviewer at the click_event and then showing the viewer. Currently where i have my code after reviewing multiple different posts and tutorials mostly for web based applications i have come to the following code:
private void radLabel1_Click(object sender, EventArgs e){ Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource(); instanceReportSource.ReportDocument = new Reports.JobStatusReport(); Reports.ReportViewer f = new Reports.ReportViewer(); f.Show();}
Thanks in advance for the help.