×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Style Formula

Style Formula

Style Formula

(OP)
Hello,

We use a system called ECI M1... I am working on a grid in M1 and trying to put in a style format.

Here is the formula:
app.iif(fields("lmlTimecardType").value="2","Style1",app.iif(fields("jmoActualProductionHours").value >= (fields("jmoEstimatedProductionHours").value),"Style2","blank" is null))


Right now I'm receiving a object error which I am sure that it's for the blank is null. How can I change this part of the formula where it will ignore the null values..

app.iif(fields("jmoActualProductionHours").value >= (fields("jmoEstimatedProductionHours").value),"Style2","blank" is null))

RE: Style Formula

Hi,

ECi M1 is not part of Crystal Reports.

I don’t know that Tek-Tips has a forum for ECi M1.

Each ERP system has its own properties and methods.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Style Formula

(OP)
I know they don't, ECI M1 uses crystal for it's reporting but it's slightly different for the grids in the actual system. Hoping someone would know what I could put in place to ignore the blank values in the production hours to make the formula work.

RE: Style Formula

So is this question regarding a CR issue or ECi M1?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Style Formula

(OP)
Its a grid formula within M1 but I am asking if anyone would know what I could put in there because you've all worked with Crystal. Our reporting is done with crystal and that's why I am apart of this group and most formulas that you can put into crystal can be put into M1 grids.

RE: Style Formula

Not sure what the syntax would be in your application, but in CR, you would lead with a conditional clause:

If not isnull({table.field} or
Trim({table.field})<>“” then //replace these iPad quotes!
<your style condition>

-LB

RE: Style Formula

(OP)
I put this in and I get a valid formula but then recieve an error when running the grid. This is what I put in:
app.iif(fields("lmlTimecardType").value="2","Style1",app.iif(isnull(fields("jmoEstimatedProductionHours").value) ="","Style3",app.iif(isnull(fields("jmoActualProductionHours").value) ="","Style3",app.iif(fields("jmoActualProductionHours").value >= (fields("jmoEstimatedProductionHours").value),"Style2",""))))

And I'm getting a "Cannot cast DBnull. value to type"system.decimal.' Please use a nullable type. Any ideas?

RE: Style Formula

ActualProductionHours (decimal): it would seem reasonable that ZERO would be what you’re looking for rather than NULL.

Something like a FinishDate might be NULL, but not some DURATION.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Style Formula

(OP)
Its hours but not a date. So the reason i recieve the error is become I am pulling a grid that shows me what every guy is clocked in doing. If he is in a job, it shows production hours. If not its blank.

RE: Style Formula

That’s what I’m suggesting.

HOURS, a decimal DURATION, ought not be NULL, if there are indeed no HOURS, but ought to be ZERO if there are no HOURS.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Style Formula

Again, not sure of your syntax, but in CR, you need to reference nulls before referencing a value the field may have (i.e., check for nulls first. For a date field, the syntax would be:

If not isnull({table.date}) or
{table.date}<>date(0,0,0) then...

In Crystal iif() used to throw errors when nulls were involved, if I remember correctly. This might be an outdated issue though. So you also might want to try alternative syntax.

-LB

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close