Date Filtering On Report

Hi Guys

I have an Agent and agent line table relationship similar to Sales header and line, during agent commission posting there is also tax calculated based on agent line and inserted into tax table. The posting is working well, my problem is on the report section, the report printed from posted agent documents it pools report similar to sales invoice but also needed to bring all taxes related to this Agent. On the report, I added I have three Dataitems 1. Header 2.Line 3. Tax History and the header and line doing what I need which is printing calculated the current commission information for the given document No. and the on the tax history Dataitem section the report is required to bring all the Taxhistory within the current Month of the Document posting date Eg. Document Posted on Jan 30 and Doc report printed it needs to pool all tax history from Jan 1..30 the whole commission tax will be calculated for the month.

and I put 

Tax History - OnPreDataItem()
TaxHistory.SETFILTER( "Posting Date",'%1..%2',StartDate,EndDate); and this filter doesn't seem to be working.

StartDate and EndDate is on Requestpage;

Thanks in Advance