Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Topic: Rcord Select Formula to Filter Posted: 03 Dec 2012 at 3:59am
I'm putting this data under Record Select and it's not returning info for me. When I take out the bottom 4 lines the report runs fine. Is there a different way that I need to write the bottom 4 lines?
{@XXXCompanyFilter} AND {EPayHist.checkDate} >= CDATE ({@YYYPlanStartDate}) AND {EPayHist.checkDate} <= CDATE ({@YYYPlanEndDate}) {EInfo.empType} = {@YYYempType1} AND {EInfo.empType} = {@YYYempType2} AND {EInfo.empType} = {@YYYempType3} AND {EInfo.empType} = {@YYYempType4} AND {EInfo.empType} = {@YYYempType5}
Joined: 19 May 2011
Online Status: Offline
Posts: 337
Posted: 03 Dec 2012 at 4:02am
{@XXXCompanyFilter} AND
{EPayHist.checkDate} >= CDATE ({@YYYPlanStartDate}) AND
{EPayHist.checkDate} <= CDATE ({@YYYPlanEndDate}) AND {EInfo.empType} = {@YYYempType1} AND
{EInfo.empType} = {@YYYempType2} AND
{EInfo.empType} = {@YYYempType3} AND
{EInfo.empType} = {@YYYempType4} AND
{EInfo.empType} = {@YYYempType5}
Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Posted: 03 Dec 2012 at 4:10am
Thanks Matt, I actually had that "AND" in there but took it out when i blanked out the bottom lines to get the report to work. When I do this:
{@XXXCompanyFilter} AND {EPayHist.checkDate} >= CDATE ({@YYYPlanStartDate}) AND {EPayHist.checkDate} <= CDATE ({@YYYPlanEndDate}) AND {EInfo.empType} = {@YYYempType1} //{EInfo.empType} = {@YYYempType2} AND //{EInfo.empType} = {@YYYempType3} AND //{EInfo.empType} = {@YYYempType4} AND //{EInfo.empType} = {@YYYempType5}
I can put in a value for @YYYempType1 and the report will work but if i try to do more than 1 it returns a blank report.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 03 Dec 2012 at 4:10am
comatt1 is corrected in the fact that you are missing something where the AND was added but I think you have another issue in that the last 4 lines are all set to use AND. I find it unlikely that the same field is going to = all of your @YYYempTypeX formula. Since I do not know your data I am guessing you might need to rethink that part as well.
You ikeley need an OR set with parenth around that.
Joined: 19 May 2011
Online Status: Offline
Posts: 337
Posted: 03 Dec 2012 at 4:14am
({@XXXCompanyFilter} AND
{EPayHist.checkDate} >= CDATE ({@YYYPlanStartDate}) AND
{EPayHist.checkDate} <= CDATE ({@YYYPlanEndDate})) AND
({EInfo.empType} in [{@YYYempType1},{@YYYempType2},{@YYYempType3},{@YYYempType4}{@YYYempType5}])
Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Posted: 03 Dec 2012 at 4:16am
the @YYY fields are pass through data from Millenium (payroll program). Basically the report will be used by clients and they will enter additional data into the Millenium to pass through to the report in the @YYY fields to filter employee types ie. part time, full time, sub, holiday.
I will give the OR a shot but the client may need/want to know this info based on pt and ft employees which is why I was trying to offer 5 additional options for employee types.
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