Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
Is it possible to set the title of a Qlikview document to the value of a variable?
Looking under Settings>Document Properties>General>Title, there is an option to put in an expression, but the title turns to the variable name, not the actual variable value.
I am using version 12 SR1.
Thanks!
Michael
The Document Title expression button is one of those always-broken-features of QlikView. You can put anything in this field, but axpressions won't work.
Your second question is a bit contra-productive. QlikView has a very powerful server-based distribution system for its BI applications. All distribution/licensing/usage/management properties in QlikView server are tied to the filename of the QlikView document. You would get into a complete mess rather quickly if documents started changing their names.
OTOH, you can easily create some macro code that uses the "ActiveDocument.SaveAs" method to save a copy of the current document under a different name. Consult the APIGuide for an example.
Peter
Sorry - need to rephrase my question.
I need to save my document with a variable value.
So, if I had a variable vName=doc_name, I'd like to automatically save the document as "doc_name.qvw".
Is that possible?
The Document Title expression button is one of those always-broken-features of QlikView. You can put anything in this field, but axpressions won't work.
Your second question is a bit contra-productive. QlikView has a very powerful server-based distribution system for its BI applications. All distribution/licensing/usage/management properties in QlikView server are tied to the filename of the QlikView document. You would get into a complete mess rather quickly if documents started changing their names.
OTOH, you can easily create some macro code that uses the "ActiveDocument.SaveAs" method to save a copy of the current document under a different name. Consult the APIGuide for an example.
Peter
Thanks Peter - using ActiveDocument.SaveAs did the trick.
Michael
Hi Michael,
You can set the document title using a macro, variable, and a trigger.
1) Add the following macro:
SUB SetDocumentTitle()
set dp = ActiveDocument.GetProperties
set v = ActiveDocument.Variables("vDocumentTitle")
dp.WindowTitle = v.GetContent.String
ActiveDocument.SetProperties dp
END SUB
2) Add a variable vDocumentTitle. It can use any valid expression. If you are using a string constant do not enclose it in parentheses.
3) Add a document event trigger with an external action "Run Macro" and run the macro SetDocumentTitle. I suggest adding the trigger to either the OnOpen, OnPostReload, or OnPostReduceData events.
James