Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a parameter to use 1

Status
Not open for further replies.

auylox

Technical User
Feb 7, 2007
20
CA
Hello,

I am using CR XI to access and an oracle DB.

Is it possible to have a user select a parameter on which to run a report? What I have right now are two reports that are identical except for the parameter that is used to select records. I would like to amalgamate the two reports so that when refreshed, the parameters would work as follows:

"How would you like to select your records?"
By Group
By ID Number
By Culture

And then, based on this choice, display another parameter for the corresponding field (Group Name, Culture, or ID Number)

Is this (or something similar) possible using CR?

Thanks very much,

Krista
 
You can set up a record selection formula like:

(
select {?Criteria}
case "Group" : {table.groupname} = {?Group}
case "ID Number" : {table.IDno} = {?ID}
case "Culture" : {table.culture} = {?Culture}
)

{?Criteria} would be set up with your three string options. You might want to set up the other prompts with "None" option, and then use prompt text like:

If Criteria above = "Group", select a groupname; otherwise, select "NA".

Even though another selection won't have any impact, it will make more sense to the user.

-LB
 
Thanks LB,

That's kind of what I had figured out already. And it seemed so messy. But, with a new day brain, I realised that because I wasn't using value lists I could also just do as follows:

(
select {?Choose}
case "By Group" : {VW_GROUPS.GROUP_NAME} like {?Choice}
case "By ID Number" : {VW_CATALOGUE.ID_NUMBER} like {?Choice}
case "By Culture" : {VW_CATALOGUE.CULTURE} like {?Choice}
)

And then I just use a generic prompt. Much less messy for the end user.

Thanks again!

K
 
In this case, is it possible to change on which field the data is grouped based upon the field that is chosen in the parameter {?Choose} ?

 
Create a formula:

select {?Choose}
case "By Group" : {VW_GROUPS.GROUP_NAME}
case "By ID Number" : {VW_CATALOGUE.ID_NUMBER}
case "By Culture" : {VW_CATALOGUE.CULTURE}

Insert a group on this.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top