Convert inches to feet/inches in VB's Crystal.....
-
Hello everyone, I am currently running VB.Net 2005 (to and Access 2003 MDB) and setting up a Crystal Report using the versions of Crystal that came with the program. In my program I have a field where the user can put in a person’s height in inches. But when I run my report I need to show that value as ‘X ft. X inches’. I can’t find a built in function in Crystal that will do this (like the built in function to calculate someone’s age). Does anyone know if there is one or if there is another way to do this with a formula field or something? Thanks for any help that you can give me with this.
-
Hello everyone, I am currently running VB.Net 2005 (to and Access 2003 MDB) and setting up a Crystal Report using the versions of Crystal that came with the program. In my program I have a field where the user can put in a person’s height in inches. But when I run my report I need to show that value as ‘X ft. X inches’. I can’t find a built in function in Crystal that will do this (like the built in function to calculate someone’s age). Does anyone know if there is one or if there is another way to do this with a formula field or something? Thanks for any help that you can give me with this.
Last time I checked, there were 12 inches in a foot. Divide inches by 12, drop the remainder. There's your feet. Modulous the same number of inches by 12 and you've got the remaining number of inches.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Last time I checked, there were 12 inches in a foot. Divide inches by 12, drop the remainder. There's your feet. Modulous the same number of inches by 12 and you've got the remaining number of inches.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Hey Dave, thanks for the reply. (You are right, the last I checked there were 12 inches in a foot as well. AND the last I checked there are 52 weeks and 365 days in a year, but Crystal still has a function for finding the exact age of someone based on their Date of birth to make our lives easier) 1. So there are no functions that will do this automatically? Or do you know? 2. What is Modulous?
-
Hey Dave, thanks for the reply. (You are right, the last I checked there were 12 inches in a foot as well. AND the last I checked there are 52 weeks and 365 days in a year, but Crystal still has a function for finding the exact age of someone based on their Date of birth to make our lives easier) 1. So there are no functions that will do this automatically? Or do you know? 2. What is Modulous?
CCG3 wrote:
What is Modulous?
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
-
Hey Dave, thanks for the reply. (You are right, the last I checked there were 12 inches in a foot as well. AND the last I checked there are 52 weeks and 365 days in a year, but Crystal still has a function for finding the exact age of someone based on their Date of birth to make our lives easier) 1. So there are no functions that will do this automatically? Or do you know? 2. What is Modulous?
Here's a better, more helpful link[^]. Hope that's clear now.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
-
Hey Dave, thanks for the reply. (You are right, the last I checked there were 12 inches in a foot as well. AND the last I checked there are 52 weeks and 365 days in a year, but Crystal still has a function for finding the exact age of someone based on their Date of birth to make our lives easier) 1. So there are no functions that will do this automatically? Or do you know? 2. What is Modulous?
Why does something so simple have to be prewritten? Why not just create a calculated field and get what you want in 10 minutes?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Why does something so simple have to be prewritten? Why not just create a calculated field and get what you want in 10 minutes?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Dave Kreskowiak wrote:
Why does something so simple have to be prewritten? Why not just create a calculated field and get what you want in 10 minutes?
Well Dave, you have to understand that some of us are newbies and we are looking for help. I have never heard of a 'calculated field' nor do I know how to create one. If it is so simple can you help me set one up? Or give me a example of what one is? (you are talking about creating this in Crystal right?)
-
Dave Kreskowiak wrote:
Why does something so simple have to be prewritten? Why not just create a calculated field and get what you want in 10 minutes?
Well Dave, you have to understand that some of us are newbies and we are looking for help. I have never heard of a 'calculated field' nor do I know how to create one. If it is so simple can you help me set one up? Or give me a example of what one is? (you are talking about creating this in Crystal right?)
CCG3 wrote:
I have never heard of a 'calculated field'
Allow me to quote from your original post: Does anyone know if there is one or if there is another way to do this with a formula field or something?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
CCG3 wrote:
I have never heard of a 'calculated field'
Allow me to quote from your original post: Does anyone know if there is one or if there is another way to do this with a formula field or something?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Ok, so are you saying that a 'calculated field' is the same as a formula field? If so, then can you show me an example of how this can be done with a formula field? -- modified at 9:44 Friday 29th June, 2007
CCG3 wrote:
f so, then can you show me an example of how this can be done with a formula field?
Nope. I don't have any example because I don't use Crystal Reports.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007