# Working with Template Syntax Formatting Working with Template Syntax Formatting with GroupDocs.Assembly for Python via .NET: the template, the Python data and the code. {{< alert style="info" >}}The example reads the shop data described in [The Business Layer]({{< ref "assembly/python-net/developer-guide/basic-usage/working-with-a-business-case/the-business-layer.md" >}}).{{< /alert >}} ## Template Syntax Formats ### Specifying String and Numeric Formats Learn more about string and numeric formats [here](http://www.groupdocs.com/docs/display/assemblynet/Features+Overview#FeaturesOverview-TemplateSyntaxFormatsforExpressionResults). #### Template Syntax

 

Products

Order Price

<<if [!Any()]>>No data

<<else>><<foreach [in orders]>><<[Product.ProductName] : upper>>

<<[Price] : arabicDash>><</foreach>>

Total:

<<[Sum(c => c.Price)]>><</if>>

 

 

{{< alert style="success" >}}For detailed technical information about syntax, expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine{{< /alert >}} #### Download Template Get the template from here. * [numeric-format.odt](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-template-syntax-formatting/numeric-format.odt) #### The Code {{< tabs "example1" >}} {{< tab "Python" >}} ```python import json from groupdocs.assembly import DataSourceInfo, DocumentAssembler with open("orders.json", encoding="utf-8") as f: orders = json.load(f) assembler = DocumentAssembler() assembler.assemble_document("numeric-format.odt", "numeric-format-report.odt", DataSourceInfo(orders, "orders")) ``` {{< /tab >}} {{< tab "numeric-format.odt" >}} {{< tab-text >}} The following sample file is used in this example: [numeric-format.odt](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-template-syntax-formatting/numeric-format.odt) {{< /tab-text >}} {{< /tab >}} {{< tab "orders.json" >}} {{< tab-text >}} The following sample file is used in this example: [orders.json](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-template-syntax-formatting/orders.json) {{< /tab-text >}} {{< /tab >}} {{< tab "numeric-format-report.odt" >}} ```text Binary file (ODT, 6 KB) ``` [Download full output](https://docs.groupdocs.com/assembly/python-net/_output_files/developer-guide/advanced-usage/working-with-template-syntax-formatting/the_code/numeric-format-report.odt) {{< /tab >}} {{< /tabs >}}