QlikTip #22: Restarting/Stopping/Starting services in QlikView 9

Even if already published on another Qlikview related blog I just wanted to have this here because I am using it quite often.

For starting/stopping/restarting the QlikView Windows-services of QlikView server in version 9 I have prepared three batch-scripts which I call on demand:

Restarting all QlikView related Windows-services

@echo off
REM -------------------------------------------------------
REM - File: QlikViewServer9_Restart.bat
REM - Description: Restart's QlikView Services (v9)
REM - Author: Stefan WALTHER
REM -------------------------------------------------------
echo Restarting QlikView Services
echo ======================================================

net stop "QlikView WebServer"
net stop "QlikViewServer"
net stop "QlikView Publisher Command Center Service"
net stop "Qlikview Management Service"
net stop "QlikView Distribution Service"
net stop "QlikView Directory Service Connector"

net start "QlikView WebServer"
net start "QlikViewServer"
net start "QlikView Publisher Command Center Service"
net start "Qlikview Management Service"
net start "QlikView Distribution Service"
net start "QlikView Directory Service Connector"

echo ======================================================
echo QlikView restarted

REM pause

(Just) stopping the QV Windows-services:

@echo off
REM -------------------------------------------------------
REM - File: QlikViewServer9_Stop.bat
REM - Description: Stop all QlikView related services (v9)
REM - Author: Stefan WALTHER
REM -------------------------------------------------------
echo Stop QlikView Services
echo ======================================================

net stop "QlikView WebServer"
net stop "QlikViewServer"
net stop "QlikView Publisher Command Center Service"
net stop "Qlikview Management Service"
net stop "QlikView Distribution Service"
net stop "QlikView Directory Service Connector"

echo ======================================================
echo All QlikView related services have been stopped ...

REM pause

(Just) starting the QV Windows-services:

@echo off
REM -------------------------------------------------------
REM - File: QlikViewServer9_Start.bat
REM - Description: Starts all QlikView related services (v9)
REM - Author: Stefan WALTHER
REM -------------------------------------------------------
echo Beginning to start QlikView Services
echo ======================================================

net start "QlikView WebServer"
net start "QlikViewServer"
net start "QlikView Publisher Command Center Service"
net start "Qlikview Management Service"
net start "QlikView Distribution Service"
net start "QlikView Directory Service Connector"

echo ======================================================
echo All QlikView related services have been started ...

REM pause




Bookmark and Share

Tags: , , , , , ,

Nice Read #1: Gartner’s Magic Quadrants 2009/2010 and Qlikview

Gilles from www.quickqlearqool.nl has written a nice review of the new Gartner’s Magic Quadrant 2010:

Gartners Magic Quadrant 2009

Gartners Magic Quadrant 2010

The most interesting fact in Gartner’s analysis is that QlikTech/QlikView is not a visionary anymore!
Some quotes from Gilles article:

THERE ARE NO VISIONAIRIES ANYMORE!! Even Qlikview isn’t a visionary anymore.

… the explanation for Qlikview not being part of the visionaries anymore is quite understandable. Other parties are copying the unique selling points of Qlikview. Microsoft introduces PowerPivot, SAP created an easy entry proposition with Business Objects Explorer, and Cognos came with Express, all focusing at business users, some of them with in-memory techniques, enabling business users to what Gartner calls “Surf and Safe”. That “proves” that Qlikview is on the right track with the big vendors copying Qlikview’s approach.

One major issue that Gartner is pointing out in its analysis is that Qlikview could have had its momentum. Qlikview is/has been very successful with in-memory technology and 64-bit computing enabling scalability of Qlikviews model.

To summarize what Gartner says about Qlikview’s strengths, we can be very short: It is easier, simpler, cheaper, faster, quicker to deploy and is more feature rich than the competition.

To conclude this post: Qlikview is still going strong and has a very good product (and marketing), but Qlikview needs to show some vision on the short and medium term. Vision is not about incrementally adding new functionality, but more about how to service those large enterprise deployments. Qlikview has to do some serious work on an enterprise wide semantic data layer and better tools to manage large deployments.

My thoughts:

  • I totally agree with Gilles’ analysis!
  • In my opinion QlikTech really has to think about how to move QlikView forward into the next decade. In memory analysis is not a unique selling proposition anymore, even if QlikTech has some years more experiences with in-memory-analysis this will not be enough to prolongate the success story of the last years.
  • Furthermore I’d really like to point out that QlikTech has to think about their strategy when publishing new versions. Even if I really like QlikView (as you can see on this blog) it is really a problem if new versions are published (QlikView 9, QlikView 9 SR1) which are really buggy and are not at all useable in professional environments!!!
Bookmark and Share

Tags: ,

QlikTip #21: Running QlikView 8.5 and QlikView 9 side by side

Just a very short (very, very short) tip today.

I was asked how one could run QlikView 8.5 and QlikView 9 one one system …

That’s absolutely no problem.

During the installation of QlikView 9 Desktop (when having QlikView 8.5 already installed) just choose another installation path as suggested (e.g. C:\Program Files\QlikView_9 instead of C:\Program Files\QlikView) and these two versions will run on one system without conflicting each other.

That’s all … :)

Note: This works for me on Windows 20003 Server, Windows XP, Vista and Windows 7

Bookmark and Share

Tags: , ,

QlikTip #20: Why we do not need a SELECT-CASE/Switch-Case in QlikView load-statements …

I have recently received the question why there is no SELECT-CASE or SWITCH statement available in QlikView within load-statements.

Sure, if you are looking into the reference-manual or into the help file, you’ll find the SWITCH-CASE-statement, but this is a control statement so it cannot be used within a load-statement, e.g. this is possible

