Status Reports - Project Online 2013

Hey folks,
Does Project Online 2013 support Status Reports?
On the PWA > Status Report page, I can not seem to find where I could click to add/ configure a status report.
\Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

Hi,
when you click into a titel line, ribbon will be displayed.
Does that work?
Regards
Barbara
To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find
an appropriate solution faster. Thanks for your support!

Similar Messages

  • Odata Connection Refresh Error while using excel web app - Project Online 2013

    Hello All,
    I am trying to work with odata reporting on project online 2013. I am not using MS Excel client, I open any of the available default report in excel online. when i try to refresh data connection from data tab. it's giving me an error
    as show below 
    screen..
    I have already enabled "PWA for excel web app refresh" feature.  
    Following the blog instructions and microsoft support, i have tried to grant permission to
    AppId=  00000009-0000-0000-c000-000000000000
    And In the Permission Request XML field, copy and paste the following XML: 
    <AppPermissionRequests>
        <AppPermissionRequest Scope = "http://sharepoint/projectserver/reporting"
    Right="Read">
        </AppPermissionRequest>
        <AppPermissionRequest Scope = "http://sharepoint/content/tenant"
    Right="FullControl">
        </AppPermissionRequest>
    </AppPermissionRequests>
    Now, According to the microsoft, it should show Microsoft.Azure.Azureservices as Title but as per below screen shot it shows Power BI Reporting and Analytics..
    title.<o:p></o:p>
    However, i click on ok button and check that the permission has been granted. i can see Microsoft Power BI reporting and analytics in the app permissions.
    I again go to my BI reporting, open my report in excel online and refresh the data connection and nothing changed. It's giving me the same error.
    I hope that i am able to narrate my problem. Please tell me, What i am missing here...
    sandeep

    Ok, why did manually add / update the permission XML? Do you get this error for new Excel based reports? Test creating a new one, example here:
    http://pwmather.wordpress.com/2013/08/01/projectserver-projectonline-highlight-report-example-ps2013-sp2013-excel-bi-office/
    http://pwmather.wordpress.com/2013/09/16/projectserver-projectonline-example-report-ps2013-sp2013-office365-bi-excel-powerpivot/
    http://pwmather.wordpress.com/2014/07/17/getting-started-with-projectonline-part-9-ps2013-office365-project-ppm-sharepointonline-pm-sp2013/
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • Project Online 2013 Licenses/Subscription

    I am actually new to the  Project Online 2013 ( not the project server )  So have a question regarding the correct subscription for my users.
    A bit background, we are trying to implement a Project Portfolio Management solution at our organization and we are researching to see if Project Online is a good fit.
    I currently brought Project Online with Project Pro for Office 365
    which has the following licenses
    1) Project Pro for Office 365
    2) Project Online
    3) Office Online
    4) SharePoint Online ( plan 2)
    I got 4 user licenses for the above subscription where the Users have access to PWA and can create projects and do stuff.
    We are planning on implementing it as an integration of SharePoint Online & Project. So now we are having our other team members who not PM's or Portfolio Managers who needs access and I am not sure what license to buy for them.
    1) SharePoint Online (Stand alone) : If they will be just working on the project sites / Team sites Do I need to get SharePoint Online Subscription so that they can have access to the tasks.
    2) Project Lite : If I get this license will my team members be able to access the PWA and even the SharePoint online sites, Will it cover both the options of Enterprise Project Types & SharePoint Task List Project Types.
    I think I should go with option 2 of buying Project Lite for my Team Members but wanted to make sure if this is the right Subscription to buy.
    Can anyone help me with this?? I tried contacting Microsoft Support through phone but they weren't able to help me or they created a ticket and I am waiting on their specialist to contact me.
    But any help is appreciated. Thanks

    Hello,
    For the Team Members to access the Project Sites and certain pages in PWA (Timesheets / Tasks etc.) the Project Lite license will be fine. See the links below for details:
    http://office.microsoft.com/en-us/project/project-lite-project-software-for-team-members-FX104310999.aspx
    http://office.microsoft.com/en-us/office365-project-online-help/what-can-team-members-do-in-project-online-HA104220591.aspx
    http://technet.microsoft.com/en-gb/library/project-online-service-description.aspx
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • Project online 2013 odata ssis

    Hi,
    I am working on project online 2013.I want calculate and fetch start variance ,finish variance when user set the baseline 1.
    and I want get info of baseline using client object model 2013 in project server 2013
    vijay

    Hi Vijay,
    In addition to this, I can see that you created almost 30 threads about CSOM since the beginning of september and you didn't mark any of them as an answered.
    Could you please review your threads and mark as answer the replies that actually helped you out or answer your questions so they can be closed (but still accessible) and people with a similar concern can refer to it?
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Ribbon Custom Action - Timesheet Project Online 2013

    I'm trying to create a Custom Action for the timesheet form in Project Online 2013.
    In Visual Studio, when I try to add the Custom Action, I'm providing the following info:
    Where do you want to expose the custom action? Host Web
    Where is the custom action scoped to? None
    Where is the control located? I cannot find anywhere the location for the Timesheet ribbon. Could someone provide a link to the documentation containing the list of all ribbons for Project Online 2013?
    Thank you

    I'm trying to create a Custom Action for the timesheet form in Project Online 2013.
    In Visual Studio, when I try to add the Custom Action, I'm providing the following info:
    Where do you want to expose the custom action? Host Web
    Where is the custom action scoped to? None
    Where is the control located? I cannot find anywhere the location for the Timesheet ribbon. Could someone provide a link to the documentation containing the list of all ribbons for Project Online 2013?
    Thank you

  • Weekly status report in SharePoint 2013

    Hi
    guys.
    I
    recently found a link that showed how to create a weekly status report in SharePoint 2010 using wikis: http://blogs.c5insight.com/Home/tabid/40/entryid/200/Creating-a-Weekly-Team-Status-Report-in-SharePoint-2010-Using-Wikis.aspx
    I
    am new to sharepoint and currently I am using sharepoint 2013.
    I
    created a wiki page library and the library contains wiki pages for every team member so
    that each member can enter their own status information in it.
    Now I would like to create a form inside the wiki page in which users
    can submit their status reports on a weekly basis and then submit that.
    The submitted information must be stored in a way (may be a document)
    so that it can be reviewed by senior management. Also, I need a way to archive past
    weekly status reports.
    Can
    someone guide me on this?
    Thanks,
    Ankit

    You need to create a custom list with appropriate fields. Set up security so people can only see the items they have created. You can create a workflow in SharePoint Designer that alerts the appropriate people who need to approve it. Then, you can
    edit a Wiki page and drop the list's web part on to the page.

  • Task Status in Project Server 2013

    Hello,
    I was wondering if someone could give me an overview of the Task Status options in Project Server 2013? I am a current 2010 user but we have not been able to use this feature in the past. Specifically, I am wondering:
    1. Can I assign an entire task to a user? In 2010 I had to assign resources to a task and then update each assignment. I want to be able to assign the entire task and have the user tell me the Physical % Complete, Actual Start, and Actual Finish at the task
    level. 
    2. Is there any kind of built in what-if analysis feature? Can a program manager review the impact of the submitted status before accepting?
    Thanks,
    Jessica
    Jessica Hancock

    Hi Jessica,
    Basically, task statusing and timesheeting has not changed between 2010 and 2013 versions. The first would be about the need (or not) to activate the Single Entry Mode, meaning a single interface for task statusing and timesheet. This DO matters since in
    case you activate it, the task tracking method will be forced to "hours of work done per period". See in this
    blog the others methods.
    1- From the PM's point of view, you can in MS Project Pro or PWA assign one or more resources to a single tasks, creating then the corresponding number of assignments. From there, each single user assigned on this task will have to enter his own tracking
    on his assignment. As you'll see in the blog, the % physical cannot be entered by the team member, only the % complete if the 1st method is chosen.
    2- About this what-if analysis, the PM can click in the approval center on the "preview updates" before accepting or rejecting. He will be able to vizualise what will his project plan look like in case he approves the task updates versus what does
    his plan actually look likes. See reference
    here.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Project Site custom list data reporting with Odata connection, BI reports in Project online 2013.

    Hi,
    Can we create an excel report with Odata feed connection which includes project site custom list data?
    Example: My Project is "ProjectTest" and it has a project site in which i created a custom list "ProjectNotes" with some new columns. I want to include these columns in my report.
    sandeep

    Hello,
    when using the SharePoint ODATA or REST APIs each list and site would have a different endpoint URL. Some example URLs are below:
    REST API:
    https://test.sharepoint.com/sites/pwa/Project01Test/_api/Web/Lists/getByTitle('ProjectNotes')/Items
    https://test.sharepoint.com/sites/pwa/Project01Test/_api/Web/Lists/getByTitle('Risks')/Items
    ODATA SVC:
    https://test.sharepoint.com/sites/pwa/Project01Test/_vti_bin/listdata.svc/Issues
    https://test.sharepoint.com/sites/pwa/Project01Test/_vti_bin/listdata.svc/ChangeRequests
    The down site is that in Excel you cant dynamically update the connection URL so would have to add all of these in manually and create the data models - I guess this is ok if you don't have many projects and don't create many new projects. In code such as
    JavaScript it is easy and you can build up the URL dynamically using variables like below:
    projSiteUrl + "/_api/Web/Lists/getByTitle('ProjectNotes')/Items"
     The options to explore to see if you have make this dynamic and get the data you want are:
    Potentially look at the search API and use that in Excel:
    http://sharepoint.stackexchange.com/questions/98159/retrieving-list-items-from-multiple-sites-via-odata-with-excel
    http://social.technet.microsoft.com/Forums/windows/en-US/727c1893-6b42-478b-afca-b32fb259a53d/retrieve-custom-lists-from-all-projects-for-excel-reports-by-using-odata?forum=sharepointgeneral
    Power Query:
    http://blog.oraylis.de/2013/05/using-dynamic-parameter-values-in-power-query-queries/
    JavaScript (put the data on a page), example:
    http://gallery.technet.microsoft.com/scriptcenter/Server-Risks-and-Issues-on-65dcbe0e
    Or bring the data down to a custom SQL database table and report of that data:
    http://nearbaseline.com/blog/2014/04/project-site-custom-list-reporting-using-ssis-odata-connector/
    Hope that helps
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How to use PSI with Project online 2013

    There are some entities in project server that we cant interact with using Client side object model like views etc. We need to use PSI for them.
    If not, Is there any other approach to get entities such as views.

    Hello,
    You can use the PSI, this link for SharePoint Online claims auth will help you authenticate - this helped us :)
    http://msdn.microsoft.com/en-us/library/office/hh147177(v=office.14).aspx
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • Missing "Save Site as Template" For Publishing Sites in Project online 2013

    First I created Sub site using Project Template under the site collection.
    Now I want to this Sub site Save as a Site Template. When I went for Save site as Template in site setting. Under Site Action there is no option for “Save site as Template”
    marylu

    "Publishing Feature" may be enabled at your site , The Publishing feature does not support the Save Site as Template option.
    http://support.microsoft.com/kb/2492356
    Some workaround -
    http://www.learningsharepoint.com/2013/05/03/missing-save-site-as-template-for-publishing-sites-in-sharepoint-2013/
    http://blogs.msdn.com/b/how24/archive/2013/06/13/save-publishing-site-as-a-template.aspx
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • How should we be going about creating and saving and/ or exporting our ODC files using Excel 2013 for use in Project Server 2013 Online?

    Hi I need your guidance on how I should go about setting up my Excel 2013 reports so that others in our Project Online 2013 environment can access and updates these reports of mine.
    My questions are as follows:
    I presume I need to create and save my ODC files in a PWA > Data Connections folder.  I have English and French users in our environment.  Do I need save them twice?  Once in the French and again in the English Data Connections folder?
     Likewise for the Excel file? 
    How should I go about creating my ODC files within Excel?  By default, the ODC files are being created on my PC's > My Documents > My Data Sources folder.  I presume I need to get them saved or exported to the PWA > Data Connections
    folder. So, How should I be going about creating and saving and/ or exporting the ODC files???
    FYI...My oData Feeds that I wish to use and join in this particular Excel file are as follows:
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/AssignmentTimephasedData01T00:00:00'
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/Projects()?$select=ProjectId,ProjectName,CAS_Classification,CAS_PCO,CAS_IT_Department,CAS_Program,CAS_SubProgram
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/TimeSet()?select=TimeByDay,TimeDayOfTheWeek$filter=TimeByDay ge datetime'2014-10-19T00:00:00'
    https://cascades.sharepoint.com/sites/pwa/_api/projectdata/Resources()?$select=ResourceId,ResourceName,Programs,Supplier,Source,Role,CostType
    Thanks in advance,
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

    Thank you Guilaume.  May I ask you to help clarify a bit more for me?  If I have to do it for both languages (the reports and ODC files), do I simply copy the same ODC files from e.g., the English to French folder in PWA (Odc files)?  Or does
    that defeat the purpose?  Or, do I need to create a new set of oData Feed Connection files with a French version of Excel 2013 and save them to the French Data Connections folder in PWA?  Do I need to have a French version of Excel 2013 to create
    French ODC files and ultimately French based reports and/ or vice versa?
    I did notice that the following oData metadata command from within a browser produces different results (ie., English versus French metadata returned) depending on who runs it (i.e., French or English user, etc).  As you can see I am a bit confused.
     Any help you can provide would be greatly appreciated.
    https://XXXXX.sharepoint.com/sites/pwa/_api/projectdata/$metadata
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

  • How To Control the Langauge of BI Reports (Using Excel 2013, oData, and Project Server Online 2013)

    Although I buried and posted the following question indirectly in a recent post, I would like to do so here to try and elevate it in the hope that I can get an answer.
    It is in regards to creating reports using Excel 2103 to querry Project Server 2013 Online using oData.  I would like to be able to control the langauge of my reports that I create for others to view.
    Just creating and then saving the Report and Data Connections in a language directory does not seem to drive or determine the language of the report.  A colleague of mine over here is using the same directories as I am, and his turn
    out to be French like his environment.  Mine, even though I save the files in same the French directories, display in English. 
    Any ideas on how I can create reports so that they display in another language, eg., French when using Excel to create reports?  I know that we can set the language in an internet browser to control the language that the result is returned, for instance,
    when querying https://.../pwa/_api/ProjectData/$metadata
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

    Correction!  Thanks to Doug Welsby of Microsoft and some our other MS friends who worked behind the scenes to correct/ assist me on this, I got the right answer after all... the difference between, example a French oData command/ statement,
    and an English one is the inclusion of the square brackets with the language abbreviation/ code e.g., "[Fr..]" in the oData connection string/ statement.  For further reference, see the connection files provided by Microsoft in the Reports and
    compare the syntax for the same report/ different language.  There is where you will see what and how Excel is able to differentiate/ control what language that the report result will return.
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

  • "An unknown error" has occurred in status report in project server 2013

    "An unknown error" has occurred in status report in project server 2013

    Hi,
    It would help if you could provide the ULS logs for this error, even the PWA queue error message. Then has it already been working before?
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Project Server 2013 reporting security

    HI
    I have a question and I have seen a couple similar ones but nothing definitive on the topic of permissions/security for Project server 2013 (in project server security mode) for either Excel(Odata) reports or for SSRS reports. 
    Even setting security aside the Out of the box configuration is certainly not elegant or even usable.
    Situation:
    In PWA project managers and team members can only see projects they, own, are team members on, or have been granted permissions explicitly to. (Pretty standard - is using security templates and "my Projects"). We are using secure store
    and impersonation for access to reports. We do have report authors groups.
    As an example a PM needs to create a weekly  status report but should not have to pull all the data back to then filter for their one project.
    However, when a PM goes to either SSRS or Excel using oData they can see every project in the company.  This is just does not make a lot of sense. Why would I hit the database for 100projects when I only care about one and yet there seems
    to be a lack of information on the topic. In contacting Microsoft we were told there was nothing we could do that is how it was designed.
    REALLY???? (see above)
    What we have come up for our approach is  that we're currently using the UserID value to set parameters in our data sources, but are looking for more 'elegant' approaches
    to security (if they exist) as there are some liabilities with this approach (EX is a report author forgets to put the parameter in the users will get everything back.
    QUESTION:
    If there is not another approach then we will stay with it. We can't imagine there isn't a better way.
    Additionally, the Project user view only contains the identity of the project owner not the rest of the team members (including sponsors who might need to see the data.) so where are they in the database?
    Tasks

    Hi Paul,
    I have a similar situation only I'm using Project Online. I have setup Groups and Categories where there is a relationship between clients and groups, and projects and categories. 
    Only issue is that when running a report a user receives an error and then all the data shows for all projects irrespective of the group/category/project relationship and the fact that user only exists in one group (and therefore can't see
    or access the other projects in PWA outside of their group.
    Hope that makes sense.
    Regards,
    Conrad

  • CRM ONLINE 2013: On Approval Of Quotation, Run Report, Generate PDF and Send an Email With PDF as attachment

    Hi,
    I am using CRM ONLINE 2013.
    How to automate below process?
    1. On Approval Of Quotation, Run Report.
    2. Generate PDF.
    3. Send an Email With PDF as attachment.
    As i have gone through many forums for this topic, but creating a plugin code for generating Report PDF is not possible in CRM ONLINE.
    So, What is the alternate way to do this..?
    Thanks.

    This is my entire code mentioned below:-
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
        <script type="text/javascript">
            if (typeof (SDK) == "undefined")
            { SDK = { __namespace: true }; }
            SDK.JScriptRESTDataOperations = {
                _context: function () {
                    if (typeof GetGlobalContext != "undefined")
                    { return GetGlobalContext(); }
                    else {
                        if (typeof Xrm != "undefined") {
                            return Xrm.Page.context;
                        else { return new Error("Context is not available."); }
                _getServerUrl: function () {
                    var serverUrl = this._context().getServerUrl()
                    if (serverUrl.match(/\/$/)) {
                        serverUrl = serverUrl.substring(0, serverUrl.length - 1);
                    return serverUrl;
                _ODataPath: function () {
                    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
                _errorHandler: function (req) {
                    return new Error("Error : " +
      req.status + ": " +
      req.statusText + ": " +
      JSON.parse(req.responseText).error.message.value);
                _dateReviver: function (key, value) {
                    var a;
                    if (typeof value === 'string') {
                        a = /Date\(([-+]?\d+)\)/.exec(value);
                        if (a) {
                            return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
                    return value;
                Create: function (object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 201) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Retrieve: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                Update: function (id, object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "MERGE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Delete: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "DELETE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
                    if (filter != null) {
                        filter = "?" + filter;
                    else { filter = ""; }
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                __namespace: true
        </script>
        <script type="text/javascript">
            //Create Email and link it with Order as Regarding field
            var Xrm;
            var email = new Object();
            var ownerID = "";
            var CustomerId = "";
            if (window.opener) { Xrm = window.opener.Xrm; }
            else if (window.parent) { Xrm = window.parent.Xrm; }
            //Get ownerid who send email of quotation to customer
            function GetOwnerID() {
                var owner = Xrm.Page.getAttribute("ownerid").getValue();
                ownerID = owner[0].id;
                var ownerName = owner[0].name;
                var entityType = owner[0].entityType;
                GetToEmailGUID();
            //Get customerid who receive email of quotation from owner
            function GetToEmailGUID() {
                var Customer = Xrm.Page.getAttribute('customerid').getValue();
                CustomerId = Customer[0].id;
                var CustomerName = Customer[0].name;
                var entityType = Customer[0].entityType;
                //if CustomerId is type of "Account" then get Primary Contact id of that account
                if (entityType == "account") {
                    var contact = Xrm.Page.getAttribute("customerid").getValue();
                    if (contact === null) return;
                    var serverUrl = Xrm.Page.context.getClientUrl();
                    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
                    var req = new XMLHttpRequest();
                    req.open("GET", oDataSelect, false);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
                    req.onreadystatechange = function () {
                        if (req.readyState === 4) {
                            if (req.status === 200) {
                                var retrieved = JSON.parse(req.responseText).d;
                                CustomerId = retrieved.PrimaryContactId.Id;
                            else {
                                alert(this.statusText);
                    req.send();
            function CreateEmail() {
                GetOwnerID();
                email.Subject = "Email with Report Attachment";
                //Set The current order as the Regarding object
                email.RegardingObjectId = {
                    Id: Xrm.Page.data.entity.getId(),    //Get the current entity Id , here OrderId
                    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
                //Create Email Activity
                SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
            // Email Call Back function
            function EmailCallBack(result) {
                email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
                var activityPartyFrom = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyFrom.PartyId = {
                    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "contact"
                // Set the "activity" of the ActivityParty
                activityPartyFrom.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).
                activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
                // Create the from ActivityParty for the email
                SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
                var activityPartyTo = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyTo.PartyId = {
                    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "systemuser"
                // Set the "activity" of the ActivityParty  
                activityPartyTo.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).    
                activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
                // Create the from ActivityParty
                SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
            //ActivityParty From Callback
            function ActivityPartyFromCallBack(result) {
            //ActivityParty To Callback
            function ActivityPartyToCallBack(result) {
                GetReportId('ABM_Infotech_SalesQuote');
            //Create attachment for the created email
            function CreateEmailAttachment() {
                //get reporting session and use the params to convert a report in PDF
                var params = getReportingSession();
                //Email attachment parameters
                var activitymimeattachment = Object();
                activitymimeattachment.ObjectId = Object();
                activitymimeattachment.ObjectId.LogicalName = "email";
                activitymimeattachment.ObjectId.Id = email.ActivityId;
                activitymimeattachment.ObjectTypeCode = "email",
                    activitymimeattachment.Subject = "File Attachment";
                activitymimeattachment.Body = encodePdf(params);
                activitymimeattachment.FileName = "Report1.pdf";
                activitymimeattachment.MimeType = "application/pdf";
                //Attachment call
                SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
            //ActivityMimeAttachment CallBack function
            function ActivityMimeAttachmentCallBack(result) {
                var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
                var width = "800px";
                var height = "600px";
                window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
                // To open window which works in outlook and IE both
                //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width,
    height, features);
            //This method will get the reportId based on a report name that will be used in            getReportingSession() function
            function GetReportId(reportName) {
                var oDataSetName = "ReportSet";
                var columns = "ReportId";
                var filter = "Name eq '" + reportName + "'";
                retrieveMultiple(oDataSetName, columns, filter, onSuccess);
            function retrieveMultiple(odataSetName, select, filter, successCallback) {
                var serverUrl = Xrm.Page.context.getServerUrl();
                var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
                var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
                if (select) {
                    odataUri += "$select=" + select + "&";
                if (filter) {
                    odataUri += "$filter=" + filter;
                $.ajax({
                    type: "GET",
                    contentType: "application/json; charset=utf-8",
                    datatype: "json",
                    url: odataUri,
                    beforeSend: function (XMLHttpRequest) {
                        XMLHttpRequest.setRequestHeader("Accept", "application/json");
                    success: function (data) {
                        if (successCallback) {
                            if (data && data.d && data.d.results) {
                                successCallback(data.d.results);
                            else if (data && data.d) {
                                successCallback(data.d);
                            else {
                                successCallback(data);
                    error: function (XmlHttpRequest, errorThrown) {
                        if (XmlHttpRequest && XmlHttpRequest.responseText) {
                            alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
            function onSuccess(data) {
                reportId = data[0].ReportId.replace('{', ").replace('}', ");
                CreateEmailAttachment(); // Create Email Attachment
            //Gets the report contents
            function getReportingSession() {
                var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
                var retrieveEntityReq = new XMLHttpRequest();
                var Id = Xrm.Page.data.entity.getId();
                var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
                quotationGUID = quotationGUID.replace('}', "");
                var reportName = "ABM_Infotech_SalesQuote"; //set this to the report you are trying to download
                var reportID = "751089AA-74B8-E211-B52F-D8D3855B253B"; //set this to the guid of the report you are trying to download
                var rptPathString = ""; //set this to the CRMF_Filtered parameter
                var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition
    attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
                retrieveEntityReq.open("POST", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName="
    +
                                reportName + "&isScheduledReport=false&p:ABMFilteredQuote=" + strParameterXML;
                //remove the part starting from &p:salesorderid if your report has no parameters
                retrieveEntityReq.send(rptPathString);
                var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
                var ret = new Array();
                ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
                x = retrieveEntityReq.responseText.indexOf("ControlID=");
                ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
                return ret;
            var bdy = new Array();
            var bdyLen = 0;
            function concat2Bdy(x) {
                bdy[bdyLen] = x;
                bdyLen++;
            function encodePdf(params) {
                bdy = new Array();
                bdyLen = 0;
                var retrieveEntityReq = new XMLHttpRequest();
                var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
                "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
                "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
                retrieveEntityReq.open("GET", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.send();
                BinaryToArray(retrieveEntityReq.responseBody);
                return encode64(bdy);
            var StringMaker = function () {
                this.parts = [];
                this.length = 0;
                this.append = function (s) {
                    this.parts.push(s);
                    this.length += s.length;
                this.prepend = function (s) {
                    this.parts.unshift(s);
                    this.length += s.length;
                this.toString = function () {
                    return this.parts.join('');
            var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            function encode64(input) {
                var output = new StringMaker();
                var chr1, chr2, chr3;
                var enc1, enc2, enc3, enc4;
                var i = 0;
                while (i < input.length) {
                    chr1 = input[i++];
                    chr2 = input[i++];
                    chr3 = input[i++];
                    enc1 = chr1 >> 2;
                    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                    enc4 = chr3 & 63;
                    if (isNaN(chr2)) {
                        enc3 = enc4 = 64;
                    } else if (isNaN(chr3)) {
                        enc4 = 64;
                    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
                return output.toString();
        </script>
        <script type="text/vbscript">
        Function BinaryToArray(Binary)
               Dim i
               ReDim byteArray(LenB(Binary))
               For i = 1 To LenB(Binary)
                     byteArray(i-1) = AscB(MidB(Binary, i, 1))
                     concat2Bdy(AscB(MidB(Binary, i, 1)))
             Next
              BinaryToArray = byteArray
       End Function     
        </script>
    </head>
    <body>
        <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>

Maybe you are looking for

  • Encoding error occurs using parameter "default path for scripts"

    Hello, assume we have a script "/home/artur/tymczasowe/test.sql". I can execute it using SQL Developer by: @/home/artur/tymczasowe/test.sql Everything works as expected. Then I set parameter "Tools - Preferences - Database - Worksheet - Default path

  • Burned CD's won't play in my cars

    I have no problems burning CD's on my iMac but the resulting disc does not play properly in 2 cars. The CD's will play on my domestic CD player but in the cars the first tracks are OK but the later ones break up. This seems to be a problem with my iM

  • Label chart (2d columns) vertical

    Hi, I created a 2d column chart. The label on the X ax is standard horizontal. Is there a way to display it vertical? Rgrds, Robbert

  • Java EXE - Passing Attributes

    Hi, I have a java application that performs many functions. I have compiled this application into an exe file. I would like to automate things. E.g. using Windows Scheduler to run the app at 2am - execute function1, 4am - execute funtion2. etc.. Is i

  • "CRM JAVA CUSTOMER PROJECT 5.0"

    Where can i get the "CRM JAVA CUSTOMER PROJECT 5.0" package