Query build range while opening the form

HI,

Below sample code will be useful to build the query range and get data based on month while opening from only.

class declaration()

int month;

Form init()

                      month = 12

Datasource init()

                super();

queryBuildRange = Mzk_JapanesPayrollEntry_ds.query().dataSourceTable(tableNum(Mzk_JapanesPayrollEntry)).addRange(fieldNum(Mzk_JapanesPayrollEntry, Mthyr));

DS execute qury()

public void executeQuery()

{

    //queryBuildRange.value(int2str(any2int(sdate)));

      queryBuildRange.value(int2str(any2int(month)));

    super();

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s