Hi everyone,
I am deploying a custom winform application that will use a database table to lookup reports that a user is allowed access to.
The table is just 3 fields
rptID, rptName, and rptDescription
On load of the Report Form I query the database using the users ID and pull in the 3 fields above to create a group of radio buttons on the form.
What I need to be able to do is then load another form with a reportviewer on it when the user selects a radio button.
Is there anyway to take the string value of rptName and dynamically load it into the ReportViewer on the called form?
I am using instancereportsource with a compiled DLL of reports.
I can hard code the reports and use a Select Case on reportname but I would rather have it be dynamic so that I can add reports later on after the application is deployed by just replacing the reports DLL file.
The code I currently use for the hard coded select case is
Select Case ReportName
Case "IncidentListingReporting"
Dim FullnameRpt2 As New Telerik.Reporting.InstanceReportSource
FullnameRpt2.ReportDocument = New Reporting.IncidentListingReport
FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("SDate", Param2))
FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("EDate", Param3))
FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("PNUM", Param4))
ReportViewer2.ReportSource = FullnameRpt2
End Select
What I would like is to be able to do something like
FullnameRpt2.ReportDocument = Param1
Thanks for any help!
I am deploying a custom winform application that will use a database table to lookup reports that a user is allowed access to.
The table is just 3 fields
rptID, rptName, and rptDescription
On load of the Report Form I query the database using the users ID and pull in the 3 fields above to create a group of radio buttons on the form.
What I need to be able to do is then load another form with a reportviewer on it when the user selects a radio button.
Is there anyway to take the string value of rptName and dynamically load it into the ReportViewer on the called form?
I am using instancereportsource with a compiled DLL of reports.
I can hard code the reports and use a Select Case on reportname but I would rather have it be dynamic so that I can add reports later on after the application is deployed by just replacing the reports DLL file.
The code I currently use for the hard coded select case is
Select Case ReportName
Case "IncidentListingReporting"
Dim FullnameRpt2 As New Telerik.Reporting.InstanceReportSource
FullnameRpt2.ReportDocument = New Reporting.IncidentListingReport
FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("SDate", Param2))
FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("EDate", Param3))
FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("PNUM", Param4))
ReportViewer2.ReportSource = FullnameRpt2
End Select
What I would like is to be able to do something like
FullnameRpt2.ReportDocument = Param1
Thanks for any help!