BusinessObjects Board

@Prompt In Free Hand SQL Report

Hi,

i am doing a report and I need to display a prompt with List of values. The list has two value i.e. N = Normal and F=Full Retest.

The actual sql takes parameter as either ‘N’ or ‘F’ or Both values.

I am using following syntax to diaplay the values

My problem is that I need to display 3 prompts the first one is N, second one is F but the last one is Both values i.e. N & F should be selected.

Any help on how to do this.


Jignesh Shah :india: (BOB member since 2004-03-31)

Well, I changed “In” to = and MULTI to MONO as it didn’t seem like it made sense to allow the selection of more than one of these items. Especially if you have B for Both. Then I used the same technique found in the FAQ in Designer for using the * or other wildcard to allow the selection of “ALL” items.

and 
(VehicletestType = @prompt('Enter Vehicle test Type (N=Normal / F= Full Retest / B = Both )', 'A', {'N','F','B'}, MONO,FREE)
OR 
'B' = @prompt('Enter Vehicle test Type (N=Normal / F= Full Retest / B = Both )', 'A', {'N','F','B'}, MONO,FREE)
)

Be very careful of your parenthesis. I tried to put them on separate lines to be sure that you can see where I have put the new ones.


Dave Rathbun :us: (BOB member since 2002-06-06)

Hi Dave,

Thanks for the reply.

The column VehicletestType has only two values i.e. ‘N’ and ‘F’.
It does not have any value as ‘B’.

I need to give user a facility where he must select from list of values as ‘N’ or ‘F’ or ‘N;F’. I am able to manage with the first two list of values. But not able to manage with last value which is ‘N;F’. I do not want user to select multiple values by pressing Ctrl key.

Surprisingly i have also found that when I select only one value (say only ‘N’) the IN clause in Free Hand SQL does not work.

Any ideas.


Jignesh Shah :india: (BOB member since 2004-03-31)

Read the code I posted. :slight_smile: The “B” doesn’t exist anywhere except for the prompt.

If you “must” select, then change FREE to CONSTRAINED. That will ensure that they pick only a value that is on the list.


Dave Rathbun :us: (BOB member since 2002-06-06)

If you are using oracle, customise the LOV of the object by adding

union select 'N,F' from dual 

to the generated sql and do not forget to check the ‘do not generate sql’ check box. Now you will see that in the LOV. Use the same logic Dave has suggested and replace ‘B’ with ‘N,F’. If you are not using oracle then find out the equivalent of sys.dual of oracle in your database.


neo (BOB member since 2004-11-21)

… also you might want to read this entry from the Designer FAQ. It explains the technique that I’m using.


Dave Rathbun :us: (BOB member since 2002-06-06)