Skip to Content
avatar image
Former Member

Apply the "Select Expert" in database server not in the report after pulling all the records

Hi,

I use CR 2008, I need to have optional parameters, so I used the select expert parameters instead of using parameters in the command.

I face slowness in the reports specially for large number of records, after searching the internet, I found some posts saying that in case of using "Select Expert" ALL the data is transferred first to the report, then the Select Expert filter is applied, is this correct?

If it is correct, how to apply it in the database and keep the parameters optional?

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 07, 2016 at 02:26 PM

    Hi Khalid,

    You're correct - you should not use the select expert to filter records when the datasource is a command object.

    Optional prompts, however, cannot be created inside the Command Object. What you can do, though, is setup a 'default' value for the prompt and modify the SQL's where clause to handle this default value. Like so:

    WHERE (table.field = {?Prompt} OR 'All' IN {?Prompt})

    To add the Default value 'All', expand Field Explorer > Right-click the prompt > Edit > Scroll down and look for 'Default value'; Add the text in here.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 08, 2016 at 05:30 PM

    And here's more info about how to work with Commands in Crystal: https://blogs.sap.com/2015/04/01/best-practices-when-using-commands-with-crystal-reports/

    -Dell

    Add comment
    10|10000 characters needed characters exceeded