I have been fiddling around with this report for a while now and have decided to finally breakdown and ask this forum. I know I am close, but just cannot quite get it.
I want a report that pulls mileage data for vehicles for the first or second half of the year. The problem I am having is that the database doesn't store data in quarters or halves, just dates (mm/dd/yyyy).
So, I created a formula that I titled Period, as follows:
if {EFFUEL_1.FU_DATE}= Calendar1stHalf then 1 else
if {EFFUEL_1.FU_DATE}= Calendar2ndHalf then 2 else
if {EFFUEL_1.FU_DATE}=YearToDate then 3
Then, I created a parameter that I titled Period, and made it a number (You may notice by now that I am following the advice given to another poster on the "tricky field" thread).
I then conditionally suppressed the groups in my section expert, as follows:
{@Period}<>{?Period}
This seems fairly simple and intuitive to me, however, when I enter a parameter value of 2 for the report, I am still getting data from the first half of the year instead of it running blank (which it should since it is not yet the second half of the year).
Does anyone have advice on where I went wrong?
EDIT:
I am a noob geek. I think I just needed to write it all out to figure out where I went wrong. I will post my correction here so that fellow noobs in the future can follow my methodology.
In my Select Expert, I entered:
(if {@Period} =1 then {EFFUEL_1.FU_DATE}=Calendar1stHalf else
if {@Period}=2 then {EFFUEL_1.FU_DATE}=Calendar2ndHalf else
if {@Period}=3 then {EFFUEL_1.FU_DATE}=YearToDate)
What I should have entered was:
(if {?Period} =1 then {EFFUEL_1.FU_DATE}=Calendar1stHalf else
if {?Period}=2 then {EFFUEL_1.FU_DATE}=Calendar2ndHalf else
if {?Period}=3 then {EFFUEL_1.FU_DATE}=YearToDate)
It is working correctly now.
Edited by adavis - 31 May 2013 at 5:14am