how to add up imperial numbers?
how to add up imperial numbers?
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?
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?
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!
-
- Posts: 28
- Joined: Sun Aug 07, 2011 8:53 pm
- Location: Auckland
Re: how to add up imperial numbers?
Hi jjthed
You could use this code as s starting point: http://www.codeproject.com/Tips/623477/ ... sa-in-Csha
HTH
James
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?
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?
Hello.
Thank you.
Unfortunately, it's impossible. The Imperial units are not supported by .Net Framework.jjthed wrote:Thanks for your link, but I am not a C# person, so is there anything simpler than that?
Thank you.
Re: how to add up imperial numbers?
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
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
- Attachments
-
- Book1.xlsx
- (8.3 KiB) Downloaded 297 times
Re: how to add up imperial numbers?
Hello, June.
It's no clear what are you trying to do.
We try to guess that you should use next expression:
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.
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))}
Thank you.