[REPORT] How to show blank fields instead of "NaN" values

Hi everyone,

I'm a student and I have a problem with my report. I'm trying to show salesperson's commission for every month based on Cust. Ledger Entry and Detailed Cust. Ledg. Entry. In situation, when for salesperson there are no entries, my report shows NaN value instead of blank. Do you know how to handle with this problem or how to change displaying for 0 value? It is specially annoying in Date's field.

  • Never seen this "NaN" in a report before!

    Is the issue in NAV or RDLC? Did you check the XML results? (Preview - About this report).
    Or did you put a special format to the field?

    How is the structure of the report, one line per sales person and no details, or a sales person "header" plus individual CLE and DCLE entries? Are these "NaN" values in the detail entries?
    Maybe example of the report?
  • In reply to Erik P. Ernst:

    And welcome to DUG! Smile
  • When there are no entries you can use CURRREPORT.SKIP and the transaction will be completely skipped by the report.
  • In reply to sbhatbng:

    Or just use Property PrintOnlyIfDetail=Yes in the header.
  • In reply to Erik P. Ernst:

    Thanks for reply, I uploaded screenshot so you can see this problem. I checked XML results and everything is fine. I mean there are normal values for salesperson like code and name and then there are related data from CLE and DCLE. I think is a problem only in layout, but I can't resolve it. This amount where are NaN values shown, are calculated from CLE and DCLE records, so I assume that "function" tries to add, multiply etc. empty values.

  • In reply to Papryk77:

    Are you printing FLOWFIELD values, if Yes, then you should use CALCFIELDS otherwise in RDLC it will print some values.
  • In reply to sbhatbng:

    I don't really know, I just calculate my expression in layout in textbox properties, should I do it in other place?
  • In reply to Papryk77:

    You then have to do it in the code. Convert the salesperson LCY to text by using the FORMAT(salesperson LCY) for example SalespersonLCY(variable) = format(salesperson lcy) then if salespersonlcy <> '' then print the value else print blank.
  • In reply to sbhatbng:

    you can use the property print id details to yes so if any salesperson ledger entries exist then only those sales person will print.

    Hope it will solve your issue
  • In reply to Avinash:

    Thanks everyone for help! I know about PrintOnlyIfDetails, but it wasn't solution I expect. Finally I solved it by checking before calculation, if any of calculated fields are empty, and if any of these are empty, I print 0.
Related