cancel
Showing results for 
Search instead for 
Did you mean: 

Hide/show groups via parameter

Former Member
0 Kudos
351

Hi all,

I am a new user to Crystal Reports 2008 and need some guidance. I have sorted a list by group and I want to show each part of the list by group selectively based on the value given to a parameter.

Is this possible/how would I go about doing this in the formulas section?

Thanks.

Anjana Dasu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Eric,

Thanks-- that is exactly what I had been looking for!

Anjana

Former Member
0 Kudos

What is the parameter value? What are the group values? This will help us provide an answer.

Former Member
0 Kudos

I have two fields next to each other-- one is job id (#) and another is job name (string) and they are grouped by a status field (closed, in process, not available). I have created a parameter called status that asks for the status (closed, in process, not available) and based on what the input to that is, i want to show the corresponding part of the lists of fields.

Former Member
0 Kudos

I hope I am understanding correctly when I'm answering your question.

You have fields, grouped by the status field. And depending on whatever the parameter is selected, you want to display only the defined items on the parameter, correct?

You can do this either as a dynamic prompt, or a static prompt. Dynamic will read off the distinct values coming from your data source and allow choices from there. Static parameter, you will have to define what the choices are.

In a nutshell...

For a static parameter, create a parameter, and type in your choices... (Closed, in-status, etc). They will be the selection choices you will allow the report user. You can also define the parameter to have multiple choices etc on the same parameter settings.

Next thing you need to do is go to your Select Expert, and define the parameter to be the select criteria. Once you're in Select Expert, you can click New -> Select the field you want to filter that will correspond with your parameter -> then have it go "equal to" your parameter name. You can also do the same thing by going to the formula section in Select Expert and define it as follows:

{datasource.StatusField} = {?Status}

This essentially tells Crystal to prompt the report user for a parameter (which you defined previously) and only select records that match the criteria you set in the formula. All the group formatting will be done by Crystal.

Hope this helps.

Edited by: Eric Choi on Jul 14, 2008 10:43 PM