Get improved tablet functionality for QPR Portal now

2 posts 0 new
Log in or register to post comments.

Get improved tablet functionality for QPR Portal now

In its current form QPR Portal in QPR 2015.1.1 is not that usable on mobile devices due to missing zooming functionality. When the default pinch to zoom doesn't work, it's hard to hit smaller tap targets and/or read some content.  Fortunately zooming is quite easy to enable for iPads and Android tablets with a small template modification. To get the zooming into use, do the following (NOTE: all paths assume default installation locations):

  1. Take a backup copy of C:\ProgramData\QPR Software\QPR 2015\2015.1\Servers\Templates\WAS\Portal\mainview.tpl
  2. Open C:\ProgramData\QPR Software\QPR 2015\2015.1\Servers\Templates\WAS\Portal\mainview.tpl into a text editor
  3. Locate the line that contains <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
  4. Change the line to read as follows: <meta name="viewport" content="initial-scale=1.0, maximum-scale=5.0, minimum-scale=0.25, user-scalable=yes, width=device-width">
  5. Save the file and restart QPR service

Now you can zoom in and out on QPR Portal with the default pinch to zoom actions so using QPR Portal on iOS/Android tablets and even larger phones is more feasible.


BONUS: Make the experience more app-like

Some additional changes also help with making the experience more app-like on mobile devices. We can define an icon that is used when a shortcut is added to the device’s home screen and in case of Android also hide the browser controls to make QPR Portal appear like a full screen app. For iOS this functionality requires some additional changes to the product so it will not be done at this point, but the home screen icon will still work as a shortcut to opening QPR Portal in Safari.

To take these changes into use, do the following:

  1. Open mainview.tpl into a text editor once again.
  2. Add the following lines inside the <head> section. Right after the viewport definition we touched in the previous change is a good place for these:
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="apple-touch-icon" sizes="76x76" href="<#ImageFileLocation>ipad_icon.png">
    <link rel="apple-touch-icon" sizes="152x152" href="<#ImageFileLocation>ipad_icon_retina.png">
  3. Download an icon package from, unzip it and place the files in C:\inetpub\wwwroot\qpr2015-1\qprsoftware\portal\images
  4. Restart QPR service

Now you can select the Add to Home Screen option in Safari for iOS or Chrome for Android and have a nice icon there. In addition, in case of Android also the default browser controls get hidden and more screen real estate will be available for actual content.

In addition, if restarting QPR Service takes a long time due to large models, you can also instruct QPR Web Application Server to clear its template cache. To do this, add ?QPRWAS&*cleartemplatecache after qpr.isapi.dll in your QPR Portal environment's URL and launch the URL. There won't be any meaninful feedback from this operation, but once you refresh your browser (without the cleartemplatecache parts in the URL, of course) you should have the latest changes in use.