BusinessObjects Board

Display * in @prompt

Hi Folks,

I have the requirement in the report like user want’s to select one/more cities or if user want’s to select * then dispaly all cities info. in report.
‘*’ should be from list box only.

In universe object written like this. But me unable to see ‘*’ in the LOV.
If I enter * it working fine. But I want to show * along with all cities.

(@Select(Store\City)IN @Prompt(‘Select State or
enter * for all’,‘a’,‘Store\City’,multi,free) ) or
(’*’ in @Prompt(‘Select State or
enter * for all’,‘a’,‘Store\City’,multi,free) )

Please let me know , how to dispaly * in list box.

Eg:

City1
City2
City3

Thaks in Advance.

Shravan


shravan_bo :india: (BOB member since 2006-04-25)

Answered in the Designer FAQ. :slight_smile:


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

Hi

Many Thanks for ur replay.

I tried both the ways:

Overriding the LOV SQL :

I got the below error as my first query has more than one columns.

A database error occured. The database error text is: ORA-01789: query block has incorrect number of result columns
. (WIS 10901)

Universe Object

In this method me getting incompatible objects error.

Can you please suggest how to avoid these errors.

Shravan


shravan_bo :india: (BOB member since 2006-04-25)

HI,

follow the bellow steps

  1. Create one object.In that select clause please enter ‘*’ and provide the reference table. this object contain the * value only
  2. go to object in which object you want display the *
    go to object properties and click edit
    select combine query function in query pannel and provide that object which contains *.
  3. select run and check in the display list

Note : You have to same assign the same data type for the created object

Please try with bellow logic and it will work fine

(@Select(Store\City)IN @Prompt(‘Select State or enter * for all’,‘a’,‘Store\City’,multi,free) )
or
(’*’ IN @Variable(‘Select State or enter * for all’ ) )


Subbu557 (BOB member since 2008-03-09)

Hi
Thanks a ton for ur reply.

I need some to clarify point 1.

1. Create one object.In that select clause please enter ‘*’ and provide the reference table. this object contain the * value only

If I enter * in select clause it’s giving invalid table name.

" please enter ‘*’ and provide the reference table"

This means I needs to give tablename.* Please confirm.

Thanks
Shravan


shravan_bo :india: (BOB member since 2006-04-25)

What SQL do you have?

You should have, for example:


SELECT
table.column_name
FROM
table
UNION ALL
SELECT '*' from DUAL

If you want to bring the * to the top, you will need to wrap this up as an inline select:


SELECT c.colref
from
(
SELECT
table.column_name colref
FROM
table
UNION ALL
SELECT '*' from DUAL) c
ORDER BY CASE WHEN c.colref = '*' THEN 'aaaaa' ELSE c.colref END

Hi,

But I have diff. number of columns in both the SQLs.
Above UNION 4 columns are there and below UNION
one coulmn (select * from dual)

That’s y me getting invalid no. of columns error.

Could you tell me how to do at universe side too.

Shravan


shravan_bo :india: (BOB member since 2006-04-25)

You could concatenate the four columns:

col1 ||’ ‘|| col2 ||’ ‘|| col3 ||’ '|| col4

Hi Sravan,

NO,you have to assign one table for that object.Thats why it is giving that error.
you do one thing,you can assign any table.
1.after putting the ‘*’ in the select clause
2.select TABLES button and assign any table.
3. click ok
after above steps the object will create.
NOTE : this object will contain only * value
you can use this object and follow the steps what i provided previsoly

Regards,
subramanyam


Subbu557 (BOB member since 2008-03-09)

Hi Sravan,

you are combine the object(which contains *) into one object(which you are useing to display the values in the prompt).

This way you can display the * value in that required object LOV’s

What are these 4 objects…

Regards,
Subramanyam


Subbu557 (BOB member since 2008-03-09)