nteractively (@Prompt / UserResponse) OR Broadcast Agent (Script withSetA ppl icationValue / ApplicationValue) MIME-Version: 1.0
Hi,
I’m also facing the same problem. I have to use the same reports interactively as well as with BCA.
Pascal, you say that you are “getting the prompted values from a script”.
I also set the prompt value with a script and i was creating application.variable to set the prompt values. Something like :
Dim var As busobj.Variable
Set var = Application.Variables.Add(PromptText) var.value = PromptValue
doc.refresh
With this method, the document refreshed by BCA shows no value for UserResponse or ApplicationValue
I tried another method to set the prompt value via the VBA script
Dim var As busobj.Variable
Set var = ActiveDocument.Variables.item(PromptText) —This was not possible with the V4 Object Model—
var.value = PromptValue
With this method (document variable instead of application variable), you just set the prompt value without creating new application variable. And the formula UserResponse displays the correct value
Check in your V5 object model, there is a new class document.variables and new properties.
Christophe
From: Walter M¸llner [SMTP:w.muellner@DELPHI.AT] Sent: Monday, January 10, 2000 4:10 PM
refreshed Interactively (@Prompt / UserResponse) OR Broadcast Agent (Script withSetAppl icationValue / ApplicationValue)
Congratulations!
You too, fell into this. We had this issue about 1 year ago and were not able to
solve it via the builtin functions.
I think, the best way is to include the year object in the query result and,
depending on the values, use a min/max function in the display cell.
OR: you yould create a simple script triggered on after_refresh, which sets a
local “information” variable to the value of the UserResponse (if run interactively) or to the ApplicationVariable (if run by DAS). You must use the
evaluate function in this case to get the value first, then set the (new) Document
Variable to this value.
This is just an idea, I did not try this.
Walter
PS: as the name says: ApplicationVariable is only valid and available for the
active session of Busobj, whereas
UserResponse is the response of the user IF ANY, otherwise is is empty (or undefined?)
Hope this helps.
Walter
Pascal Brenner wrote:
Hi folks,
I realise that it is a long subject, but it’s a long story as well. Thanks for your help.
A customer, here in Australia, has to designed reports flexible enough
to be
able to be refreshed manually (Refresh Normally) or through the
Broadcast
Agent (Refresh Script) but getting the prompted values from a script, so
we
don’t have to reschedule the report every single time to change the
prompt
values.
And we want to display the values passed to the report and display them
in
the report in a cell.
So mainly, the idea is to display the value for “ApplicationValue()” or “UserResponse()” so we are sure the value returned is always filled. It works perfectly ONLY if you are refreshing the report interactively
with
or without script.
…
Listserv Archives (BOB member since 2002-06-25)