How to create a template for custom-report export

You can create a custom template for exporting a custom report easily using a NetSuite saved search. For this, create a saved search in NetSuite with custom label names as the names required to be visible in the template. You can use any saved search but if you can use a saved search with similar data that you expect as output then it will be useful.
Now use the export button(Export – Microsoft Excel) button to get the file as an Excel document(xls).
You will get a document with all the necessary columns. If you want to add further styling, you can do that by editing the document in Microsoft Excel.
Once the styling is completed, remove all the result values in the document(if any) except for the first column of results.
Now save the document as ‘XML’. The template is almost ready for use.
You can add the <#list> tag to iterate the value passed as the data source to the template.
Make sure to update the column limit using the ‘ExpandedRowCount’ property to be larger value based on your requirement to avoid the document to get exceed the limit while exporting:

…..

You can also add additional style classes using:

…. REPORT LABEL REPORT LABEL2 VALUE1: ${record.header.value1} VALUE2 : ${record.header.value2} VALUE3: ${record.header.value3}

Leave a comment

Your email address will not be published. Required fields are marked *