Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Web service reports are a seamless extension of our existing report engine. Every report you run in Projector is assigned a unique URL. You can find this URL by selecting a finished report and choosing Additional Actions | Show Report Output URL. This displays a dialog like the one below. Notice that we have a special link for each file format you might want the data in - excel, xml, csv, etc. You can cut and paste these URLs into a web browser to download or view the output. Or cut and paste them into other programs like Excel, Google Docs, or a Business Intelligence tool to consume them.

Image RemovedImage Added

Image RemovedImage Added

Web Service Codes

...

Tip
titleAccount Security

 The last option, an authorization token, is the recommended approach if you have a report that is viewable by multiple users or if it needs to be consumed by a business intelligence tool. This prevents a user's personal credentials from being compromised.

Image RemovedImage Added

QueryString Parameters

...

Parameter

Values

Description

Example
AuthTokenEqual to the value specified in the report wizard

Access the report using a unique token instead of a password. Strongly recommend that this method is used if this report is shared between multiple Projector users or with business intelligence tools to prevent your password from being compromised. To use this option, you must have authorization tokens enabled in your Account Settings Editor.

Must be used in conjunction with the querystring parameter username.

AuthToken=0c6d403d-70be-4450-a1fc-b96b7f70eb78

AccountCode

Equal to your Account Code

If you have multiple installations of Projector with identical usernames, then an account code is required. 

AccountCode=revcorp

UserName


This is the username you enter when logging into Projector. Must be used in conjunction with a password or authtoken querystring parameter

UserName=tom@projectorpsa.com

Password


This is the password you enter when logging into Projector. Must be used in conjunction with a username querystring parameter.

Password=monkeys

SessionTicket


SessionTicket can be used instead of a UserName/Password or Username/AuthToken combo. SessionTickets are obtainable through a SOAP request as defined in our C Sharp Example.

SessionTicket=--==kljadf9893j4k3j41090fjkdk

Format

  • csv
  • mdb
  • json
  • jsonp
  • xml
  • xls
  • xlsm

Specifies the format of the file. For import into Excel or Google Docs you probably want to use XML. For import into a web-based dashboard you probably want json or jsonp.

Format=xlsm
ExplicitFieldsOnly

yes

Specify yes if you want only the data fields you specified brought in. Otherwise we may leave out some fields and bring in different ones instead. The explanation below covers when and why this happens.

Projector's original reporting engine used Microsoft Excel to calculate some fields. For example, if you wanted to get Rate, we would bring in Hours and Revenue. When divided, they give you rate. The benefit to this was two fold. First, we let Excel do the heavy lifting of performing calculations instead of our database. Second, pivot tables can more accurately model rolled up data by calculating the field out to nth precision. When report web services were initially introduced we could not calculate these fields for you. Instead, we only provided the source data values. So if you requested Rate, we would give you Hours and Revenue instead. Calculating the Rate was an exercise left to the user.

A lot of time has passed since then, so now you have a choice. You can request the raw data values by adding this querysting parameter and setting it to yes, or you can get the old behavior where a field is left out and you get the constituent parts of the formula instead.


DateFormat

googledocs

C# string like dd-MMM-yyyy

By default dates are returned in SQL format - 2011-01-23T00:00:00 . In order to be compatible with Google Docs, this parameter replaces the "T" with a space.

You can also pass in your own formatting string. For example, dd-MMM-yyyy would output as 10-Dec-2014. For a full list of formatting parameters, please see this article.

DateFormat=googledocs

ColumnHeaders

firstrow

Return column headers (field names) in the first row. For example, if your report contains WorkDate and ResourceDisplayName, then first row might include 01/01/2012 and John Doe. By specifying this parameter you indicate that the first row should contain field names instead of field values. So the first row would instead be WorkDate, ResourceDisplayName and the second row would be 01/01/2012, John Doe.

ColumnHeaders=firstrow
FunctionAny valid javascript function nameThis parameter is to support JSONP formats. The return JSON will be wrapped in the specified function name. If this parameter is not specified, then we wrap it in projectorFunction by default.Function=myJSONPCallback
OnFailHttpStatusCode

In the event that Projector fails to retrieve the specified report data, don't return a 200 response and forward the user to a response page. Rather, return the appropriate http status code. For example

  • 404 not found
  • 403 access denied
  • 500 server error

This can be important when pulling Projector data into third party reporting engines. They may improperly interpret a 200 response a success, when really the data is bad. For end users who access report data via Excel, their browser, or other interfaces with a UI, likely appreciate the default behavior.


AAMGanttyes

Only affects .csv files. Causes the file exported from Projector to use a special column format which our Advanced Analytics Module can process. In a typical pivot table we break tasks up by their task depth. So a top level task gets grouped into a column called Task Level 1. Child tasks can end up in Task Level 2, 3, etc. This is useful when viewing Gantt chart data in pivot tables, but wreaks havoc on the AAM import engine since there can be a completely arbitrary number of Task Level columns. The AAM likes a fixed number of columns.

Specifically this flag adds two new columns to the end of the report. They are Leaf Task and Ancestor Task. Leaf task is the current task's WBS code + name. Ancestor task is the immediate preceding ancestor. To learn more about how you can build Gantt charts in AAM, see Create gantt chart in ProjectorBI.

In addition, it removes the columns that are only required for pivot tables. These columns use the naming convention Task Level N.


IncludeEmptyyesIf no data exists in the report, setting this parameter to yes will cause Projector to return an empty report with just a header row and no data rows when a CSV format is requested. It doesn't have any effect when any of the other file formats are specified.

In Practice

So if you've skipped through all the above mumbo jumbo, this is the super short version of getting this working.

...