or
| Partial Public Class JuvenileAges |
| Inherits Telerik.Reporting.Report |
| Public Sub New() |
| InitializeComponent() |
| Dim datatable As DataTable = datatable returned from business class |
| Me.DataSource = datatable |
| End Sub |
| End Class |
| <telerik:reportviewer id="ReportViewer1" runat="server" height="438px" width="760px"></telerik:reportviewer> |
| Dim rptJuvenileAges As New JuvenileAges() |
| ReportViewer1.Report = CType(rptJuvenileAges, Telerik.Reporting.IReportDocument) |
Hi there.
I have a multivalued parameter called of type int called "Person". With that in mind, I have 2 questions:
1. How do I pull the data out programmatically? Basically, I want to do something like this:
foreach (int personId in (List)this.ReportParameters["Person"].Value)
{
myList.Add(personId);
}
I can't quite figure out how to get at the collection and extract the values.
2. Along those same lines, how would I programmatically populate a multivalue parameter?
Thanks, Mike
| namespace Reporting |
| { |
| using System; |
| using System.ComponentModel; |
| using System.Drawing; |
| using System.Windows.Forms; |
| using Telerik.Reporting; |
| using Telerik.Reporting.Drawing; |
| using IRWLReporting_Rules; |
| /// <summary> |
| /// Summary description for Report1. |
| /// </summary> |
| public partial class ActivityRegistrationReport : Telerik.Reporting.Report |
| { |
| public ActivityRegistrationReport() |
| { |
| /// <summary> |
| /// Required for telerik Reporting designer support |
| /// </summary> |
| InitializeComponent(); |
| try |
| { |
| this.ReportParameters["ActivityId"].UI.AvailableValues.DataSource = new Reporting_Rules().GetActivityDataForReportParamDropdown(); |
| } |
| catch (Exception ex) |
| { |
| throw ex; |
| } |
| } |
| private void ActivityRegistrationReport_NeedDataSource(object sender, EventArgs e) |
| { |
| Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender; |
| report.DataSource = new Reporting_Rules().GetActivityRegistrantsForActivityReport(Convert.ToInt32(report.Parameters["ActivityId"])); |
| } |
| } |
| } |