Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula editor Post Reply Post New Topic
Author Message
GraPim
Newbie
Newbie


Joined: 16 Jun 2010
Online Status: Offline
Posts: 2
Quote GraPim Replybullet Topic: Formula editor
     Posted: 16 Jun 2010 at 3:12am
Dear All,

I really need some help here, I'am just starting with Crystal reports Confused

Crystel reports is connecting with the database of Track-it, is there someone who also is using track-it database?

My problem for now that I have, see below:

Wo Num  Priority  Loacation  Policyduedate  Completed      Respons
12453     Medium  DMUK         01-01-2010    31-12-2010 NOA Group

This WO is completed in time

I also have WO's that are not completed in time like below:
25485   Medium    DMUK   01-01-2010   02-01-2010   NOA Group

For this one I have used a formule to say if completed is greater than policyduedate than CrRed This are the overdue Work orders

But I also have WO that are not completed and actauly also overdue (The Completed table is empty) , but I don't know the syntacs for an empty section or line, to point the Work orders out that are open overdue.

Do you have any solution for this

Please help!!Wink

Gracia

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Jun 2010 at 4:04am
if the table has no value...NULL then you can use the isnull({table.field}) which is true if the table.field has a NULL value, false otherwise.
 
So it would look like something like:
if isnull({table.field}) or completed> dueDate then
  crRed
 
As DBlank will remind, test for null first, as CR will through an error, but you will never see and you will wonder why the code isn't working.  If it still doesn't work, break it into 2 ifs like:
if isnull() then
 crRed
else
 if completed > due then
  crRed
 
HTH
IP IP Logged
GraPim
Newbie
Newbie


Joined: 16 Jun 2010
Online Status: Offline
Posts: 2
Quote GraPim Replybullet Posted: 16 Jun 2010 at 11:57pm
Hi,
Thanks for your quik replyWink

The formula you gave me is giving me only 0.00 for the empty record and 255.0 for the one's that are completed in time, I don't know why

I came up with formula:
< ="Content-" content="text/; charset=utf-8">< name="ProgId" content="Word.">< name="Generator" content="Microsoft Word 11">< name="Originator" content="Microsoft Word 11"><>

if isNull({TASKS.COMPLETED}) then "Open Overdue"

else CStr ({TASKS.COMPLETED})


Then I get a red color for the one's that are closed overdue and the other one's that are not closed but also overdue have the name open overdue.

But can I count those openoverdue and the closed overdue and the one that are completed in time

Thx !!Smile



Edited by GraPim - 16 Jun 2010 at 11:59pm
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum