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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to write condition in Excel report using excel buffer in business central

(0) ShareShare
ReportReport
Posted on by 153
Hi Guys,
I want to write a condition on excel report using excel buffer.
I have create on excel report using excel buffer.In that report there is 3 columns.
In amount column ,I want to display condition: if amount is 0 then display 'No balance' text in report.
i.e. Column C - Amount (If Amount is 0, then display 'No Balance' instead of 0.)
 
 
Is any way to do this
  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,306 Super User 2026 Season 1 on at
    Add if condition after the amount calcfields. Example:
     
    "Cust. Ledger Entry".CalcFields(Amount);
    if Amount = 0 then
      Rec_excelbuffer.AddColumn('No Balance', true,'',true,false,false,'',Rec._excelbuffer."Cell Type"::Text)
    else
      Rec_excelbuffer.AddColumn('Amount, true,'',true,false,false,'',Rec._excelbuffer."Cell Type"::Number);
  • Suggested answer
    YUN ZHU Profile Picture
    103,292 Super User 2026 Season 2 on at
    Hi, or you can use the Format method to convert all the amount into text, and then modify the format uniformly in Excel.
     
    Hope this helps as well.
    Thanks.
    ZHU

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 796 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 481 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 377 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans