Link to home
Start Free TrialLog in
Avatar of treehouse2008
treehouse2008

asked on

Filter and Sorting in RDL

In RDL, we can do filter and sorting in Query: "Select * from tables where field_a > 100 order by field_b", or in "Filters" and "Sorting":  
         <Filter>
               <FilterExpression> = Fields!Field_a.Value </FilterExpression>
               <Operator> GreaterThan </Operator>
               <FilterValues>
                    <FilterValue> = 100 </FilterValue>
               </FilterValues>
         </Filter>
          <Sorting>
                 <SortBy>
                      <SortExpression> = Fields!field_b.Value <SortExpression>
                 </SortBy>
          </Sorting>
   I wonder which way is more efficient in terms of application performance (such as response time...).

Avatar of dbaSQL
dbaSQL
Flag of United States of America image

i have found it is easier, and sometimes faster, to let the report processor handle the sorting and filtering, rather than using the ORDER BY within your tsql.  
the same is mentioned within 'Hitchhiker's Guide to SQL Server 2000 Reporting Services', too.
Avatar of treehouse2008
treehouse2008

ASKER

But the book says:
"if you're issuing a query against a relational data source that is fully optimized for searching and sorting data, you should do your sort ordering on the database server as part of the query. Runtime sorting within the table on Reporting Services is problematic and has in fact overridden our SQL sort order."
ASKER CERTIFIED SOLUTION
Avatar of dbaSQL
dbaSQL
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial