Hello,
I'm kind of a newb with crystal. I have a field {workstat.drive_c} that displays as number. I want to take this value and divivde it by 1000000. How would I do this? I tried a few things but keep getting a boolean error msg. Thanks in advance for the help.
Here is what's in there already from the current report. I want to add the field {WORKSTAT.DRIVE_C} and divide it by 1000000. I tried both recommendation but they didn't work.
{ITEM.TYPE} = "Computer" and
{ITEM.SOURCE} <> 10 and
{WORKSTATION_COMPONENTS.ISCURRENT} = 1 and
{WORKSTATION_COMPONENTS.STATUSCODE} <> 4.00 and
{TYPE_CODE.TypeCodeType} = "HW"
Is this in an If block? If you're getting a Boolean error, it sounds like it is. Also, which of the fields has the #? It's not clear to me where and when you are dividing.
I am trying to take the hard drive value. Which is in gigabytes and come up with a number like 80.0GB instead of 80000000000. I hope this makes sense....
I think you should show all of your code that is involved, partcularly that which is doing the division. There is no reference to WORKSTAT.DRIVEC in your sample so it's impossible to understand what is causing the problem.. I believe you have an issue with the underlying code, most likely caused by incorrect syntax, types, or scope. The division is as simple as the previous tips, once you are sure about what you are dividing.
I wrote the code in a msg above. The part with the division isn't in there because I don't know how to add it. Here it is again...
{ITEM.TYPE} = "Computer" and
{ITEM.SOURCE} <> 10 and
{WORKSTATION_COMPONENTS.ISCURRENT} = 1 and
{WORKSTATION_COMPONENTS.STATUSCODE} <> 4.00 and
{TYPE_CODE.TypeCodeType} = "HW"
If all you want to do is display this on the report, then there's no need to modify the Record Selection formula.
From the Field Explorer create a new Formula and name it Gigabytes
This assumes that your field is a Number type
Code:
{workstat.drive_c}/1000000000
Place this field on the report where you'd like it displayed. (probably the Details section)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.