Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress Date If.... Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Twizik
Newbie
Newbie
Avatar

Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
Quote Twizik Replybullet Topic: Suppress Date If....
    Posted: 25 Apr 2012 at 10:39am
I am trying to suppress dates from (wrkordr.wrkdate) in my report. The data field is left outer joined to (wrkitem.itemnbr) to give me the correct date corresponding with that line. I have a string that separates Labor and Materials and I would like to remove the dates from the Materials. It looks at (wrkitem.itemtype) 0 is labor or 3 materials. I tried

if {wrkitem.itemnbr} > 1
then 0
Else {wrkordr.wrkdate}

This gives a boolean error

I click on the data link and Select Expert than Formula Editor and add it there is this correct?



Edited by Twizik - 25 Apr 2012 at 10:47am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Apr 2012 at 3:59am
I am not following your question...
Do you want to exclude data rows (using the select expert) or just suppress 1 date field in the report?
IP IP Logged
Twizik
Newbie
Newbie
Avatar

Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
Quote Twizik Replybullet Posted: 26 Apr 2012 at 4:06am
I would like to exclude dates that fall under the item type field 3 which is Miscellaneous. I only want to see dates for the labor line items. I cannot return a date field with an If statement tho.....
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 26 Apr 2012 at 4:08am
All you should need to put in your select expert is;
 
{wrkitem.itemtype} = 0
 
Regards,
Ryan.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Apr 2012 at 4:14am
select statements (in the select expert) are boolean evaluations of each row of data and if-then is not needed (nor IMO should it be used).
If the result of the evaluation is TRUE then the row is included, if it is FALSE it is excluded.
IP IP Logged
Twizik
Newbie
Newbie
Avatar

Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
Quote Twizik Replybullet Posted: 26 Apr 2012 at 4:50am
Originally posted by rkrowland

All you should need to put in your select expert is;
 

{wrkitem.itemtype} = 0

 

Regards,

Ryan.


Thank you guys for helping, I added this to the select expert on the workdate data field and checked the report and I still get the same information nothing is excluded. these fields are all in the same database so there is nothing to join I feel I am missing something. I really appreciate all the help.

Edit: Playing around with the selection expert equal to etc I can not get the date field to do anything, I cant even get the whole thing to go away, is there a hierarchy I am not seeing?

Edited by Twizik - 26 Apr 2012 at 5:12am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Apr 2012 at 5:12am
what do you mean by "...I added this to the select expert on the workdate data field ..."?
The select expert is for the entire report, not any singular report field.
IP IP Logged
Twizik
Newbie
Newbie
Avatar

Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
Quote Twizik Replybullet Posted: 26 Apr 2012 at 5:17am
Originally posted by DBlank

what do you mean by "...I added this to the select expert on the workdate data field ..."?
The select expert is for the entire report, not any singular report field.


I right click on a database field in the design view that I inserted from the Field Explorer and click Select Expert. In there I have been changing said items as in, is any value, is equal to... I clicked New and added woitem.itemtype and is equal to 0 and nothing changed.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Apr 2012 at 5:21am
click on show formula (in the select expert window)
make sure Record Selection is selected.
in the window on the bottom you should see your curretn select statement.
it should be what Ryan suggested and only this...
{wrkitem.itemtype} = 0
If it is not that click on the Formula editor and change it to this statement and then save and close it.


Edited by DBlank - 26 Apr 2012 at 5:21am
IP IP Logged
Twizik
Newbie
Newbie
Avatar

Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
Quote Twizik Replybullet Posted: 26 Apr 2012 at 6:52am
OK, did that exactly and no changes. I added the wrkitem.itemtype field where the date field was and used the formula on that instead of using it on the date field because I was thinking since it is that field it should work but still nothing is excluded. I don't mean to be a pain in the ...
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.