Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Project Server 2013 - how to query OData feeds for Project 2013 reporting data

$
0
0

i am trying to query reporting data to find all projects where owner name is not the same as the value of a custom field 'PreviousProjectOwner' and I use this link as an example 

https://msdn.microsoft.com/en-us/library/office/jj163048.aspx?f=255&MSPPError=-2147217396

however, it is not working for me. I wonder if anyone may know what the problem is.

the code is breaking and i can't figure out why

           

  ProjectOData.ReportingData ocontext =
               new ProjectOData.ReportingData(new Uri(PSDATA, UriKind.Absolute));

            ocontext.Credentials = CredentialCache.DefaultCredentials; 

            var projectQuery1 = from p in ocontext.Projects
                                where p.ProjectStartDate > new DateTime(2012, 1, 1)
                                //where p.PreviousOwner != p.ProjectOwnerName
                                orderby p.ProjectName
                                select p;

   foreach (ProjectOData.Project proj in projectQuery1)
            {
                Console.WriteLine(proj.ProjectName + " :\tStart date: " + proj.ProjectStartDate.ToString());
            }

here is the error message

the url is that is produces is this

and it gives an error when i try to use it in a browser


tatiana


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>