Hi,
Today I would like to share you how to filter the form from one Tab page to another Tab page .
For an Example i have two Tabpage in my Form
i)Accepted Sheet
ii)Rejected Sheet
When i click Accepted Sheet TabPage , the accepted sheet records must be shown.
Similar way if i click Rejected Sheet TabPage , the rejected sheet records must be listed.
Step 1:
Write the piece of code in the DataSource level executequery ()
public void executeQuery()
{
this.Query().datasourceNo(1).clearRanges();
if(AcceptedTabPge.isActivePage())
{
this.query().dataSourceName('SheetTable')
.addRange(fieldnum(SheetTable,SheetAccepted)).value(queryvalue(NoYes::Yes));
}
if(RejectedTabPage.isActivePage())
{
this.query().dataSourceName('SheetTable')
.addRange(fieldnum(SheetTable,SheetAccepted)).value(queryvalue(NoYes::No));
}
super();
}
Step 2:
write this piece of code in the pageactivated method of both Tabpage
public void pageActivated()
{
super();
SheetTable_ds.executeQuery();
}
Output:
TabPage 1:
TabPage2:
Happy Daxing......
Today I would like to share you how to filter the form from one Tab page to another Tab page .
For an Example i have two Tabpage in my Form
i)Accepted Sheet
ii)Rejected Sheet
When i click Accepted Sheet TabPage , the accepted sheet records must be shown.
Similar way if i click Rejected Sheet TabPage , the rejected sheet records must be listed.
Step 1:
Write the piece of code in the DataSource level executequery ()
public void executeQuery()
{
this.Query().datasourceNo(1).clearRanges();
if(AcceptedTabPge.isActivePage())
{
this.query().dataSourceName('SheetTable')
.addRange(fieldnum(SheetTable,SheetAccepted)).value(queryvalue(NoYes::Yes));
}
if(RejectedTabPage.isActivePage())
{
this.query().dataSourceName('SheetTable')
.addRange(fieldnum(SheetTable,SheetAccepted)).value(queryvalue(NoYes::No));
}
super();
}
Step 2:
write this piece of code in the pageactivated method of both Tabpage
public void pageActivated()
{
super();
SheetTable_ds.executeQuery();
}
Output:
TabPage 1:
TabPage2:
Happy Daxing......
Neat explanation....
ReplyDelete