- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2023 10:33 AM
Hi guys,
i have a table with cost and qty that changed every time, for example:
Cost 179 and qty 2 or 3 (it can be any number)
i want to make a report with bar chart for total cost, how can i make it?
thanks for advance!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 02:30 AM
You can create before (insert and update) business rule on your table.
Use script to calculate "Total Cost".
var totalCost = parseFloat(current.u_cost.getCurrencyValue()) * parseFloat(current.u_quantity);
current.u_total_cost = current.u_cost.getCurrencyCode() + ';' + totalCost ;
Note: replace your column names in above script.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 02:05 AM
Hi,
You can create a column name it as Total coset. you can save multiplication of Cost and Quantity in that field (using before BR) and it is easy to report on Total cost column.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 02:22 AM
Hi, Thanks
It sounds right, but can you please expand? where do i have a multiple function (cost*qty) i cant find it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 02:30 AM
You can create before (insert and update) business rule on your table.
Use script to calculate "Total Cost".
var totalCost = parseFloat(current.u_cost.getCurrencyValue()) * parseFloat(current.u_quantity);
current.u_total_cost = current.u_cost.getCurrencyCode() + ';' + totalCost ;
Note: replace your column names in above script.
Thanks
Anil Lande