Question

I am trying to build a SSRS report that includes 2 sub reports. Each sub report uses a single data set with a SharePoint List as it's data source.

Usually when trying to control the length of SP queries I use the following group by expression;

=ceiling(Rownumber(nothing)/N)

This works well by helping to set page break points to fit in web parts.

But when trying to stack two sub reports, the second sub is still pushed back many pages when first sub has many results.

I would think that I should restrict the number of results in the query of the data sets within the report similar to when I do queries with SQL table data sources using

select top 10

The issue is that I am unfamiliar with the query language used when SharePoint List is a data set.

Can you please advise what needs to be inserted in the following to restrict number of returned results.

<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ListName>SPUD</ListName>
<ViewFields>
<FieldRef Name="Title" />
<FieldRef Name="Description" />
<FieldRef Name="Quantity" />
<FieldRef Name="Condition" />
<FieldRef Name="_x004c_OC1" />
<FieldRef Name="PIM" />
</ViewFields>

Additionally, please advise how to pass a report parameter to the above query. (I currently use filter functionality but that won't work if number of results returned is restricted in query.)

Lastly, Can what I am asking be set by some tablix parameter?

Thank you for your help, let me know if you need any additional information.

Was it helpful?

Solution

You can fudge it by hiding the extra rows that you don't want. Click on the Detail row handle to highlight the entire details row in the tablix. Go down to the Visibility-Hidden property and enter the following formula:

=RowNumber(Nothing) > 10

You could pass a parameter to the report to restrict the rows shown:

=RowNumber(Nothing) > Parameters!MaxRows.Value
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top