SubReport question

4 posts, 0 answers
  1. Will
    Will avatar
    45 posts
    Member since:
    Aug 2007

    Posted 22 Nov 2007 Link to this post

    Hello -

    In the examples in the Help documentation on how to create a subreport (for the Creating Master-Detail Reports using SubReports heading), the query that is used for the Detail (SubReport) joins a few tables and then uses (I assume) the Report Parameter and Filter properties to "filter" the data to be for a specifc product category id. 

    My question is this:  Does this subreport bring down all of the data that matches the sql query to the client and THEN applies the filter condition?  Since the query's WHERE clause does not include a statement like "WHERE ProductCategoryID = 12" or whatever the incoming parameter value is, which would filter the data at the database query level, I am assuming that the report engine gathers ALL of the query results and then applies a filter at the local or client level.  Is that correct?

    Thanks
     - will
  2. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 23 Nov 2007 Link to this post

    Hello Will,

    This is exactly what this example illustrates - you acquire all the data for the subreport at once and then filter it on the report level. To do this you need to define report filters and if needed report parameters.

    As far as the data filtering is concerned there are two possible ways - filter the data before passing it to the report or leave the report to filter it - for more information please refer to this help topic.

    I hope this information helps.

    Sincerely yours,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. Will
    Will avatar
    45 posts
    Member since:
    Aug 2007

    Posted 23 Nov 2007 Link to this post

    Thanks.
    If I wanted to filter the data at the database server (before bringing it to the report) and using your example from the Help documentation, would I just be able to add an additional statement to the WHERE clause (WHERE ProductCategoryID = @ID) and then create a new parameter at the report level (@ID)?
  5. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 26 Nov 2007 Link to this post

    Hello Will,

    The only parameters supported at the moment are the report parameters. We do noth support data source parameters yet. For this reason there is no way to link both - at least at the moment. This movie illustrates how to use a data source with parameters and pass values from outside to the data source parameters.
     

    Sincerely yours,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top