“The data source is not embedded within a (parent) data source.”
This is the error i get while trying to fetch a record from a table in report using fetch method without using datasource or querry in AOT.
How do i solve this error
the following is the fetch method which i have written in Report
public boolean fetch()
{
CarTable carTable1,carTable2;
QueryRun qr;
QueryBuildDatasource QueryBuildDatasource1;
;
qr = new QueryRun(element);
QueryBuildDatasource1 = element.query().dataSourceTable(tablenum(CarTable));
while (qr.next())
{
if (qr.changed(tableNum(CarTable)))
{
carTable1 = queryRun.get(tableNum(CarTable));
if(carTable1)
{
element.newPage();
}
this.send(carTable1);
if(carTable1.CarBrand)
{
while select carTable1 where carTable1.CarId == carTable2.CarId
{
element.send(carTable1);
}
}
}
}
return true;
}
I want to fetch records from just 1 table …i.e cartable display on report