0 Replies Latest reply: Oct 17, 2016 8:49 AM by Venkateswara reddy RSS

    get all user reports

    Venkateswara reddy

      Hi,

       

      I am trying to fetch all the Qlikview reports assigned to an user along with report URL within the service response.

       

      I have tried the below code.

       

        // create a QMS API client

                      IQMS apiClient = new QMSClient();

       

       

                      //retrieve a time limited service key

                      ServiceKeyClientMessageInspector.ServiceKey = apiClient.GetTimeLimitedServiceKey();

       

       

                      // clear the QMS's QVS object cache from user document listings

                      // so that the any new user documents can be discovered

                      apiClient.ClearQVSCache(QVSCacheObjects.UserDocumentList);

                      // get a list of QVS services

                      List<ServiceInfo> qvsServices = apiClient.GetServices(ServiceTypes.QlikViewServer).ToList<ServiceInfo>();

                      if (qvsServices.Count > 0)

                      {

                          // retrieve all user documents for the first QVS in the list

                          List<DocumentNode> userDocuments = apiClient.GetUserDocuments(qvsServices[0].ID).ToList<DocumentNode>();

                          // print the names of all user documents

                          Console.WriteLine("The " + qvsServices[0].Name + " contains the following user documents:" + Environment.NewLine);

                          foreach (DocumentNode userDocument in userDocuments.OrderBy(x => x.RelativePath).ThenBy(x => x.Name))

                          {

                              //Console.WriteLine(Path.Combine(userDocument.RelativePath, userDocument.Name));

                          }

                      }

       

       

      Its returning the documents assigned to me. Is Document means report?

       

      if so the document relative path I am getting empty. can I get report http path as well ?

       

      Venkatesh.