Quantcast
Viewing all articles
Browse latest Browse all 72043

Validdate state query issue in SSRS reports

i am trying to query table that had  valid from to fields using RDP methodology and the issue here that the Query object  is returning  all the valid from to rows which intersect with the valid from to ranges  which means there no limit for the valid to values as below 

workerdocument novalid fromvalid to
00011211/1/20131/1/2014
00021221/1/20131/1/2014
000312315/1/201315/1/2014

the gray rows are in the valid from 1/1/2013 and valid to 1/1/2014 

the green row  dose not achieving the condition 

the below is like the code which i am using in report processReport method in the RDP  report class

_Query=this.parmQuery();
_QueryBuildDataSource=_Query.addDataSource(tableNum(TestTable));

_toRange=_QueryBuildDataSource.findRange(fieldNum(TestTable,ValidTo));
if(!_toRange)
{
    _toRange=_QueryBuildDataSource.addRange(fieldNum(TestTable,ValidTo));
     if(!_toRange.value())
    _toRange.value(SysQuery::range(FromDate,ToDate));
}

_QueryRun=new QueryRun(_Query);

ttsBegin;

while (_QueryRun.next())
{
    WorkerMedicalInsurance=_QueryRun.get(tableNum(TestTable));
    if(TestTable)
    {

        temptable.worker= TestTable.worker;

        temptable.worker= TestTable.ValidFrom;

        temptable.worker= TestTable.ValidTo;

        temptable.insert();

    }
}

any suggestion how to solve that 


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>