Very simple Crystal reports question, limit number of rows in result set.

Posted on 2006-06-06
Last Modified: 2008-01-09
This should be an easy one.  I want to duplicate the sql equivalent of "Select Top 2 ..." in Crystal reports.
I have a very simple report that has no grouping and only returns two fields.  I simply need it to return no more than 2 rows.  I can't find a way to do this simple task in Crystal Reports 10.  I have been reading the help for the past hour and came up with the topcount() function but don't know where to put the command, I get errors when I create a regular function.  Please help.  
Question by:hscdsb
    LVL 10

    Accepted Solution

    Go to the Database Expert -> Select your database -> "Add Command" -> En ter your SQL statement: Select Top 2 MyField1 from MyTable

    Place this field on your report.

    LVL 10

    Expert Comment

    Glad I could help.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Hi, In my previous Article  ( discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
    Hello, In my precious Article  ( saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now