CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2020
    Posts
    3

    [RESOLVED] Using one parameter to select multiple values

    I need some help in how I can get my current report generating correctly.

    I need my report to display particular data stored in the database under a particular location, and the parameter I would use is based on that locations number, so in this case, the locationtype column = 21, which is for the location of Hertfordshire storage.

    So when the parameter is used it will select any column data that had the locationtype of 21. But for my case the location of Hertfordshire storage as been added 4 times under four different locationtype numbers, so what I am trying to do is, when the parameter is selected, it displays all data related to those four locationtypes.

    Hope this makes sense. Any help and advice will be greatly appreciated.

  2. #2
    Join Date
    Aug 2007
    Posts
    179

    Re: Using one parameter to select multiple values

    Crystal Reports must first connect to the database before it can process any data. Therefore, you cannot use a parameter to control which database CR uses. However, you could create a view, or multiple views in one database which, using linked servers or db links, return data from other databases. Then, by using a command object (database->database expert ->connection->add command) you could have a parameter to control how you select from the view, or even which view is used. If you can have a column in the view to indicate where the data originated, then the parameter can control the result set.

  3. #3
    Join Date
    Feb 2020
    Posts
    3

    Re: Using one parameter to select multiple values

    Thank you for your response. I am unable to create views for this particular report, so I have to rely on the current database structure. Hence, my difficulty in doing what I have asked advice on.

  4. #4
    Join Date
    Feb 2020
    Posts
    3

    Re: Using one parameter to select multiple values

    Just as an update, I have decided for easy that I will make a multi select parameter so the user can select each of the same department. Thank you for your input.

Tags for this Thread

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

Featured