Search code examples
sqlvisual-studiot-sqlcrystal-reports

crystal reports - limit records at startup to reduce start/refresh time?


I have thousands of records that I grouped via crystals wizard but it takes 10 minutes to refresh the data now. Anyway to limit the data so it doesn't take so long to start/refresh?


Solution

  • As far as I know, the only way to restrict the number of rows returned to Crystal by a query against a SQLServer database is to add a Top n clause to your select statement - like so:

    select top 100 * from myTable;
    

    You can only do this if you are querying your database using the Add Command feature in Crystal, rather than through the Database Expert.