Discussion Board for collaboration on QlikView Publisher.
Good day to all,
Is it possible to pass parameter (the name of sheet) in url, so that when qvw document is opened in AP, the specified sheet will be opened. thanks in advanc e.
Yes very well possible. You would create a variable in your document and fill this variable passing parameters in the url for this variable. Then "On Open" macro you would read this variable contents and activate the sheet you want. Make sure to wipe the contents out in the same macro, and put a check in the begining to make sure variable is not initial.
Hope this will help.
1. Create a variable in your Document and set the value to 0.
2. Create this procedute:
set v = ActiveDocument.GetVariable("vSheet")
3. Create a Trigger OnOpen on Document Event Triggers to run the procedure.
4. The url is qvp://localhost/MyApp.qvw?vSheet=0, where vSheet is an array. So your first sheet is 0, the second is 1...
There is a difference between doing this in Ajax and IE/Desktop. For the Windows Desktop & Plugin versions you can use the qvp:// protocal to pass a parameter. This would look like: qvp://servername/document.qvw?var=1&var=2
If you use Ajax, the only way I've been able to this is via bookmarks. If you select Remember Layout state in a new bookmark, then it will show the sheet you were on when it was created. And you can the reference the bookmark in the url by appending: &bookmark=Document\BM01
You will need to do a bookmark for each sheet you want to reference.
The bookmark method will also work in IE.
Support for setting variables via http urls would be really nice...
your tip works only if you creat a shared bookmark using the access point, but if you will creat a bookmark in the document using a desktop client it doesnt work.
You can access directly to a specific sheet of your QVW by using de parameter "sheet" in the URL, like this:
Where MY_SHEET is the ID of the Sheet you want be open.
As far as I know, Rakesh's solution is correct. I am using it in some of my reports, with the desired results (a trigger in the "On Open" event that activates the sheet).