Qlik Community

QlikView Documents

Documents for QlikView related information.

Qlikview12 Source Control with Team Foundation Server (TFS) and Visual Studio 2012 (VS2012)

adamdavi3s
Honored Contributor

Qlikview12 Source Control with Team Foundation Server (TFS) and Visual Studio 2012 (VS2012)

TFS Integration

I had never used Source Control software until a few months ago. Like many of us my source control was a well controlled system of folders on the server and my local drive, with only the ocassional mishap or overwriting and a little pleading with IT to restore a deleted file.

However in my new role I was instructed to get our new Qlik implementation working with TFS. My first stop was obviously the community but I found the information to be quite limited and out dated.

There is an excellent and detailed document on Source Control here Updated Guide to QlikView and Source Control (TFS & Subversion)

This little document is designed to supplement that as an 'idiots guide to'. I have also included the msscci setup process as this is required in more recent versions of Qlik. Finally I have used VS2012 to do all of the source control rather than using the Qlik screens.

Setup:

In more recent versions of Qlik you need to use the appropriate msscci provider install, this is the 2012 version (only 700kb):

https://visualstudiogallery.msdn.microsoft.com/b5b5053e-af34-4fa3-9098-aaa3f3f007cd

NOTE! It is easier to install this via cmd (run as administrator) altering the following command as necessary:

msiexec /i "C:\Users\adam.davies\desktop\Visual Studio Team Foundation Server 2012 Update 2 MSSCCI Provider (64-bit).msi" ALLUSERS=1

In qlikview go to file > source control> settings

1.png

Choose the qlikview msscci provider and then click on settings and Add this (appropriately altered) to the filepath:

C:\Program Files (x86)\Microsoft Team Foundation Server MSSCCI Provider\TfsMsscciProvider.dll

Once this is in then you should be able to connect to butters. Go to source control > get projects

Hopefully you will get a request to enter the server details:

2.png

Once this is in then you should be able to browse the projects

3.png

Using Source:

In summary the steps are as such:

  1. Create a prj folder
  2. Open and Save the dashboard
  3. Copy the prj folder to your local source folder
  4. If your dashboards are small, copy those, otherwise just recreate one with the same name next to the prj folder and it will recreate itself from those details
  5. Check these into source using VS2012

Example source control:

This is our test dashboard deployed on our server:

4a.png

It contains one object and one small item in the script:

5.png 6.png

  1. The first step is to create our prj folder, this is simply an empty folder with the same name as our dashboard and -prj tagged on the end.

7.png

     2. The prj folder will not have anything in it, until we open and save our dashboard, at which point the files will get generated:

8.png

Now these are actually all the files which are required to make a dashboard. You could even edit items directly with these files if you wanted, but it’s obviously easier to have a dashboard to hand to open in the application.

     3. Now we need to copy the folder to our local source folder:

9.png

     4. Obviously we also want a dashboard locally that we can work on. If the file is small then I usually copy this over as well, however if it is large and you don't want to copy it then you can just create a new qvw with the same name.

10.png

Open and save the file, and choose yes to replace the file:

11.png

But NO to replace the project files:

12.png

The next time you open the file it will have been rebuilt based on the project files

14.png

     5. Now I normally switch to visual studio to work with source as I find it easier however you can do it via the Qlik screens. I’ll explain how to do it with VS2012

You should see that the files now exist in your source control explorer ready to check in:

15.png

16.png

To alter the file, you can now just check them out of source, make the changes then check them back in. Once this is done you can copy the prj folder back to your server. Below is the sequence of events:

Check items out of source:

17.png

Open your local dashboard and make some changes as required

18.png19.png

Then save the dashboard

Looking back at our source control in VS2012 we can see that some files have changed (note they are the two things we changed in Qlik) and we need to check them in:

20.png

Check these changes in

21.png

Now copy JUST the prj folder to the Qlikview Server replacing the files on the server.

Then open the server dashboard and you should see your changes:

22.png

Notes for source control:

The source controll only controls the layout / script etc and NOT the data.

There is no ‘deploy’ functionality for Qlikview via visual studio so files will still need to be manually copied from your local Source to the server. I suspect in the future I might cobble something together in a batch file to allow me to deploy.

Tags (2)
Labels (2)
Comments
santiago_respane
Valued Contributor

Excellent!!!

I think QV has a lot to improve in this aspects but this a great step!

Thanks a lot for sharing!

0 Likes
tracysmart1969
Contributor

Really useful - thanks for the effort in sharing this

0 Likes
Partner
Partner

Does source control work if I have multiple machines running just the QlikView Personal Edition?

0 Likes

So you did not use QlikView to check-in your changes?

Capture.PNG

0 Likes
adamdavi3s
Honored Contributor

No I found it to irritating to use that way but that is down to personal preference and my being used to Visual Studio.

Finally I have used VS2012 to do all of the source control rather than using the Qlik screens.

You can absolutely use Qlik instead of VS to manage it, as long as you have a valid TFS server to connect to.

0 Likes
ahaahaaha
Honored Contributor

Thank you for the interesting information

0 Likes

Sorry, did not read that part .

I am actually looking to work with Perforce and and having trouble check in my updates. Everything else works except when I try to check out.

0 Likes
adamdavi3s
Honored Contributor

Maybe just use perforce as a file manager rather than doing it via Qlik?

That's probably what I will have to end up doing, but I wondered why QlikView has trouble check in.

Also, see my response to Jonathan here:

Re: Perforce source control

0 Likes
Partner
Partner

Can you give me information about What dll do I have to use, if I am using 2017/2018 version of TFS

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2016-08-17 10:30 AM
Updated by: