Results 1 to 2 of 2

Thread: Select Expert In Crystal

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    Select Expert In Crystal

    Hello! [Me again]

    I am selecting based on an organization field... Which can be all mixed case in the database... If I choose to run the report for one organization (I have a parameter field).. it does not print anything unless the organization is entered as is (case sensitive)

    How can modify report so that the user's selection can be case insensitive

    Thanks

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    Solution

    Again, for what it's worth, here is the solution I cooked up

    1. Run a query on the table I am reporting on to PROPERCASE
    the organisation name. So, an entry like ACME would be
    read like Acme
    (Using SQL Server)... Something similar to this:

    update tablename
    set OrgName = upper(left(@OrgName,1)) +
    lower(right (@OrgName,len(@OrgName)-1))

    Now.... If the user types in ACme as a discrete value for the
    parameter field, I create a formula that does this:

    ProperCase({?parameterFieldName})
    So, the data entered by the user will be
    "Capital Letter+remaining letters in lowercase)

    Also, if the user picks more than one Organization to report
    on.. I concatenate the names all the chosen ones and report
    the string in a header:

    "Account Profile For: " Acme, Denison, Masap, etc..

    To do that, I create a formula.. See below

    numberVar i;
    stringvar ls_GroupNames := "";

    //loop through the multivalue parameter
    for i := 1 to ubound({?DisplayDataPerOrg}) do
    // Concatenate the current value to a string separated by commas.
    // If it's the last value, don't add a comma.
    ls_GroupNames := ls_GroupNames + ProperCase({?DisplayDataPerOrg}[i]) +
    iif(i = count({?DisplayDataPerOrg}),"",", ");

    ls_GroupNames

    We note that the Join function of Crystal report could have a similar effect

    Bye..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width