6/01/2011

Bottoms up! Finally simple bottomN report is working

I had difficulties to create simple Top N or Bottom N report in SSRS but finally it's working :) ! Here's the example how use bottom N filter in a tablix report. In this case I wanted to have list of the oldest jobs from the database table and the prompt where user can choose how many records are shown in the list.

[ 1 ] I made Report Parameter p_bottomN that is Visible to user.
[ 2 ] In its properties Available Values tab I specified values 5, 10 and 20 for user to choices. Label and value were both same. In Default Values tab I added value 5.
[ 3 ] Then in report's Dataset Properties and Filters tab I added filter:
  • Expression [JobDate]
  • Operator Bottom N
  • Value [@p_bottomN]

Report looked fine when previewing it an I even didn't need to pre-order my data in dataset query. But after I deployed the report to the report manager, publishing site - bottomN prompt wasn't visible and default record amount wasn't 5. This was because at first I had this parameter hidden and default value was 10. Problem was solved in report manager. I looked to report's properties and parameter tab where I needed to put this prompt visible and change the default value.


Report Manager - Parameter tab.

No comments:

Post a Comment