Skip to Content

Crystal Reports - Parameters

I want to create a parameter in my report that includes ClientName and Region. The user selects the ClientName from a list, but it's the Region associated with the selected ClientName that is used as a filter in the report.

Therefore my Report Filter will be

SELECT * FROM tblReport WHERE Region=SELECT DISTINCT Region FROM Customer WHERE ClientName=[Selected Client]

Thanking you in advance

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Dec 11, 2018 at 02:35 PM

    Hi Imelda,

    Create a Dynamic Cascading parameter on the Client Name and Region fields.

    Then add a Record Selection Formula that looks something like this:

    {ClientName} = {?ClientParameter} AND {Region} = {?RegionParameter}

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Abhilash,

      Thank you for your response. The ClientName doesn't appear in the report at all. Basically my report contains a list of fields, one column of which is Region. A number of different Clients can belong to the same region. The user wants to be able to filter the report byClient and show all results based on the Region for the selected Client.

      e.g.

      Client Table

      Client1 - Region1

      Client2 - Region1

      Client3 - Region1

      Client4 - Region2

      ReportTable

      If Client2 selected, then filter the ReportTable by Region1.

      I need a parameter with a combo box, containing ClientName and Region, but it's the Region for the selected Client that is used as the filter.

  • Dec 12, 2018 at 12:11 PM

    Can anyone help with this please?

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 12, 2018 at 02:13 PM

    So, if you select Client2 in the parameter, you want the report to return data for Client1, Client2 and Client3 as they're all associated to Region1?

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Hi again Abhilash,

      Thanks for the reply. I don't want to include the Client in the report at all. I want to just use the Client as a means of filtering for Region. The report data contains a Region per line. I want to be able to choose a Client, return the Region for that Client and use this as a filter in the report.

      I hope this is clearer.

      Thanks.