switch I
    case 1
        load '$(I): CASE 1' as case autogenerate 1;
    case 2
        load '$(I): CASE 2' as case autogenerate 1;
    default
        load '$(I): DEFAULT' as case autogenerate 1;
end switch

But this not:

// Note: this pseudo-code will not work!!!
LOAD
     Profession,
          (SELECT CASE Profession
               CASE 'Profession A': 100
               CASE 'Profession B': 200
               CASE 'Profession C': 300
               CASE 'Profession D': 400
               DEFAULT: 1000
          END SELECT) as RISK_CLASSIFICATION
RESIDENT FirstTable;

Even if I do not really know why QlikTech has not implemented this, we do not really need it.

Instead of using a SELECT-CASE (SWITCH-CASE) functionality in load-scripts we can easily use ApplyMap method:

Let’s think about the following scenario:

  • We have a field called “PROFESSION”
  • Depending on the values in this field we want to create a field “RISK_CLASSIFICATION”

Let’s create a sample for loading the field “PROFESSION”, would normally be loaded from your database or other data-sources:

FirstTable:
LOAD * INLINE [
    Profession
    Profession A
    Profession B
    Profession C
    Profession D
];

In the next step we create a mapping-table and use the applymap:

Map_Classification:
MAPPING
LOAD * INLINE [
    Profession, Classification
    Profession A, 100
    Profession B, 200
    Profession C, 300
    Profession D, 400
];

Qualify *;
SecondTable:
Load
	Profession,
	// Use the applymap to classify the profession, 1000 is the default-value
	// if the applymap does not find a match
	applymap('Map_Classification',Profession,1000) as RISK_CLASSIFICATION
RESIDENT FirstTable;

This will result into:
Result of the tables in QlikView after using the applymap





Bookmark and Share

Tags: , , , , ,

QlikTip #19: Suppressing Macro-Security (Module Security) Dialog on QlikView-Server/QlikView-Documents

When opening documents with macros the end-user will be shown a dialog to define the desired macro-security/module security (in the QlikView Windows Client or the QlikView IE Plugin):

The module script in this document contains code that accesses the system or applications outside QlikView. What security level do you want to give the macro module of this document.

But what, If you do not want that the end-user has to option to select the desired macro security/module security?
You can (e.g. as a system-administrator) globally enable the module-security at the highest level (“Allow any Macro (only for trusted documents)”) for every QlikView-Server you have by running the following script.
This script adds a registry entry to HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\:

'// **************************************************
'// Script for adding some registry keys to the current user profile/registry settings
'// for enabling the macro security/module security for the SERVER defined below
'// ~
'// CONFIGURATION
'// Just configure the script by defining your server below
'// ~
'// The article explaining this script can be found at
'// http://www.qlikblog.at/523/
'// **************************************************
CONST cSERVER_NAME = "YOUR_SERVER_NAME"
Dim WshShell 'as Object

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\", 1, "REG_SZ"
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\Module Script System\", 1, "REG_SZ"
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\Module Script System\ " & cSERVER_NAME, "", "REG_SZ" 

That’s it!
By doing so the end-user will never be asked again to choose the desired macro-security/module security.
You could for example run this script together with other logon scripts, it does not matter if you run this script multiple times!

Bookmark and Share

QlikTip # 18: A workaround for passing parameters to QlikView-macros

When calling macros from the user interface you cannot pass a parameter to the function called in QlikView.

This behavior is quite annoying …!

But the workaround explained here will show you a possibility how you can “simulate” passing parameters to macro-functions:

The idea behind is quite simple. In QlikView 9 we have now actions which can be added for any event (e.g. the OnClick event for buttons). The clue is that we can add multiple actions for every event, so I am doing the following:

OnClick Event for Button “cmdXY”:

  • Changing the value of a variable (e.g. vValueToDisplay)
  • Calling a function/sub in your macro (e.g. cmdXY_OnClick)
  • Within the macro and the function cmdXY_OnClick I am first retrieving the value for the variable vValueToDisplay, then I am executing the “normal” macro-code using the value read from the variable

Step by step with some screenshots:

First let’s create the variable vValueToDisplay:

Create the variable vValueToDisplay

Then let’s create some buttons:

Now we have to assign the actions for “Button 1″:

Adding the action of Action-Type "External" and "Set Variable" to Button 1

Explanation:

  • Go to the properties of the button
  • Change to the Tab Actions
  • Then select Action-Type External and Set Variable

Then we set the desired parameters:

Then we have to trigger the macro:

  • Add a second action of Action-Type External and Run Macro and enter the following values:

So, we have nearly finished, the last step is to create the macro (Go to Tools => Edit Module or use Shortcut Ctrl + M):

'// *************************************************************
'// Displays a simple message-box, showing the value of the
'// variable vValueToDisplay
'// ~~
'// This sub assumes that the variable "vValueToDisplay"
'// has been set before !!!
'// *************************************************************
sub GenericClick

'// First let's retrieve the content of the variable "vValueToDisplay"
Dim strValueToDisplay 'as String
strValueToDisplay = ActiveDocument.Variables("vValueToDisplay").GetContent().String

'// Create an alert
msgbox("The value of ""vValueToDisplay"" is: " & strValueToDisplay)

end sub

Clicking on the button will now show the content of the variable:

Further examples:

Please find some further usage-examples in the following QlikView-example-application:

How I am using this:

The example above is quite simple. In reality I am using for more complex situations, e.g. for creating Excel-sheets and so on. Therefore I am setting some variables before and then I am calling the desired function which requires the above variables to be set before …

Note at the end:

In my example you’ll find a sheet “Testing Real Parameters” where I have tested passing “real” parameters to macro-functions, but did not succeed.
Maybe I just did not manage to call a macro with a parameter correctly … If so, please tell me! :)

Bookmark and Share

Tags: , , , , , , , , ,