AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Report De...
Acumatica Report De...
 
Notifications
Clear all

#AcumaticaTnT Acumatica Report Designer Format Function

 
Acumatica Report Designer
Last Post by manya2000 2 years ago
3 Posts
3 Users
2 Reactions
6,890 Views
RSS
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
Topic starter
June 4, 2020 9:36 am
(@timrodman)
Famed Member
Joined: 10 years ago

The Format function in Report Designer is pretty flexible, but not that intuitive.

Here are a couple of examples from the Sales Order (SO641010) report to help get you started.


Example #1

Format('{0} {1}', [SOLine.InventoryID], '{br}'+[SOLine.TranDesc])

You can see that the first argument to the Format function is a string: '{0} {1}'

In this string, the {0} and {1} are placeholders telling the function that the values will come as the next two arguments to the Format function.

In the last argument you can see that {br} is used which simply tells it to print a new line.

The printed result will be SOLine.InventoryID on one line and SOLine.TranDesc on the second line.

You could also do something like this which would print SOLine.InventoryID, then a colon, then a space, then SOLine.TranDesc:

Format('{0}: {1}', [SOLine.InventoryID], [SOLine.TranDesc])

Example #2

=Format('{0:0.00}', Round([SOLine.OrderQty],1))

In this example the string in the first argument includes a format code about how to format the second argument.

The first 0 in {0:0.00} is the argument number which grabs this value: Round([SOLine.OrderQty],1)

The 0.00 in {0:0.00} is how the argument should be formatted.

There's a nice formatting section in the S130 Course on Acumatica University showing the various formatting codes (for numbers, dates, etc.) that can be used.


Example #3

=Format('Last Sale on {0:MM/dd/yyyy}',[SOOrder.OrderDate])

This is the same as Example #2 in that we're formatting the value, but now I've added additional text around the value.

Also, I wanted to show an example of formatting a Date field.

 


Adam Brunner and NickSM reacted
2 Replies
LJB
Posts: 5
 LJB
March 27, 2024 10:47 am
(@ljb)
Active Member
Joined: 6 years ago

I am running into errors with the format formula below. Does anyone have any tips on how to get this to work? I want the format to be $7.44 and without any formatting its 7.4400.  I input $#,##0.00 in the format field in properties and it didn't work. 

 

 

=IIf([PMTaxTran.TaxID]='MIL COUNTY SALES TAX',[PMTaxTran.TaxID_description]+':'+ Format('{$#,##0.00}', [PMTaxTran.TaxAmt])+'{br}','')
+IIf([PMTaxTran.TaxID]='MILWAUKEE CITY SALES TAX',[PMTaxTran.TaxID_description]+':'+ Format('{$#,##0.00}', [PMTaxTran.TaxAmt])+'{br}','')
+IIf([PMTaxTran.TaxID]='WI 5 PERCENT',[PMTaxTran.TaxID_description]+':'+ Format('{$#,##0.00}', [PMTaxTran.TaxAmt])+'{br}','')


Reply
manya2000
Posts: 3
 manya2000
April 24, 2024 8:26 pm
(@manya2000)
Active Member
Joined: 5 years ago

Hi,

This should work:

=IIf([PMTaxTran.TaxID]='MIL COUNTY SALES TAX',format('{0}:{1:C}{br}',[PMTaxTran.TaxID_description], [PMTaxTran.TaxAmt]),'')
+IIf([PMTaxTran.TaxID]='MILWAUKEE CITY SALES TAX',format('{0}:{1:C}{br}',[PMTaxTran.TaxID_description], [PMTaxTran.TaxAmt]),'')
+IIf([PMTaxTran.TaxID]='WI 5 PERCENT',format('{0}:{1:C}{br}',[PMTaxTran.TaxID_description], [PMTaxTran.TaxAmt]),'')

 


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 45 Online
  • 2,410 Members
Our newest member: thollings
Latest Post: Attribute Input Mask
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

  • Steven Fuller
Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×