Khue Trinh
11/26/2005 5:07:00 PM
Hi Jens,
Let say you try to print a report with Sales Orders. Datasource of your
report is SalesTable. Then override method fetch.
public boolean fetch(){
Query q = element.query();
QueryRun qr;
SalesTAble salesTable;
;
q.datasourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable,
Createdby)).value(curuserId());
qr = new QueryRun(q);
while(qr.next()){
salesTAble = qr.get(tablenum(salestable));
element.send(salesTable);
}
return true;
}
--
ERP Dev.
"Jens Strandberg" wrote:
> Hello there,
>
> Is there any way - from X++ - to add a range and value, when running a
> report from code ?
>
> Let's say that I wish to run "MyReport", which is just a plain report. I
> would then like to add createdBy as range and curuserid() as range value.
>
> How would I do that ?
>
> Thanks in advance.
>
> /Jens
>
>