Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Get Product Specifications Column in SSRS

Posted on by 435

Hi there,

            I have created a Display method which gives me Product Specifications i.e.

display AttributeValueText getItemIdAttributeValue(RefRecId _product=this.Product)
{
EcoResProductAttributeValue ecoResProductAttributeValue;
AttributeValueText attributeValueText;
InventTable InventTable;
EcoResAttribute ecoResAttribute;
EcoResValue ecoResValue;
str Brand,size,countryoforigin,material,ResistanceOption,Density,Style;
;

while select ecoResProductAttributeValue
         where ecoResProductAttributeValue.Product == _product
             join Name from ecoResAttribute
                where ecoResProductAttributeValue.Attribute == ecoResAttribute.RecId
                      join ecoResValue where ecoResValue.RecId == ecoResProductAttributeValue.Value
       {
           attributeValueText = ecoResValue.value();
       }

        return attributeValueText;

       }

When i am trying to use this method in SSRS Column its not giving me only the Last Specification Value.

I have also tried by taking Matrix Column, but the output is same.

Above code is working fine when i try to run as a Job, its giving me all the specification values.

Can you please guide me how to use the above method in SSRS Column to give me all the Specifications values.

Thanks

Regards

Altaf

 

*This post is locked for comments

  • Mohammed Altaf Profile Picture
    Mohammed Altaf 435 on at
    RE: Get Product Specifications Column in SSRS

    Hi @Crispin John Augustine

    As you said i have tried by using Container and its giving me the same output.

    I think there is some mistake in my Code can you please review my below code and point me out where i have gone wrong.

    display AttributeValueText getItemIdAttributeValue(RefRecId _product=this.Product)

    {

       EcoResProductAttributeValue ecoResProductAttributeValue;

       AttributeValueText          attributeValueText;

       InventTable                 InventTable;

       EcoResAttribute             ecoResAttribute;

       EcoResValue                 ecoResValue;

       str  Brand,size,countryoforigin,material,ResistanceOption,Density,Style,readData;

       container        attrValue;

       int              conLength, cnt;

       ;

       while select ecoResProductAttributeValue

           where ecoResProductAttributeValue.Product == _product

               join Name from ecoResAttribute

               where ecoResProductAttributeValue.Attribute ==    ecoResAttribute.RecId

                   join ecoResValue where ecoResValue.RecId == ecoResProductAttributeValue.Value

       {

           attrValue += ecoResValue.value();

           conLength = conLen(attrValue);

           for(cnt = 1; cnt<=conLength;cnt++)

           {

               attributeValueText = conPeek(attrValue,cnt);

           }

       }

       return attributeValueText;

    }

    Thanks.

  • Mohammed Altaf Profile Picture
    Mohammed Altaf 435 on at
    RE: Get Product Specifications Column in SSRS

    Hi @Crispin John Augustine  

     Thanks for your valuable reply.

    i have changed my line as you said, now its giving me all the Values.But its giving all the Values in one column.

    I need to get the values column by column.

    I tried to use get the report by using matrix but same output.

    Can you please guide me how the get values column by column.

    Thanks

    Regards.

  • Suggested answer
    István Orosz Profile Picture
    István Orosz 2,137 on at
    RE: Get Product Specifications Column in SSRS

    Hi Mohammed,

    You can use display methods only if you report is Query based. If you use DP class, insert the value in a field which should be filled in the DP class.

    Regards,

    István

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get Product Specifications Column in SSRS

    Mohammed,

    If your report is Query based report, refer the below link:

    http://axlearn.blogspot.in/2014/01/empezando-con-los-informes.html

    The below link has the discussion on the same topic:

    community.dynamics.com/.../201851

    Please mark this post as verified, if it helped you!!!

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans