We have a Products data type that has Product ID,Cost per product etc.Now using this how to create a RD that can calculate the total cost of products?do we need a sub report here and if yes then how to configure that?
What exactly do you mean by total cost of products? Can you elaborate it?
If all the columns are available in a Single table and you are just looking for Total cost then its a simple summarize function like below. And you can use filters based on the final list from DB it will calculate the total cost. So in your scenario the Column will be just Cost Per Product using summarize as Sum.
The design largely depends on the data model and how the data is sourced. If the data resides in a single source, as already suggested by @MarcCheong and @BHANUKIRANT, a straightforward approach can be used; however, if the data spans multiple tables, the solution will vary based on the complexity of the data relationships. In general, use SUM aggregation in the Report Definition for a single data source, and introduce subreport or joins only when data is distributed across multiple tables and requires correlation.
If you intend to use subreport here’s how you should so it:
1. The subreport uses count against the "Productid" column
-
The main report should then uses the count and multiplies with cost per product.
Hope this helps!
it will depend if we are using Constellation or Traditional. I think @RameshSangili and I have assumed Constellation but yes, if you are using traditional and have a report in the UI you could use a sub-report too - Constellation doesn’t support this, it would be via Insights (thus our recommendations there).
Be good to know:
- The architecture used
- The business outcome: are we showing the cost on screen? or using it in a business rule?
we need the report to show the total cost of the product that the user will select
Hi @MarcCheong its traditional architecture


