SAP Knowledge Base Article - Public

1263937 - Custom limit on number of values in a Crystal Report's Dynamic Prompt

Symptom

How to limit number of records returned to a Crystal Report's dynamic prompt?

Reproducing the Issue

  • In a command object query, how can I limit the number of records returned to the report?
  • Only distinct values

Resolution

  1. Example SQL for database view, syntax may vary depending on database
  2. Select Distinct(field) NewField1 from Table
  3. Name this view...ie "View1"
  4. Specify another view based on this one
  5. Select Top 500 NewField1 from View1
  6. Name this view View2
  7. Use View2 for the source of your parameter object 

Keywords

limit of records, values returned, prompt, list of values, LOV , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To

Product

SAP Crystal Reports XI R2