on 09-19-2014 9:48 PM
I've seen this asked a few time on here over the past several years but no answer. So thought I would give it a shout again.
I've been using code very simillar to the code here:
http://www.forumtopics.com/busobj/viewtopic.php?t=198349
which has been great for refreshing live office dahsboards.
But is there a way to automate if the dasboard is built off of Web Intelligence that has prompts? For example, when I refresh All Objects I get the prompt to select periods. I'd like to supress this. Any examples/documenation or point me to a specific part of the COM object would be great.
Here is where I am so far. The problem is that when it refreshes the the prompt window displays. I'd like to autmate that.
' Usual Excel code for declaring, opening, ect......
Set BobJ = XLApp.COMAddIns("CrystalOfficeAddins.CrystalComAddin.7").Object
BobJ.Logon "UserName","Password"
' --> SET MY PROMPT/PARAMETERS HERE
BobJ.LiveObjects.Refresh
BobJ.LogOff
'Usual Excel clean up down here
Thanks in advance.
Dermot,
In case you are interested:
Add the webi_module 1.0 Type Library reference to your code and use the following as starting point to write your own:
Dim loPrompt, loPromptValues As Object
Set loPrompt = BobJ.WebiAddinPrompts.GetItem(0)
Set loPromptValues = loPrompt.CurrentValues.GetItem(0)
loPromptValues.Value = "Your value"
Then go further with your refresh code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Could you ever find any solution/workaround to this question?
I have a similar task to solve: refresh Word documents including some Webi reports, while filling out prompts from a .Net application.
I found out that the connection details, including the prompts are stored in a document variable called "CrystalPersist" in an xml-like format, but I didn't find anything that turns off the prompt screen.
Thanks,
Marton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dermot,
The document variable was a dead end and it is part of the Word document (Document.Variables). I didn't find anything useful that suppresses the prompt screen.
In Excel, you can link prompt values to cells, change the value in these cells by controlling Excel itself, and refresh your document with the Liveobjects.Refresh method.
However, I was stuck with Word, as there's no way to avoid the prompt windows to appear. So I ended up with a code that started another thread before calling the Refresh method, waited in the background for the LiveOffice window, then with SendKey, it filled the prompt and started the actual refresh.
I admit, it is not nice, but at least works.
If anyone from SAP looks at this post, please provide a better solution
Greetings,
Marton
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.