Report returns no data

Hi all, i need to filter the data between two dates…Boolean fetch coding are attached below…it shows blank document.

public boolean fetch()
{

querybuildrange qbr;
QueryRun qr = new queryrun(this.query());// picks the current datasource available in the report
;

element.execute(1);

qbr = qr.query().datasourcetable(tablenum(UtilElements)).addrange(fieldnum(UtilElements,ModifiedDateTime));

qbr.value(queryrange(fromdate,todate));

element.send(UtilElements);

return true;
}

The content of you method is wrong. Most importantly, you never execute the query and iterate its results.
But don’t bother fixing it - you don’t have to implement your own fetch logic if your intention is simply to add query ranges. That’s not fetching. You can simply do it in init().

then wat can i do??

Delete your fetch method and add the range in init().
(I’m ignoring the executable section for now, because you didn’t mention it in your requirement.)

I need to get the data from UtilElements Table…I have two Date field in dialog… when i click the from and to date …the value should be filtered and display in Report

Hi,

Are you selecting dates from “select option” or “Dialog fields”?