Print Page | Close Window

Using Parameter Fields

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=23008
Printed Date: 26 Apr 2024 at 8:20pm


Topic: Using Parameter Fields
Posted By: jman1018
Subject: Using Parameter Fields
Date Posted: 22 Jun 2022 at 4:10am
Hello All,
I'm wondering if the following question is possible? I've created a report to query our database upon opening the CR using a "Parameter Field" called Jobs. Users enter the Job number and it returns all the records for that Job. What I need to do is the following; The user enters the Job number as mentioned above. Then I need the user to select only some of the records returned. Is this possible and how?

Thanks,
Jody



Replies:
Posted By: kevlray
Date Posted: 23 Jun 2022 at 3:56am
Depending on what version of CR you have, there is a way to have what is called a cascading parameter (lots of info on the internet about it).  Not sure if it will work the way you want it to.


Posted By: jman1018
Date Posted: 27 Jun 2022 at 4:11am
Thanks for responding. I have version 2020 SP3. I found a Topic in this forum called Cascading Dynamic Parameter that I'm trying. It seems to work, but when I run, it only shows first 150 jobs, not all 49,000. I also found where you can change the registry to increase the returned records, but I didn't want to change it to 49,000+. I saw in a post where I can create a DB command to filter only "Active" Jobs. Can you give me an example of a simple query? I assume I would need to add it to "Add Command" under "Database Expert" correct?

Thanks,
Jody


Posted By: kevlray
Date Posted: 27 Jun 2022 at 4:31am
There is a limit to the number of entries for a parameter.  I thought was a 1000.   There is a way to override that limitation (I do not recall how).


Posted By: jman1018
Date Posted: 27 Jun 2022 at 5:25am
Sorry, I had updated my previous post to include the following. I also found where you can change the registry to increase the returned records, but I didn't want to change it to 49,000+. I saw in a post where I can create a DB command to filter only "Active" Jobs. Can you give me an example of a simple query? I assume I would need to add it to "Add Command" under "Database Expert" correct?

Thanks,
Jody


Posted By: lockwelle
Date Posted: 27 Jun 2022 at 12:48pm
Does the user need to see all 49K?

Do they know the Job# or are they hunting for it?

It has been a while since I used cascading parameters...In the select command where you are requesting the job numbers, you would add in the logic for the Active records.

HTH


Posted By: jman1018
Date Posted: 28 Jun 2022 at 3:29am
No, the user doesn't need all 49K and they already know the Job# they are looking for. I ended up adding a "Add Command" under "Database Expert" with a parameter field to lookup the Job# first. Then in the report I used the Parameter Fields/Dynamic to be able to pick the items (in this case material) under the Job#. At this point it seems to be working. If there is a better way I would be interested. Thanks for all of you for your help.

Jody



Print Page | Close Window