Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Custom Code in SSRS Reports for 365 Online

(0) ShareShare
ReportReport
Posted on by 15

Hello,

I am getting the following error message when I am trying to upload an SSRS Report to D365 Online. "The report server has RDLSandboxing enabled and the report contains custom code. Remove the Code element from the report definition." I have read other posts where they say it is not possible to use Custom Code in the Online version. How can I use Custom Code or what else can be done to replace Custom Code.

Thanks!

  • Ignacio Suburu Profile Picture
    Ignacio Suburu 15 on at
    RE: Custom Code in SSRS Reports for 365 Online

    Hello,

    i'm gettin the same error when uploading an SSRS Report with custom code. Did you find a solution for this? I read in the comments that placing the code in the cell could be a solution, but i can't figure out how to do that.

    Thanks!

  • a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Custom Code in SSRS Reports for 365 Online

    Great. If you got what you need  take a minute and close this thread clicking "Yes" under "Did this answer your question?".

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Custom Code in SSRS Reports for 365 Online

    I don't remember that I was implementing exactly your requirement and I haven't done reports for a while so I can't give you exact answer. My recommendation - start doing and you will achieve that.

  • NKaur Profile Picture
    NKaur 15 on at
    RE: Custom Code in SSRS Reports for 365 Online

    I figured that out. Thanks very much for your help!

  • NKaur Profile Picture
    NKaur 15 on at
    RE: Custom Code in SSRS Reports for 365 Online

    Thanks. Do you know how I can use Like or Contains in a Switch statement? So I want to see that if Service contains Trans then display Translate in the report.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Custom Code in SSRS Reports for 365 Online

    Ok, I got it. If you want to deploy report to cloud you will have to remove this code and put it to the place (I believe it's a cell or so) and use it there. I'm really sorry but that's the only way at the moment.

  • NKaur Profile Picture
    NKaur 15 on at
    RE: Custom Code in SSRS Reports for 365 Online

    This is what I have in my Custom Code:

    Function GetPurchaseItemLine_itemRefForVendorPOs(JobType As String, Service As String) As String

    If Service.Contains("Back Translate") And JobType = "Life Sciences" Then Return "Back Translate - LST (P)"

    If Service.Contains("Back Translate") And JobType = "Linguistic Validation" Then Return "Back Translate - LV (P)"

    If Service.Contains("Edit") And JobType = "Life Sciences" Then Return "Edit - LST (P)"

    If Service.Contains("Edit") And JobType = "Linguistic Validation" Then Return "Edit - LV (P)"

    If Service.Contains("Interpret") And JobType = "Life Sciences" Then Return "Interpret - LST (P)"

    If Service.Contains("Interpret") And JobType = "Linguistic Validation" Then Return "Interpret - LV (P)"

    If Service.Contains("Linguistic Proofread") And JobType = "Life Sciences" Then Return "Linguistic Proofread - LST (P)"

    If Service.Contains("Linguistic Proofread") And JobType = "Linguistic Validation" Then Return "Linguistic Proofread - LV (P)"

    If Service.Contains("Rekey") And JobType = "Life Sciences" Then Return "Rekey - LST (P)"

    Return Service

    End Function

    Ad I am calling this in the Expression as:

    =Code.GetPurchaseItemLine_itemRefForVendorPOs(Fields!cti_jobtype.Value,Fields!serviceid.Value)

  • a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Custom Code in SSRS Reports for 365 Online

    Ok, what do you have in "Code" element? Can you please post it here?

  • NKaur Profile Picture
    NKaur 15 on at
    RE: Custom Code in SSRS Reports for 365 Online

    No nothing from the Denied list is being used. The log file is too big to be attached. But the Message is:

    Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]

    Message: The report server has RDLSandboxing enabled and the report contains custom code. Remove the Code element from the report definition.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Custom Code in SSRS Reports for 365 Online

    There should be a button "Download Log" when you get an error message during report upload. Can you please click it and download the report? That should give you more information on issue you experience. Also check if you not use any of "denied" members in your report - docs.microsoft.com/.../rdl-sandboxing

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans