Page 1 of 1
how to add up imperial numbers?
Posted: Wed Aug 13, 2014 4:22 pm
by jjthed
Hello,
I am having problems adding all the imperial numbers. On the report I use the expression: {EstimateItems.LengthString}, the number shows on my report is a string such as 0'-5 3/4, so how do I change this data type to numbers so I can sum up all the numbers in imperial?
Re: how to add up imperial numbers?
Posted: Wed Aug 13, 2014 6:02 pm
by jjthed
I am not sure if I have explained well enough. The number in imperial is in string format, and I need to convert them so that I can add them up. eg. 0'-5 3/4 is in string format, and I need to convert it so that I can add them up: 0'-5 3/4 + 3'-1 3/8 and gives me the answer in imperial as well. Thanks!
Re: how to add up imperial numbers?
Posted: Thu Aug 14, 2014 2:54 am
by james.crossley
Hi jjthed
You could use this code as s starting point:
http://www.codeproject.com/Tips/623477/ ... sa-in-Csha
HTH
James
Re: how to add up imperial numbers?
Posted: Thu Aug 14, 2014 1:20 pm
by jjthed
Thanks for your link, but I am not a C# person, so is there anything simpler than that?
Re: how to add up imperial numbers?
Posted: Thu Aug 14, 2014 1:48 pm
by HighAley
Hello.
jjthed wrote:Thanks for your link, but I am not a C# person, so is there anything simpler than that?
Unfortunately, it's impossible. The Imperial units are not supported by .Net Framework.
Thank you.
Re: how to add up imperial numbers?
Posted: Thu Aug 14, 2014 4:11 pm
by jjthed
Ah, thanks!
one more question, I want to calculate the total length per each group. My length has a formula that is qty * unit length per each item. Please reference the spreadsheet for reference.
So my formula for the GroupFooterBand is {Round(Sum(EstimateItems.Quantity)* EstimateItems.Length)}
What formula can I write so that it will sum up the length in each group under the PageGroupFooterBand?
Thanks,
June
Re: how to add up imperial numbers?
Posted: Fri Aug 15, 2014 7:28 am
by HighAley
Hello, June.
It's no clear what are you trying to do.
We try to guess that you should use next expression:
Code: Select all
{Round(Sum(EstimateItems.Quantity* EstimateItems.Length))}
If this doesn't help, send us a sample report template with sample data and more detailed description what do you need to get.
Thank you.