How to calculate the % of cost???

Stimulsoft Reports.NET discussion
jjthed
Posts: 15
Joined: Mon Jul 07, 2014 11:36 pm

How to calculate the % of cost???

Post by jjthed »

Hello,

I have searched and searched but still no answer. I am trying to calculate the % of cost in the DataBand for each item. The total cost is at the footerband, and I need to divide the each item cost by the total cost to get the % of each item cost. And I have a hard time get this % of cost in the databand. I don't know if I have explained clear enough. Please help?

Thanks in advance!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to calculate the % of cost???

Post by HighAley »

Hello.

Here is a sample report template with percentage.
There are other ways to show percents.
Let us know if you need any additional help.

Thank you.
Attachments
Report.mrt
(27.75 KiB) Downloaded 242 times
jjthed
Posts: 15
Joined: Mon Jul 07, 2014 11:36 pm

Re: How to calculate the % of cost???

Post by jjthed »

Thanks for getting back. I've seen the video about the %, but I think mine is a bit more complicated. Here is the screen shot in the attachment and hope that helps to identify the problem.

Notice the two circled areas, the top one is the % of cost per item, the bottom one is the total cost of all the items. How do I write the top formula so that the total cost of all the items can be used to calculate the % of cost per each item? I have tried the Sum(), this only gives me the sum of each group not the total. Any advise?

Thanks!!
Attachments
Capture.JPG
Capture.JPG (154.61 KiB) Viewed 2913 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to calculate the % of cost???

Post by HighAley »

Hello.

We have updated previous post and have added the report template.
To get the full sum you could use the Totals.Sum() function.
Report.mrt
(27.03 KiB) Downloaded 275 times
Thank you.
jjthed
Posts: 15
Joined: Mon Jul 07, 2014 11:36 pm

Re: How to calculate the % of cost???

Post by jjthed »

That works now! Thanks!!

Also is there any sample reports somewhere for download? I am new to this and don't know how to write a proper expression, when I try myself, I will constantly getting errors. Any documentation regarding how to write expressions?

Thanks a lot!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: How to calculate the % of cost???

Post by Andrew »

Hello,

Please read the following topics in our documentation and let us know whether it is what you are looking for?
http://www.stimulsoft.com/en/documentat ... ssions.htm

http://www.stimulsoft.com/en/documentat ... report.htm

Thank you.
jjthed
Posts: 15
Joined: Mon Jul 07, 2014 11:36 pm

Re: How to calculate the % of cost???

Post by jjthed »

I have read that and used Total before, but because I don't know the syntax for the formulas of this % of total, I constantly have errors with my formulas. Your sample report helped a lot.

Another problem that I have is I have 5 items that are the same size, and how do I show on the report with just one item with the size showing and the quantity would be 5?

Thanks!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to calculate the % of cost???

Post by HighAley »

Hello.
jjthed wrote:Another problem that I have is I have 5 items that are the same size, and how do I show on the report with just one item with the size showing and the quantity would be 5?
Sorry, we don't understand your question. Could you describe it more detailed with samples.

Thank you.
jjthed
Posts: 15
Joined: Mon Jul 07, 2014 11:36 pm

Re: How to calculate the % of cost???

Post by jjthed »

Thanks for the quick reply!

Here is an example for my questions: (below is what my report looks like)

ItemName size quantity length unit price cost % of cost

Handle

Handle 9 X 12 1 3' $ 2 $ 2 10%
Handle 9X12 2 4' $ 2 $4 12%
Handle 5X6 1 5' $ 1 $1 5%

Door

Door 10X5 2 5' $20 $ 40 20%
Door 10x5 1 6' $20 $ 20 15%

**********************************************************************************************************

This is what I want my report looks like:

Item name size quantity length unit price cost % of cost

Handle

Handle 9 X 12 3 7' $ 2 $ 6 22%
Handle 5X6 1 5' $ 1 $1 5%

Door

Door 10X5 3 11' $20 $ 60 35%


The report is categorized by the item, and within each item, all the same size are combined into one row with the quantity, length, cost and % of cost combined according to the same size of the item.

Please advise? Thanks!!
jjthed
Posts: 15
Joined: Mon Jul 07, 2014 11:36 pm

Re: How to calculate the % of cost???

Post by jjthed »

I don't know why the numbers are all shrink together.. I hope you know what I mean. Thanks!
Post Reply