none
How to limit number of rows displayed in a rdlc report, without change SQL statement RRS feed

  • Question

  • Hello,

    I want to create a rdlc-based-report, which shows only a limited number of rows in its table or/and its groupings. For of several reasons I don't want to change the sql statement. Is there a possibility for configurate this inside the rdlc file?

    i want to be able to realize reports like this:
    show the three best sellers of every department of a company (grouping for company)

    context is an asp.net application, which uses the reportviewer-control

    andreas
    Tuesday, June 5, 2007 2:30 PM

All replies

  • Hi There!

     

    I am not sure if this would be the solution you are looking for but, as you are pumping the DataSet into the rdlc file couldnt you simply pass it to a DataView and then do a conditional search on that?

     

    Like DataView.RowFilter("Search string");

     

    Have a look at the following:....

    http://msdn2.microsoft.com/en-us/library/system.data.dataview.rowfilter.aspx

     

    I hope this works buddy!!

    Tuesday, June 5, 2007 7:37 PM
  • thanks for your response, but for two reasons, your hint isn't realy helping me.

    1st - I don't want to change the Data, but the report
    2nd - a search string for show the three best sellers of every department of a company (grouping for company) is quite impossible, isn't it?

    there must be a possibility to resolve this problem inside the report, otherwise the report is not that good it should be...

    I thoght my need is a common one. It's just a top-list whithin a grouping...
    Wednesday, June 6, 2007 8:57 AM
  • http://technet.microsoft.com/en-us/library/ms152832.aspx

     

    The above details something called the 'Filter' element, this seems to provide the funtionality you require within the table.

    Wednesday, June 6, 2007 3:35 PM
  • I know this element. But I don't know how I should use it to resolve my problem, because the functions I require aren't available in filterExpressions. (I tried to use RunningValue or RowNumber for an expression like "RowNumber(nothing) <= 10", but they aren't allowed in this case)
    Thursday, June 7, 2007 9:31 AM
  • I am not sure as I have not needed to implement what you are describing, but after some thought,...

     

    Could you not use Grouping (to show the departments), and then have a Filter (with an operation of TopN)?

     

     

    Thursday, June 7, 2007 5:48 PM