Results 1 to 2 of 2
  1. #1
    Join Date
    May 2005

    Unanswered: Restrict no of records to display

    Dear all

    I have created a sub report in main report. The problem is; as the no of records in sub report increase the printing area of sub report; the records print on contents of main report.

    How can I restrict the records to print. e.g. sub report should print only 10 records.



  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    You'll need to alter the SQL code of your subreport. However, the SQL used is non-portable. (It depends on the database.)
    • With Oracle, use the RowNum pseudo-column (add and rownum < 10 to your where clause.)
    • With SQL Server, use the TOP qualifier. Select top 10 FIeld1, Field2, ...
    • When using PostgreSQL, it offers the LIMIT (and the associated OFFSET) clauses.
    • For other databases, check your documentation...
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts