Hi,
I'm not able to filter data in my subreport. I'm trying to add filters to a report and a subreport with the following code. As you can see, I define a filter for the report according to the value selected in a ASP.NET dropdown control. Filters works fine in report (using fillters.addrange method), but it's impossible for subreport.
(Note I have not added code for subreport filtering, because I tried a lot of different options and didn't work.)
Is there any example to add filters programatically to a subreport, please? I can only see examples for reports...
Thanks in advance. Best regards,
I'm not able to filter data in my subreport. I'm trying to add filters to a report and a subreport with the following code. As you can see, I define a filter for the report according to the value selected in a ASP.NET dropdown control. Filters works fine in report (using fillters.addrange method), but it's impossible for subreport.
Protected Sub Search() Try Dim rs As InstanceReportSource = DirectCast(Me.rviewer.ReportSource, InstanceReportSource) Dim filters As New Telerik.Reporting.FilterCollection Dim filterApoyo As New Filter() filterApoyo.Expression = "=Fields.IdApoyo" filterApoyo.Operator = FilterOperator.Equal filterApoyo.Value = "='" + ddlApoyos.SelectedValue + "'" filters.Add(filterApoyo) Dim repProt As ReportProtocolo = DirectCast(rs.ReportDocument, ReportProtocolo) repProt.Filters.AddRange(filters) Catch ex As Exception Throw ex End Try End Sub(Note I have not added code for subreport filtering, because I tried a lot of different options and didn't work.)
Is there any example to add filters programatically to a subreport, please? I can only see examples for reports...
Thanks in advance. Best regards,