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 AX (Archived)

To Hide the Data of the Fields which displays zero's in the quantities

(0) ShareShare
ReportReport
Posted on by

I had a Report in which it is displaying the data of some fields as zero.

Example:

I am having a Report which is to be displayed as

S.No     Items       Description        Bags          Quantity           No of Packet     Total

1          GSR          Nothing             10              5                      10                       25

2          GLR           Nothing             5               5                      5                         15

3          G               Nothing             0               0                      5                          5

4          D               Nothing             2               0                      0                          2

5          R               Nothing             0               0                      0                          0 

My requirement is not to display the data of S.No 5 totally.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Zain Bokhari Profile Picture
    3,208 Moderator on at

    You can add a range in your form's data source's Query for fieldValue> 0, or whatever field you want to use to determine whether to hide a record, when value is zero, or when all of them are. It will then not display any records  with zero quantity. Assuming that is what you need, since all values are zero for the row you mentioned?

  • Community Member Profile Picture
    on at

    by using this range i am facing an issue that two more fields are not displaying which are greater than 0

  • Suggested answer
    axk Profile Picture
    925 on at

    Hey Danda,

    What if you set your query ranges for all fields to have value different from 0? As I understood, you want to hide records, which all values are 0.

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You wanted to hide records for which adding a range is a correct answer, but in your next reply now you are talking about hiding fields, which is not the same. If you indeed want to hide records but you are hiding more, then your query range must be incorrect.

    You could verify it easily by doing Control+G to show the filters above your grid, apply the filters manually to have the desired results. Then right click on a field>Personalize>Query tab, verify what ranges do you have for your datasource and do a screen capture.

    Then modify the code of the form to apply the query range in the init() of your form datasource table, run the form, and again see what ranges do you have in the query.

    If they are not the same of what you are expecting, again, your applied range is wrong.

  • Community Member Profile Picture
    on at

    Ya i completed it but it raised another issue of not showing two records which are greater than zero

  • Zain Bokhari Profile Picture
    3,208 Moderator on at

    What I understand is that you want to filter out the records which show a total count(all columns) of zero.

    Can you show us what you did and where? Screen shots maybe?

  • Verified answer
    Community Member Profile Picture
    on at

    But put the range as <0,>0 for not displaying the values that are having Zero.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Why don't you use this?

    SysQuery::valueNot(0)

    msdn.microsoft.com/.../sysquery.valuenot.aspx

  • Community Member Profile Picture
    on at

    Now The issue had already solved.

    Before solving the issue you have send Mr. Vilmos

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    I fully understand that you think it is solved, however, I wanted to point out that it is better to rely on helper classes like SysQuery, and should familiarize yourself with those tools for your own sake to improve your code quality. In this case you are hardcoding values for the range which would fail during code review that are used by larger implementation teams, thus I suggested to use a better alternative.

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans