Kindly send anybody a ppt on how to execute reports through Browser and Ana

Hi all,
I need a PPT on how to execute reports through Browser and Analyzer in version 3.5 or older to 3.5 immediatley from end user point of view. I donot have time to prepare it and has to be sumbmitted before end of the day.
Kindly help me out by sending it [email protected] .
Thanks in Advance.
Anil Kumar Sharma .P

Thank you Mr. Voodi,
I will wait for your reply.
Meanwhile could anybody else ,send me PPT on it.
Thanks in Advance,
Anil Kumar
Message was edited by:
        Anil Kumar Sharma

Similar Messages

  • Dynamic CRM 2013 Online how to execute Report, generate PDF and email

    Dear All,
    I am using Dynamic CRM 2013 online. For quote, I have workflow and Dialogue processes for review process. On approval, I want the system to generate a PDF of quote report, attach the PDF and email it to the Customer.
    Better I would like, When approver, clicks on the approve button, the system should auto generate a PDF of quote report, attach the PDF and email it to the Customer, without any further input from the user. If its not possible, I may have to put button on
    quote form.
    I am using the attached code, but facing various issues.
    1. Under prepare the SOAP Message coding part, I am not sure what should be the below URL for CRM 2013 Online?
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    2. What should be the emailid here? Is it Recepient Contact id(Guid) ?
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    3. Using this code, not able to create Entity for "ActivityMimeAttachment", I am getting newEntity as undefined.
    Below is the code I am using. Please check and help me out, where I am going wrong. Let me know if any better way to implement it. At present, I have put one button on quote form, on click event, below code will get executed.
    <!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">
    var Xrm;
    if (window.opener) { Xrm = window.opener.Xrm; }
    else if (window.parent) { Xrm = window.parent.Xrm; }
    function getReportingSession() {
    var reportName = "Quotation_Report"; //set this to the report you are trying to download
    var reportId = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
    var recordid = Xrm.Page.data.entity.getId();
    // recordid = recordid.substring(1, 37); //getting rid of curly brackets
    alert(recordid);
    var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
    var retrieveEntityReq = new XMLHttpRequest();
    retrieveEntityReq.open("POST", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    retrieveEntityReq.send("id=%7B" + reportId + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false");
    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;
    function createEntity(ent, entName, upd) {
    var jsonEntity = JSON.stringify(ent);
    var createEntityReq = new XMLHttpRequest();
    var ODataPath = Xrm.Page.context.getServerUrl() + "XRMServices/2011/OrganizationData.svc";
    createEntityReq.open("POST", ODataPath + "/" + entName + "Set" + upd, false);
    createEntityReq.setRequestHeader("Accept", "application/json");
    createEntityReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    createEntityReq.send(jsonEntity);
    var newEntity = JSON.parse(createEntityReq.responseText).d;
    alert("new entity" + newEntity);
    return newEntity;
    function createAttachment() {
    var params = getReportingSession();
    var recordid = Xrm.Page.data.entity.getId();
    alert("recordid " + recordid);
    var orgName = Xrm.Page.context.getOrgUniqueName();
    var userID = Xrm.Page.context.getUserId();
    //create email record
    // Prepare the SOAP message.
    var xml = "<?xml version='1.0' encoding='utf-8'?>" +"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" +
    " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
    " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" +
    "<soap:Header>" +
    "</soap:Header>" +
    "<soap:Body>" +
    "<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
    "<entity xsi:type='email'>" +
    "<regardingobjectid type='quote'>" + recordid + "</regardingobjectid>" +
    "<subject>" + "Email with Attachment4" + "</subject>" +
    "</entity>" +
    "</Create>" +
    "</soap:Body>" +
    "</soap:Envelope>";
    // Prepare the xmlHttpObject and send the request.
    var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    xHReq.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Create");
    xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xHReq.setRequestHeader("Content-Length", xml.length);
    xHReq.send(xml);
    // Capture the result
    var resultXml = xHReq.responseXML;
    // alert("resultXml " + resultXml);
    // Check for errors.
    var errorCount = resultXml.selectNodes('//error').length;
    if (errorCount != 0) {
    alert("ERROR");
    var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
    alert(msg);
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    //var emailid = userID;
    var post = Object();
    post.Body = encodePdf(params);
    var email = new Array();
    email[0] =new Object();
    email[0].id = emailid;
    email[0].entityType ='email';
    post.Subject ="File Attachment";
    post.AttachmentNumber = 1;
    post.FileName ="Report.pdf";
    post.MimeType ="application/pdf";
    post.ObjectId = Object();
    post.ObjectId.LogicalName ="email";
    post.ObjectId.Id = email[0].id;
    post.ObjectTypeCode ="email";
    alert(post.ObjectId.Id);
    createEntity(post,"ActivityMimeAttachment", "");
    alert("created successfully");
    email.Subject = "Your Order";
    //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, // 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, // 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) {
    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();
    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);
    </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="createAttachment();" value="Attach Report" />
    </body>
    </html>
    Thanks. and waiting for your valuable comments.
    - Mittal

    Hello,
    Yes, I was able to make my code working as below. Tested on CRM online 2013.
    <!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 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('Quotation');
    //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 = "Report.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 = "Quotation"; //set this to the report you are trying to download
    var reportID = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //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:CRMAF_Filteredquote=" + 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>
    Thank you,
    Mittal.

  • I am having trouble sending text messages. They aren't always going through. And sometimes I'm not receiving text messages.  I also have voicemails that I didn't receive until late at night that were left early in the day. I need to resolve this issue ASA

    I am having trouble sending text messages. They aren't always going through. And sometimes I'm not receiving text messages.  I also have voicemails that I didn't receive until late at night that were left early in the day. I need to resolve this issue ASAP!

    julie@remax,
    I know that this would concern me just the same and we want to make sure that your device is connected and receiving these notifications when available. How long have you been having this issue? Are you receiving a specific error message when sending a message? Are you aware if this happens in one location specifically or everywhere you go? Does the issue with messaging occur with all numbers? Share some details, so that we may assist.
    AdamG_VZW
    Follow us on Twitter @VZWSupport

  • HT4461 I recently downloaded an app from App Store which is a paid app and it doesn't have any features as in the description in the App Store. How do I report this app and stop payment what I did online to purchase it.

    I recently downloaded an app from App Store which is a paid app and it doesn't have any features as in the description in the App Store. How do I report this app and stop payment what I did online to purchase it.

    Hi Sajeed.f,
    This article has the steps to go through to file such a report:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/ht1933
    Cheers!
    - Ari

  • How to get report Server Name and Environment ID in Report

    How to print report Server Name and Environment ID in Report 10G.(Through in package or others)
    I'm also using Oracle Application Server 10G.

    Hi,
    Server and envid are the parameters passed along with Reports URL call.
    These variables value can be traped in Report by defining SERVER , ENVID named user parameters.
    Once trapped, can be printed on Report.
    Just ensure that these users parameters are not exposed to Parameter page, otherwise user may end up changing it.
    Thanks

  • Definition of the best approach on how to do reporting between BPC and BW

    Hi,
    I need your opinion in the definition of the best approach on how to do reporting between BPC and BW.
    For example if we want to do reporting using BW on Actuals Vs Budget how should we manage this since technically BPC Model and BW InfoCube is different?
    BPC Models have the Budget and BW has the actuals, but the InfoObject that is used for Account is different. What is the best approach to do the reporting?
    Thanks in advance,
    JA

    Hi Gersh
    I already thought in that option, but the problem is the Yellow requests in the Infocube that are not used by VP.
    In the past I used Report RSAPO_CLOSE_TRANS_REQUEST_ALL3 in the virtual function module to close the requests, but now I didn't want to use VP based on function module.
    Is there any option to use data in Yellow requests in VP based on DTP?
    Best regards,
    JA

  • I have received an email receipt charging me $109.99 for an app I've never heard of and definitely never downloaded. How do I report the problem and get a refund?

    I have received an email receipt charging me $109.99 for an app I've never heard of and definitely never downloaded. How do I report the problem and get a refund?

    Log into your iTunes account, then click on previous purchases then select the purchased app and then click report a problem.  Then write and explain your problem and I am sure it will be considered. 
    Also change your iTunes password as soon as possible.

  • How to execute a string formula and assign the result to a number field

    How to execute a string formula and assign the result to a number field
    Hi,
    we have a function that returns a string like this:
    '(45+22)*78/23'
    After we should calculate this string and assign the value to a numeric block field
    Example:
    k number(16,3);
    k:=fun1('(45+22)*78/23'); where fun1 execute and translate to number the string.
    Does exist a function like fun1 ??
    How can we do ?
    Regards

    Hello,
    this is the code that does the job:
    SQL> set serveroutput on
    SQL> DECLARE
    2 ch VARCHAR2(20) :='22+10' ;
    3 i NUMBER ;
    4 BEGIN
    5 EXECUTE IMMEDIATE 'select ' || ch || ' from dual' INTO i;
    6 dbms_output.put_line ('i = ' || TO_CHAR(i));
    7 END ;
    8 /
    i = 32
    Procédure PL/SQL terminée avec succès.
    SQL>
    just you have to do is to create a small stored function that take the string to calculate and return the number result
    Francois

  • How to execute workflow through javascript in CRM 2013

    Hi,
    I have created a business process and I want to execute workflow on custom button through javascript. I tried this script but this script does not run after message box show. Please tell me how to execute my workflow through javascript
    function RunWorkflow() {
        var _return = window.confirm('Are you want to execute workflow.');
        if (_return) {
            var url = Xrm.Page.context.getServerUrl();
            var entityId = Xrm.Page.data.entity.getId();
            var workflowId = '541B45C9-3F88-4448-9690-2D4A365C3172';
            var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
            url = url + OrgServicePath;
            var request;
            request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
                          "<s:Body>" +
                            "<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"
    +
                              "<request i:type=\"b:ExecuteWorkflowRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"
    xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">" +
                                "<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">"
    +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>EntityId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + entityId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>WorkflowId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + workflowId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                "</a:Parameters>" +
                                "<a:RequestId i:nil=\"true\" />" +
                                "<a:RequestName>ExecuteWorkflow</a:RequestName>" +
                              "</request>" +
                            "</Execute>" +
                          "</s:Body>" +
                        "</s:Envelope>";
            var req = new XMLHttpRequest();
            req.open("POST", url, true)
            // Responses will return XML. It isn't possible to return JSON.
            req.setRequestHeader("Accept", "application/xml, text/xml, */*");
            req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
            req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
            req.onreadystatechange = function () { assignResponse(req); };
            req.send(request);
    function assignResponse(req) {
        if (req.readyState == 4) {
            if (req.status == 200) {
                alert('successfully executed the workflow');

    Hi,
    I used this script for execute the workflow but its not working. When I used alert(req.status); then 500 show. Please tell me what did I mistake in my script.
    function RunWorkflow() {
        var _return = window.confirm('Are you want to execute workflow.');
        if (_return) {
            var url = Xrm.Page.context.getClientUrl();
            var entityId = Xrm.Page.data.entity.getId();
            var workflowId = '541B45C9-3F88-4448-9690-2D4A365C3172';
            var OrgServicePath = "/XRMServices/2011/Organization.svc/web";
            url = url + OrgServicePath;
            var request;
            request = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
                          "<s:Body>" +
                            "<Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">"
    +
                              "<request i:type=\"b:ExecuteWorkflowRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\"
    xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">" +
                                "<a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">"
    +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>EntityId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + entityId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                  "<a:KeyValuePairOfstringanyType>" +
                                    "<c:key>WorkflowId</c:key>" +
                                    "<c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">"
    + workflowId + "</c:value>" +
                                  "</a:KeyValuePairOfstringanyType>" +
                                "</a:Parameters>" +
                                "<a:RequestId i:nil=\"true\" />" +
                                "<a:RequestName>ExecuteWorkflow</a:RequestName>" +
                              "</request>" +
                            "</Execute>" +
                          "</s:Body>" +
                        "</s:Envelope>";
            var req = new XMLHttpRequest();
            req.open("POST", url, true)
            // Responses will return XML. It isn't possible to return JSON.
            req.setRequestHeader("Accept", "application/xml, text/xml, */*");
            req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
            req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
            req.onreadystatechange = function () { assignResponse(req); };
            req.send(request);
    function assignResponse(req) {
        if (req.readyState == 4) {
    alert(req.status);
            if (req.status == 200) {
                alert('successfully executed the workflow');

  • How to hide "View in Browser" and "Edit in Browser" from ECB injected by Office Web Apps Feature

    Hi,
    i am currently using custom_AddDocLibMenuItems to implement a custom ECB menu for my document library. I need to activate Office Web Apps. My custom_AddDocLibMenuItems has two items
    -> custom dialog
    -> open in office web apps
    After activating the Office Web Apps Feature at the SiteCollection Level, this Feature "injects" in my custom menu the following
    additional menu items:
    -> View in Browser
    -> Edit in Browser
    Its curious to see that, cause implementing the js function custom_AddDocLibMenuItems with
    return true should be the way to impolement a custom ECB menu without having other features/solutions injecting things in this menu!? Or did i misunderstood something here?
    My question is: How can i prevent this ...
    a) without deactivating the Office Web Apps Feature
    b) without modifying the core.js
    I hope someone can help!
    Best Regards
    Bog
    Developers Field Notes | www.bog1.de

    May be this can help
    http://extreme-sharepoint.com/2011/10/29/hide-menu-ecb/http://pholpar.wordpress.com/2011/07/24/hiding-ecb-custom-actions-based-on-specific-list-properties-using-the-client-object-model/Or tryhttp://stackoverflow.com/questions/13795858/how-to-hide-view-in-browser-in-document-library-in-sharepoint-2010-using-javascr $(document).ready(function(){
    $('.ms-MenuUIPopupBody').live('blur', function() {
    var elm = $("div.ms-MenuUIULItem a:contains('View in Browser')");
    elm.remove();
    $("div.ms-MenuUIULItem a:contains('Edit in Browser')").remove();
    It is hiding menu only on focus or blur or mouseover
    I wants it to be hide on load AS soon as i Click on "V" option on right side of document it should hide View in Browser and Edit in browser
    When I click on V option ![I wants As soon as i Click on v option right side of test it should hide view in Browser and edit in browser][1]
    If this helped you resolve your issue, please mark it Answered

  • How to export report to excel and to text file in previewer

    How to export report to excel?
    And, it takes long time for generate report to rtf or pdf file in previewer.
    How to speed up the process? or, it's better generate report to text file directly by Run_product?
    Please help!

    You can generate report to tab delimite format that can be imported to excel.
    As for the performance question, because reports can't specify what format when you run against previewer, so I don't know what previewer you are talking about. Generate to file is always faster than to your application previewer (assume) because you have one more step after output generated in the file: read from file and render it. Depends on the render and size of the output, it may have significant performance difference.
    Thanks,
    -Shaun

  • How to implemenet "Edit in Browser" and "View in Browser" in custom ECB Menu

    Hi,
    i have build a custom ECB menu. I implemented for example "Edit in Microsoft xxx" Item successfully.
    setDocType();
    if (currentItemAppName != "" && currentItemOpenControl != "") {
    strDisplayText = "";
    if (currentItemAppName != " ")
    strDisplayText = StBuildParam(L_EditIn_Text, currentItemAppName);
    else {
    var objEditor = StsOpenEnsureEx2(currentItemOpenControl + ".3");
    if (objEditor != null)
    strDisplayText = L_EditInApplication_Text;
    if (strDisplayText != "") {
    strAction = "editDocumentWithProgID2('" + currentItemFileUrl + "', '" + currentItemProgId + "', 'SharePoint.OpenDocuments', '0', '" + ctx.HttpRoot + "', '0')";
    strImagePath = ctx.imagesPath + currentItemIcon;
    CAMOpt(m, strDisplayText, strAction, strImagePath, null, 260);
    CAMSep(m);
    But i couldnt find any information to "Edit in Browser" and "View in Browser". I also look in the core.js and couldnt find any information about this.
    Can someone help? How could i
    implemenet "Edit in Browser" and "View in Browser" in my custom ECB Menu?
    Best Regards
    Bog
    Developers Field Notes | www.bog1.de

    Hi,
    According to your post, my understanding is that you wanted to custom the “View in Browser” and “Edit in Browser” with ECB menu.
    Per my knowledge, the view in browser and edit in browser use the STSNavigate method to navigate the page.
    The URL would like below.
    Edit in Browser:
    http://YourServerName/sites/YourSiteName/_layouts/WordEditor.aspx?id=/sites/YourSIteName/YourLibraryName/YourFileName
    View in Browser:
    http://YourServerName/sites/YourSiteName/_layouts/WordViewer.aspx?id=/sites/YourSIteName/YourLibraryName/YourFileName
    We can get the file name, then use following method to customize the view in browser or edit in browser.
    function Custom_AddDocLibMenuItems(m, ctx) {
    CAMOpt(m, 'Custom Edit In Browser', 'javascript:STSNavigate(siteurl+"_layouts/WordEditor.aspx?id="+currentItemFileUrl)');
    CAMSep(m);
    </script>
    http://weblogs.asp.net/jan/customizing-the-sharepoint-ecb-with-javascript-part-1
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to run report in browser

    hi every body,
    please tell me , i have developed a simple report in 10g report builder (oracle developer suite)
    but i m unable to run it
    my 10g forms are running well in browser by using
    http://<Machinename :8889>/forms/frmservlet?config=<config_tag>
    Please advise me how to test or runb the report in browser same as form
    and tell me how to create the report server/find report server and configure the source path for it.
    regards
    Mani

    You may start digging at...
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/toc.htm

  • How to run report through form

    dear friends
    i have a problum i craeted a report and i want when i press the button
    the report dispalyed
    please send me the code for that i tried lot but not succesed
    or any possible help
    thanks in advance
    regards
    Vikas Singhal

    Vikas,
    What have you tried so far. Could you give us a code example? Also, what version of Forms and Reports are you using? Forms 6i through Forms 10g have the RUN_REPORT_OBJECT() built-in which is the recommended way to run a report, however you can also use the WEB.SHOW_DOCUMENT() built-in to call a report. There are examples of how to use both in the Forms Help system.
    Craig...

  • Reports through GRC and How it is generated ?

    Dear All,
    I am not aware of  the reports we can generate through GRC Access Control suite relating to Audit, general managemnet etc.
    Kindly let me know the same and How we can generate the same ?
    Kindly help.
    Thanks and Regards,
    Muskaan

    Dear Christian,
    Kindly let me know what all reports are avaible within the access control software.
    To access those reports do we need to configure it or they are readily avaible ?
    Also give some insights as in whick packages GRC is applicable
    Products     _Apllicability of GRC_
    ECC               Yes
    BI                 ?
    APO               Yes
    CRM              Yes
    EP                ?
    Solman                       ?
    TDMS                ?
    MII                ?
    DMS                ?
    BOBJ                ?
    PI                ?
    WMS                        ?
    Vendor Portal          ?
    Thanks and Regards,
    Muskaan

Maybe you are looking for

  • MacBook Pro 2012 running slow

    My current computer, a 2012 MacBook Pro is slower than my old 2009 MacBook. It has been slow since the beginning. I am not computer illiterate but not a technician. Suggestions much appreciated! I did this etrecheck: Problem description: My MacBook P

  • How to generate a new segment in IDoc for multiple occurance of Control Num

    Hi Experts, In my scenario, i need to generate a new segment in IDoc(Target Structure) based on  Control Number Field in the Source Structure. The segment need to be created for multiple occurance of the Control Number. Ex: Control Number - 100 appea

  • Another user-modified table 'Product Tree' (OITT) - Error message

    Hi Our B1 2005A SP01 PL48 sometimes shows the following error message when trying to change a BOM, even if this error is not possible. Another user-modified table 'Product Tree' (OITT) (ODBC -2039) [Message 131-183] What can I do, except for deleting

  • Runtime error (syntax error) when defining a new logical system

    Hi! I get a short dump when trying to define a logical system, the field <b>clidep</b> does is not defined in function module <b>SCPR_BCSET_PROT_GET_TABKEYS</b>: CALL FUNCTION 'SCPR_HI_DB_SCPRACTR_READ'     EXPORTING       TABLENAME     = wa_tabnames

  • Business process engine

    Hi, Is the Business Process engine same as the workflow engine in BPM