4 Replies Latest reply: Mar 31, 2014 6:51 PM by Steve Dark RSS

    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?

        • Re: Different data sources per user
          Kiruthigadevi Subramaniam

          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

          • Re: Different data sources per user
            Massimo Grossi

            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

            • Re: Different data sources per user
              Marco Wedel

              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

              • Re: Different data sources per user
                Steve Dark

                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