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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Table buffer is null on report display method

(0) ShareShare
ReportReport
Posted on by 258

Hi All,

In the report init() method getting the table buffer values based on some conditions. When i try to print the values in display method() , here the table buffer is showing null .

Ex :

init()

TableA a;

str value;

;

if(element.args())

{

value = element.args().parm();

select a where a.filed1==value;// here the table buffer contains value

}

super();

}

display Name custName()

{

return a.custName; // here while dubugging the table buffer (shows null) and printing the empty

values in the report.

}

 Note : I am using AX 4.0.

Is this is the correct way or please do suggest the alternate way.

Thanks in Advance !

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    236,297 Most Valuable Professional on at
    RE: Table buffer is null on report display method

    Your variable a is declared in the init() method, therefore it doesn't exist outside init(). You could put it into classDeclaration, initialize it in init() and then use it in other methods.

  • Manikanda Gopal Profile Picture
    258 on at
    RE: Table buffer is null on report display method

    Hi Martin,

    Thanks for the prompt reply.

    Apologizes !! Actually variable a was declared in class declaration only not in init() method. I mentioned above that wrongly.

  • Martin Dráb Profile Picture
    236,297 Most Valuable Professional on at
    RE: Table buffer is null on report display method

    Assuming that there is no other code changing the value of the variable, the problem may be in packing and unpacking the object. Can you please check whether you aren't setting and reading the value on different tiers (such as setting the value on client and reading it on server)?

    In either case, I encourage you to use debugger to identify where exactly the value disappears.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans