web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error while uploading report in Microsoft Dynamics CRM Online

(0) ShareShare
ReportReport
Posted on by

I have created a report using fetch-xml query for Microsoft Dynamics CRM Online. In this field, I have created a custom enity which has "Last Accessed Date Time" field of type "DateTime". This field stores the value in GTM. I am retrieving the value of this field using fetch-xml query. Also, I want to calculate the difference between the current DateTime and the value (in the locale and not in GMT) of this field in "Hours Minutes Seconds" format. I have written an expression for the same in reportas follows.

(IIF(((INT((DateDiff(DateInterval.Second, DateTime.SpecifyKind(DateTime.Parse(Fields!new_lastaccesseddatetime.Value), DateTimeKind.Utc).ToLocalTime(), DateTime.Now))/60))>60), INT(((((DateDiff(DateInterval.Second, DateTime.SpecifyKind(DateTime.Parse(Fields!new_lastaccesseddatetime.Value), DateTimeKind.Utc).ToLocalTime(), DateTime.Now)))/60)) / 60), 0))
& "Hours"&
(IIF(((INT((DateDiff(DateInterval.Second, DateTime.SpecifyKind(DateTime.Parse(Fields!new_lastaccesseddatetime.Value), DateTimeKind.Utc).ToLocalTime(), DateTime.Now))/60))>60), INT((((DateDiff(DateInterval.Second,DateTime.SpecifyKind(DateTime.Parse(Fields!new_lastaccesseddatetime.Value), DateTimeKind.Utc).ToLocalTime(), DateTime.Now)))/60) Mod 60), INT((DateDiff(DateInterval.Second, DateTime.SpecifyKind(DateTime.Parse(Fields!new_lastaccesseddatetime.Value), DateTimeKind.Utc).ToLocalTime(), DateTime.Now))/60)))
& "Minutes" &
((DateDiff(DateInterval.Second, DateTime.SpecifyKind(DateTime.Parse(Fields!new_lastaccesseddatetime.Value),
DateTimeKind.Utc).ToLocalTime(), DateTime.Now)) Mod 60)
& "Seconds"


This works fine in visual studio. But, when tried to upload the same report in CRM Online organization, it gives the following error.

Any idea how to solve this issue?

*This post is locked for comments

I have the same question (0)
  • Guido Preite Profile Picture
    54,086 Moderator on at

    did you download the log file? what is written inside?

  • Community Member Profile Picture
    on at

    Thanks for yor quick reply Guido.

    The following is the log file.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.Detail:

    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance&quot; xmlns="schemas.microsoft.com/.../Contracts&quot;>

     <ErrorCode>-2147188072</ErrorCode>

     <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

     <Message>An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.</Message>

     <Timestamp>2015-04-21T14:17:28.0223365Z</Timestamp>

     <InnerFault i:nil="true" />

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

  • Verified answer
    Rajkumar Rajaraman Profile Picture
    on at

    Hi Purva,

    Take a look to the following link. It explains deeply.

    a33ik.blogspot.in/.../issues-uploading-report-to-crm-online.html

    thinketg.com/dynamics-crm-error-uploading-report-solved

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Verified answer
    Community Member Profile Picture
    on at

    I have found the following useful link-

    - support.microsoft.com/.../en-us

    The error occurred because I have used some functions("Int", "DateTime.SpecifyKind(DateTime.Parse(Fields!new_lastaccesseddatetime.Value), DateTimeKind.Utc).ToLocalTime()") in my ssrs report which are not supported by CRM Online., though it works fine in visual studio.

  • Community Member Profile Picture
    on at

    Hi Purva

    I had the same issue and in my case it was the version differences. 

    If the .rdl file which is exported (downloaded) from CRM has a text like that (it's nearly at the end)

    Microsoft.Crm.Reporting.RdlHelper, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    

    and in the .rdl file produced in SSRS has a line like that

    Microsoft.Crm.Reporting.RdlHelper, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    

    Change the version to 6.0.0.0 in SSRS before importing to CRM

    If this isn't your case maybe this article is  (https://support.microsoft.com/en-us/kb/2600639

  • Suggested answer
    PriyaP Profile Picture
    15 on at

    Hi Purva, if you have solved this please help me in this, I have used date format like,

    IIf(DateAdd("d",Fields!durationdays.Value,Fields!startdate.Value).Date > ("31/Dec/2017"),(IIF(IsNothing(Fields!startdate.Value), 0, DateDiff(DateInterval.Day, Fields!startdate.Value, CDate("31/Dec/2017")))),Fields!durationdays.Value)

    And I am not getting which part is not supported by online CRM.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans