Author |
Message |
Twizik
Newbie
Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
|
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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
Twizik
Newbie
Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
|
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 Logged |
|
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
|
Posted: 26 Apr 2012 at 4:08am |
All you should need to put in your select expert is;
{wrkitem.itemtype} = 0
Regards,
Ryan.
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
Twizik
Newbie
Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
|
Posted: 26 Apr 2012 at 4:50am |
Originally posted by rkrowlandAll 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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
Twizik
Newbie
Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
|
Posted: 26 Apr 2012 at 5:17am |
Originally posted by DBlankwhat 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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
Twizik
Newbie
Joined: 19 Apr 2012
Online Status: Offline
Posts: 21
|
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 Logged |
|
|