Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

AX, SSRS, and table field arrays

(0) ShareShare
ReportReport
Posted on by 3,085

I have created my own custom EDT that is an array.  It has 13 elements, the first of which is automatically created so I created 2-13.

Everything is fine until I try to use this in an SSRS report.  When I refresh the dataset in SSRS, I see the array populated as 13 different fields like so:

MyFieldArray

MyFieldArray1

MyFieldArray2

...

MyFieldArray12

This is a little strange in that AX uses 1-13 not 0-12 but didn't seem to bad...

The problem is that if, in AX, I set myFieldArray[1], that can come through into SSRS into ANY of the fields in the dataset... Could be MyFieldArray6, or MyFieldArray2.  It changes each time I run the report.

Have I set something up wrong?

*This post is locked for comments

  • b_radlyjames Profile Picture
    b_radlyjames 3,085 on at
    RE: AX, SSRS, and table field arrays

    Martin,

    I would disagree. =)

  • b_radlyjames Profile Picture
    b_radlyjames 3,085 on at
    RE: AX, SSRS, and table field arrays

    Hariharan,

    That was it!  Thank you!!!

  • Martin Dráb Profile Picture
    Martin Dráb 230,836 Most Valuable Professional on at
    RE: AX, SSRS, and table field arrays

    No, it's not strange that the first index is 1. It's exactly how it's designed in Dynamics AX. That other languages use zero-based indexes is irrelevant.

  • Verified answer
    Hariharans87 Profile Picture
    Hariharans87 on at
    RE: AX, SSRS, and table field arrays

    It is not changing randomly. I have reproduced this issue.

    The problem is in the the SSRS dataset fields name creation part.

    Please don't look the dataset fields name. Please have a look on the SSRS dataset field alias property. It is the correct mapping with the table fields.

    SSRS-EDT-Array-Issue.png

  • Suggested answer
    b_radlyjames Profile Picture
    b_radlyjames 3,085 on at
    RE: AX, SSRS, and table field arrays

    myTable.MyFieldArray[1] = myValue;

    And yes, if I set it to 1 in AX I have to get out of 6 or another location.  The locations are constantly changing.

  • Hariharans87 Profile Picture
    Hariharans87 on at
    RE: AX, SSRS, and table field arrays

    You mean, if you assign the value to myFieldArray[1], but that value is displaying in the SSRS report MyFieldArray6 field.

    Example, I have the address array field, i assign value to addresss[1]. In SSRS address1 is empty and address2 is displaying address1 value.

    If the above example match your problem, Please let me know that how you are assign the value to the array fields in the temp table (SSRS report datasource). Please share your code.

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans