0
votes

I'm using a Local Report in Report Viewer 2008.

I'm trying to do something I think should be real simple. I have a subreport that I want to do some filtering on. I want to do a skip/take functionality, although I can't even get the most basic of filters working.

The subreport has a matrix. I've tried adding filters to the report datasource (Report -> Data Sources... -> Properties... -> Filters) and to the matrix itself. Unless I do something like =true for a filter, I get an error, subreport could not be shown.

For an example, I have an integer called Order in my data source. I thought I could do =Fields!Order.Value > 1 and that would make the report use every row but the first one, but I get the subreport error.

Running the application in the debugger will display report warnings to output. I was expecting something a bit more helpful, but no luck...

Warning: An error occurred while executing the subreport ‘ImageSubreport’: An error has occurred during report processing. (rsErrorExecutingSubreport)

I've used filters a lot before, so I'm kind of confused why this doesn't work.

1

1 Answers

0
votes

I think I'm starting to get somewhere. I thought I could write my filter as one large expression and compare it to true/false in the filter editor. I changed my simple filter expression to be =Fields!Order.Value, selected ">" in the dropdown, then set the comparison to =CInt(1). I think the key was mostly the CInt call. I'm still trying to tweak it to my particular filter though, but I think I can get there.