cancel
Showing results for 
Search instead for 
Did you mean: 

Parameters not from database

Former Member
0 Kudos
60

Hi,

I want to have a few parameters in my report that does not come from the database. Those parameters are numeric numbers with possibly a fraction.

How can I define a report parameter that does not come from the universe?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Patrick,

This is not possible in WebI. However, you can define a prompt in the universe that does not link to a db.

Option 1

Create an object with a prompt in it.

@prompt('select number','N',{0,1,2,3},mono,free)

If you bring this into you results you will be prompted for the value without a restriction on the db. You can get the value returned in the UserResponse function.

Option 2

Create a condition that always evaluates to true

my_field = 
case 
when @prompt('select number','N',{'0','1','2','3'},mono,free) = 0
then my_field
else my_field
End

Hope this helps

Alan

Former Member
0 Kudos

Thank you. It seems to work only when my query contains data from database.

If I build a query in my report with only objects with prompts then I get an error message when refreshing data:

"The query does not reference any table when attempting to build the where clause."

Would this be a bug in Webi?

Thank you.

Former Member
0 Kudos

Hi Patrick,

That is the expected behaviour. You should be able to place it any query though. Are you looking to build a report with no data sourced from a db at all.

Regards

Alan

Former Member
0 Kudos

Hi,

Yes I want to build a report with no data from the database at all. I could add an object from the database in my query and not use it in the report to avoid the problem but it's a little bit weird.

Also, I want my prompt to be optional... can't find where I can define that...

Thank you.

Former Member
0 Kudos

Hi Patrick,

I am not sure that WebI is the correct tool for this. You could put up an Excel sheet into info view and do this. Alternatively it might be possible in Crystal Reports.

I don't think that optional prompts can be defined in the universe

http://www.forumtopics.com/busobj/viewtopic.php?p=586350&sid=f29f556d4f622d4feac91024f1a4d182

Regards

Alan

Former Member
0 Kudos

Hi,

thank you for your help. My question on parameters is answered. I'll see what my best option is for the other issues.

Thank you

Answers (0)