Hello,
I have a Grid on Form which shows fields from 2 datasources i.e. DS1 and DS2. They are related using inner join.
Now i have to put 2 filter dropdown list. 1 dropdown is to filter values in DS1 and other is for DS2.
I have override executequery() of DS1 and written below code.
--------------------------------------------------------------------------------------------------------------
public void executeQuery()
{
Querybuilddatasource qbds;
qbds = this.queryBuildDataSource();
if(DropdownList1.selection())
{
this.query().dataSourceNo(1).addRange(fieldNum(DS1,fieldname1)).value(somevalue);
}
if(DropdownList2.selection())
{
this.query().dataSourceNo(2).addRange(fieldNum(DS2,fieldname2)).value(somevalue);
}
super();
}
--------------------------------------------------------------------------------------------------------------
But this code throws error that
Query missing QueryBuildDataSource for FormDataSource DS2
Can you please help me understand what is wrong here?
please note that I don't want to use sysquery::findorcreatedatasource() method to add table of DS2 in it.
Do i need to write second filter code in executequery() of DS2 only? but in that case it may throw same error for DS1. please guide. Thanks.