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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompts?

Status
Not open for further replies.

Shoot

Programmer
Oct 11, 2003
31
0
0
US
Hi,
We have two reports, one is prompted by country and the other is prompted by City. But both the reports have the same information.

We need to combine the reports to reduce the maintenance time for these reports by making a single report out of them.

We are trying to create a new prompt object which is unique to both the reports. That means basing on the level selected by the end user we want to dynamically set the prompt but it doesn't work.

Here is the sample:

CASE WHEN (@Prompt('Select a Level','A',{'1','2'},MONO,CONSTRAINED)=1) THEN @prompt('Enter Country') WHEN (@Prompt('Select a Level','A',{'1','2'},MONO,CONSTRAINED)=2) THEN @prompt('Enter City') END

Any ideas??

Thanks in advance,
Shoot
 
What is the behavior that you are seeing??? Does it show the prompt or it throws some error??? Provide us more info...

Sri
 
It doesn't work that way. All @Prompt's will be resolved BEFORE the query is run.

You're trying to make BO run like a procedural language. It is a SQL generator. You can't make it something it isn't.

I think you'll need a more SDK-like solution for this.

Steve Krandel
Westbay Solutions
 
Hi Sri,
It throws an error. As per the requirement, the user should be asked to select a level, ones he selects a level we need to prompt him with the appropriate level of prompt.

Is there any way to set the dynamic prompts to the end users.

If we can do this, we can cut down the number of reports from 4 to 1 reducing the maintenance of the reports.

For example:

Main Report
Main Report prompted by 1
Main Report prompted by 2
Main Report prompted by 3
Main Report prompted by 4

If we can do the above, we can reduce it to

Main Report
Main Report prompted by Level

Thanks in Advance
Shoot
 
It will throw error since there is nothing on the left side which is being equated with the prompt value... That said as Steve mentioned BO doesn't work that way... If you have three prompts even with conditional checking they will be prompted first irrespective of the entered level value... I'm afraid what you are looking at is not available out of box...

Sri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top