Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Limits to data in subreport

edited May 2006 in End User
Hello

I have created a subreport consisting of a detail band and a summary band,
but I would like to limit the maximum number of records that can be
displayed in the detail band to 10 records only.

Is there a way for me to accomplish this?

Regards
Jamie



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited May 2006
    Hi Jamie,

    The best way to accomplish something like this would be to alter your
    dataset to only return ten records. This keeps things clean and simple
    inside the report.

    You can also try setting the PrintCount property of the detail band inside
    the subreport to 10 and the PageCount of the actual subreport to 1. This
    should give you a similar effect.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Hi Jamie,

    Yes, using the method I described below essentially cuts off the generation
    of the report preventing the summary band from ever getting created. You
    could try using a group footer or footer band in its place.


    This would have to be done in SQL code. For instance if you have an ID
    number for each record, you can create a criteria that only returns the
    first ten records.

    select *
    from customers
    where custID < 11

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Hi Nico,

    Thank you for that fix, the detail band correctly displays the number of
    records but unfortunately it does not now display the summary band.

    You mentioned that you can limit to number of records in the dataset, how
    do I accomplish this?

    Regards
    Jamie




    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.