Ok, sorted it out.. I just had to reassign upToRange AFTER calling
QueryRun.prompt:
upToRange =
qryRun.query().dataSourceTable(tablenum(CustTrans)).findRange(fieldnum(CustT
rans, LastSettleDate));

Regards,

Matt Benic
Axapta Developer
UTi Sun Couriers Division


-----Original Message-----
From: Matt Benic [mailto:[EMAIL PROTECTED]
Sent: 02 September 2004 11:13 AM
To: Axapta Dev
Subject: [development-axapta] Obtaining selected value from a query



Hi all,
I have written a pretty standard report in which I override the init method
as follows (upToRange is defined as a QueryBuildRange in my
classDescription):

public void init()
{
    date lastDayOfPrevMonth;
    ;

    super();

    //Add expiry range
    lastDayOfPrevMonth = dateEndMth(dateMthFwd(today(), 1));
    upToRange =
this.query().dataSourceTable(tablenum(CustTrans)).addRange(fieldnum(CustTran
s, LastSettleDate));
    upToRange.value('<
'+date2str(lastDayOfPrevMonth, -1, -1, -1, -1, -1, -1));

    //Members
    unsettledAmt = 0;
}

I then try to use upToRange to determine the user selected value in a
display method as follows:
display str upToDate()
{
    return upToRange.value();
}

This results in an error stating that the querybuildrange object is not
initialised. Am I going about this the wrong way? Is there a better way to
get the selected values?

Regards,

Matt Benic
Axapta Developer
UTi Sun Couriers Division






Yahoo! Groups Links










Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to