Search code examples
c#visual-studiocrystal-reports

how to set a limit on the number of records in a crystal report


I need to limit the number of records in my report without any actions with the database. I use crystal report in visual studio. How can i do this?

I tried to look for information about this on the Internet, and all the information either related not to visual studio or to try to solve the problem of the number of records not in the entire report but on the page


Solution

  • If you are not allowed to alter in any way the SQL, you can still limit the number of records displayed in the report by setting a conditional Suppress expression of the Detail section.

    Section Suppress property with button for entering an expression

    Click the expression button for the Suppress property and enter an expression such as RecordNumber > 20 to suppress displaying records beyond the first 20.

    Expression Editor