Place value of prompt in title

I want to place the value of a prompt, selected by a user, in the title of a report using a formula.

Say the value of the prompt is for which month a report is run ie: January I want “Report Run: January” in the title. Ill be surprised if this has not been asked before but will be grateful if someone points me in the right direction. “PromptSummary[month]” (I actually use the dimension [month] here and not the prompt question itself) does give me the result but it also provides information like the query name etc.


Decisys :de: (BOB member since 2004-05-21)

Instead, use UserResponse()

=Concatenation("Report Run:";UserResponse(queryname; "prompt string"))

Jansi :india: (BOB member since 2008-05-12)

I get a #sintax error. Even if I just do:
UserResponse(“queryname”; “prompt string”) I get the error. The only difference is that I put the query name in inverted commas (it does not run otherwise. I also tried changing the query name, to no avail.


Decisys :de: (BOB member since 2004-05-21)

Could you post the exact code that you used, along with the prompt text and the name of your query? Also instead of using query name as such you can tune it by DataProvider([Object name]).


Jansi :india: (BOB member since 2008-05-12)

You have to use:

=UserResponse([queryname]; "prompt string")

Prashant Purohit :india: (BOB member since 2009-02-18)

OK, queryname should be a variable then? I used dataprovider and it worked. the sintax error did actually make sense in the end. I made a mistake with the query string.

“BI”, a forum member explained these issues in great length to me about 4 and a half years ago but it was a DeskI theme then and I had forgotten the basics. If I find the link I will post it here.

Many thanks anyways! As is obvious, it’s been a while since I’ve used both WebI or DeskI!


Decisys :de: (BOB member since 2004-05-21)

Infact it even works with just the prompt text

=UserResponse("prompt text") 

.


haider :es: (BOB member since 2005-07-18)

Of course. But I would prefer using the name of the data provider (that too by using DataProvider()) which would ease me in maintenance.


Jansi :india: (BOB member since 2008-05-12)

BTW queryname is not variable but just your original query name like [Query 1] but using Dataprovider function is always more generic and robust.


Prashant Purohit :india: (BOB member since 2009-02-18)

Worth checking the existing posts.

Thank you all: that was exactly the code I needed.

IJS :smiley:


IJS (BOB member since 2010-03-30)