Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different data sources per user

Is it possible to have the backing data be from different connections (databases) depending on the user who accesses the report?

For example I have UserA which can access DatabaseA and UserB which can access DatabaseB.  The structure of DatabaseA and DatabaseB are identical, eg.  they both have the same views created for reporting.  But DatabaseA and DatabaseB do contain different data. 

Can I create a single report using that will pull in the correct data depending on what user is opening that report?

4 Replies
Not applicable
Author

Hello Bo,

Why can't you pull different database data into different qvd's and made it available for the report without worrying about connections?

Kiru

maxgro
MVP
MVP

other way:

if you only have 2 (or few db), the easiest way is to make 2 qlik doc with a different connection (you can put the connection in an external = include file) and with different authorization

other way:

if the db structure is the same you can load A and B in the same qlik doc, same tables and add a field (dimension?) to differentiate the 2 source db; I'm thinking about concatenating the facts  and dims tables;

then, you should use the added field with section access to restrict data visibility

MarcoWedel

Hi Bo,

if you are using QMC / publisher, you could create reduced versions of the document based on a additional field that contains the data source name. You then could distribute these reduced versions to specific users.

These functions are created specifically for requirements like yours.

QlikCommunity_Thread_112638_Pic2.JPG.jpg

QlikCommunity_Thread_112638_Pic1.JPG.jpg

hope this helps

regards

Marco

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

The ideal approach would be to concatenate tables from all the different sources into a single QlikView document.  The concatenation is straight forward - but you need to ensure that ID's are unique across systems.  If they are not you will need to create new ID's by appending a system prefix to each ID in the load script (eg. DBName & ':' & ID as ID,).

Once you have all the data in a single QlikView document you then get the advantage that you can analyse data from all systems in one place.  You can then use Section Access to limit users to only see the views that they should be allowed.  You will find plenty written about Section Access on-line.  The main thing to be aware of though is that it is possible to lock yourself out of your own QlikView document with Section Access - so be careful.

Another approach is to put the connection strings in an include file (again, there is information about these on line) and simply create a folder for each database you want to connect to and place the QVW and connection include in each folder.  Then modify the include file to point to each data source.  You can modify one QVW and then copy it into each folder.  When it is refreshed in situ each one will have the correct data loaded into it.

Hope that gives you a couple of ideas.

Steve