Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Brian_Munz
Employee
Employee

Document Extension to remove grey toolbar in QVS

I've gotten several requests for a way to remove the grey toolbar which shows up when viewing QVWs on QVS.

I've attached here an extremely simple document extension which gets the job done.

Just figured I'd post it here in case it can help someone.

Thanks!

16 Replies
Anonymous
Not applicable

The extension did not work for me (QV11 SR2).

I copied the C:\Program Files\QlikView\Server\QlikViewClients\QlikViewAjax\opendoc.htm file and called it OpenDocNoToolbar.htm.

I then replaced the HTML with the following...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns:zfp="http://www.qliktech.com/zfp" xmlns="http://www.w3.org/1999/xhtml">

<head>

    <title>BI</title>

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <meta name="apple-mobile-web-app-capable" content="yes" />

    <link rel="shortcut icon" type="image/x-icon" href="https://community.qlik.com/QvAjaxZfc/htc/Images/favicon.ico" />

    <link rel="stylesheet" type="text/css" media="screen" href="https://community.qlik.com/QvAjaxZfc/htc/default.css" />

    <link rel="apple-touch-icon" href="https://community.qlik.com/QvAjaxZfc/htc/Images/Touch/touch-icon.png" />

    <link rel="apple-touch-icon" sizes="72x72" href="https://community.qlik.com/QvAjaxZfc/htc/Images/Touch/touch-icon_72x72.png" />

    <link rel="apple-touch-icon" sizes="114x114" href="https://community.qlik.com/QvAjaxZfc/htc/Images/Touch/touch-icon_114x114.png" />

          <script type="text/javascript" src="/QvAjaxZfc/htc/QvAjax.js"></script>

</head>

          <body class="QvPageBody" avq="background:.SheetBackground" onresize="Qva.ResizeBody()">

                                                                      <li class="cf">

                                                            <span class="cell-icon cell-CLOSE-icon"></span>

                                                            <span class="ctx-menu-text">Close</span>

                                                  </a>

                                        </li>

                              </ul>

                              <div id="InitialLoader">

                                        <img alt="" src="/QvAjaxZfc/htc/Images/Working.gif"/>

                                        <span class="ctx-menu-text">Loading...</span>

                              </div>

                    </div>

                    <div id="PageContainer">

                              <div id="MainContainer"></div>

                    </div>

                    <img alt="" id="WorkingGif" src="/QvAjaxZfc/htc/Images/Working.gif" style="display:none;"/>

                    <script type="text/javascript">

                              var qva;

                              function Init() {

                                        var doc = Qva.ExtractProperty("document", null);

                                        var re = new RegExp("^(//[^:/]+(?::\\d+)?/)?([^#]+)");

                                        var segm = re.exec(doc);

                                        doc = segm && segm[2];

                                        var invite = Qva.ExtractProperty("invite", null);

                                        if(invite) doc = "";

                                        if(doc != null) {

                                                  qva = new Qva.PageBinding();

                                                  qva.View = doc;

                                                  qva.Autoview = "";

                                                  qva.ShowDocumentTitle = true;

                                                  qva.AuthenticateUrl = '/QvAjaxZfc/Authenticate.aspx';

               

                                                  new Qva.Modal();

                                                  new Qva.Scanner(qva);

               

                                                  qva.AutoViewAppend (null, qva.DefaultScope, 'servercontrol');

                                                  new Qva.Collaboration(qva, document.getElementById("MainContainer"));

                                                  Qva.DragDrop.DropDefault = {

                                                            'Inside': function(pos, type) {

                                                                      if (type == 'Field' || type == 'Dimension' || type == 'ObjectType') {                           

                                                                                return { 'Element': 'Document.ActiveSheet' };

                                                                      } else if (type == 'Object') {                           

                                                                                return { 'Element': 'Document.ActiveSheet', 'Dialog': 'Drop.qvpp' };

                                                                      } else {

                                                                                return null;

                                                                      }

                                                            }

                                                  };

                                                  new Qva.Extensions(qva);

                                                  qva.AddManager({

                                                            'Name': qva.DefaultScope + ".Modal",

                                                            'Paint': function (mode, node) {

                                                                      var width = parseInt(node.getAttribute('width'));

                                                                      var height = parseInt(node.getAttribute('height'));

                                                                      var name = node.getAttribute('value');

                                                                      var url = Qva.Remote + '?public=only&name=' + escape(name) + '.htm';

                                                                      var params = node.getElementsByTagName("param");

                                                                      for(var i = 0; i < params.length; ++i) {

                                                                                var key = params.getAttribute("key");

                                                                                var value = params.getAttribute("value");

                                                                                url += "&" + escape(key) + "=" + escape(value);

                                                                      }

                                                                      Qva.Modal.instance.Show(qva, url, width, height, true, "QvModal_SessionCollaboration");

                                                            }

                                                  });

                                                  qva._Send("add", "Document.ActiveSheet", false);

                                        } else {

                                                  alert("No Document");

                                        }

                                        Qva.SetContextMenu (document, function(event) { return qva.OnContextMenu(event); });

                                        Qva.Start();

                              }

                              function CloseSession() {

                                        document.body.style.background = "";

                                        $('#MainContainer, #Tabrow, #QvAjaxToolbar > ul:last').html("");

                                        $('body > script').nextAll().remove();

           

                                        qva.Enabled = false;

           

                                        qva.Ready = function () {};

                                        qva.OnContextMenu = function () {};

                                        qva.SendClose();

           

                                        var $closebtn = $('#Close');

                                        if ($closebtn.length) {

                                                  $closebtn.find('.ctx-menu-text').text($closebtn[0].RestoreText || "Restore").end().show()[0].href = 'javascript:RestoreSession()';

                                        }

                              }

                              function RestoreSession() {

                                        window.location = window.location;

                              }

                              function Assert(exp, message) {

                                        if (!exp) {

                                                  if(message) { alert(message); }

                                                  debugger;

                                        }

                                        return exp;

                              }

       

                              if (typeof(Qva.Mgr) === "undefined") {

                                        Qva.GetDebugFiles(Init);

                              } else { Init(); }

                    </script>

          </body>

</html>

Then for the Document/s you want to remove the tool bar add the URL as below -

Capture.PNG

When you access the document through the client browser you should see the OpenDocNoToolbar.htm is in the URL.

By doing this it removed the Tool Bar and Close button.

I also wanted my Document to automatically scroll through each sheet every minute, as the Document was to be shown on a TV screen in the office.   You can do this using the Show Sheet Conditional on the Sheet Properties. 

Capture.PNG

Create a variable called vShow and then use an expression to give the variable a value.   For instance, my document has 5 sheets and I wanted to show each sheet for 1 minute, so my expression looked like this...

Capture.PNG

=if(right(time( now(),'m'),1)=1 or right(time( now(),'m'),1)=6  ,1,

if(right(time( now(),'m'),1)=2 or right(time( now(),'m'),1)=7  ,2,

if(right(time( now(),'m'),1)=3 or right(time( now(),'m'),1)=8  ,3,

if(right(time( now(),'m'),1)=4 or right(time( now(),'m'),1)=9  ,4,

if(right(time( now(),'m'),1)=0 or right(time( now(),'m'),1)=5  ,5)))))

So my vShow value would either be 1,2,3,4 or 5 depending on the current minute.   You can use any expresion that suits the number of sheets you have and the frequency you want to show them.

For each sheet then update the Conditional value i.e. Sheet 1 would be vShow=1, sheet 2 vShow=2 etc

Now everyminute the sheet should change automatically.   If you need to make changes to sheets just change the vShow expression to the sheet number you want to see - this saves you having to wait for the document to go through all the sheets.

For me the browser didn't automatically scroll through each sheet, so I installed Easy Auto Refresh for Chrome which lets you specify how many seconds between each browser refresh.   Now I can run the browser in full-screen mode, sit back and watch it scroll through each sheet every minute.

easternfish
Contributor III
Contributor III

Hi All,

Any ideas how to remove it from the Ipad or Iphone Qlikview App not just the web browser?

Brian_Munz
Employee
Employee
Author

Sure, it should be relatively easy, using a document extension to detect the device then removing the bar based on the device.  There are device detection document extensions here on community.

Not applicable

This has worked great so far at my client. Unfortunately not all the toolbar is removed now I've upgraded to 11.2 SR4.

Has anyone been facing this since upgrade?
Does anyone know how to modify the htm file to get this working again?

Thanks a lot!

Not applicable

Hey guys

Does anyone have the equivalent of an idiots guide for usage of the nobar.qar addon?

I am not exactly sure how you go about using addons.

Thanks

John

Not applicable

Id like to add a bump to this, has anyone gotten this to work on SR4 or greater? sr5 or 6?

Alexander_Thor
Employee
Employee

Yup, just downloaded the extension and it works on my SR5/6 server.