Hello,
I design a Fixed Asset Report using Report Data Provider.
Below are the business Logic and i think something is missing in logic because report have empty columns.
Please give me idea if any one design Fixed Asset report.

private void insertintoSfa()
{
AssetTrans assetTrans;
AssetTable assetTable;
;
assetTable = AssetTable::find(assetBook.AssetId);
select firstOnly assetBook where assetBook.AssetId==assetTable.AssetId;
select firstOnly assetTrans where assetTrans.AssetId==assetTable.AssetId;
{
sfa_Tmp.AcqDate=assetBook.AcquisitionDate;
sfa_Tmp.AssetGroup=assetBook.AssetGroup;
sfa_Tmp.AcqPrice=assetBook.AcquisitionPrice;
sfa_Tmp.AssetId=assetBook.AssetId;
sfa_Tmp.ServiceLife=assetBook.ServiceLife;
sfa_Tmp.AssetDepStartDate=assetBook.DepreciationStartDate;
sfa_Tmp.AssetStatus=assetBook.Status;
sfa_Tmp.TransTxt=assetTrans.Txt;
sfa_Tmp.AssetTransDate=assetTrans.TransDate;
sfa_Tmp.AssetDisposalDate=assetBook.DisposalDate;
sfa_Tmp.insert();
}
}
[SysEntryPointAttribute(false)]
public void processReport()
{
FromDate fromDate;
ToDate toDate;
AssetGroupId assetGroupId;
AssetId assetId;
Query query;
QueryRun queryRun;
QueryBuildDataSource qrds,qrds1;
QueryBuildRange qbr;
AssetBook queryAssetBook;
SFA_Asset_Contract dataContract;
dataContract = this.parmDataContract();
fromDate = dataContract.parmFromDate();
toDate = dataContract.parmToDate();
assetGroupId = dataContract.parmAssetGroupId();
assetId = dataContract.parmAssetId();
query = new Query();
qrds = query.addDataSource(tableNum(AssetTrans));
if(fromDate && !toDate)
{
qbr = qrds.findRange(fieldnum(AssetTrans, TransDate));
if (!qbr)
{
qbr = qrds.addRange(fieldnum(AssetTrans, TransDate));
}
if(!qbr.value()) qbr.value(queryRange(fromDate, dateMax()));
}
if(!fromDate && toDate)
{
qbr = qrds.findRange(fieldnum(AssetTrans, TransDate));
if (!qbr)
{
qbr = qrds.addRange(fieldnum(AssetTrans, TransDate));
}
if(!qbr.value()) qbr.value(queryRange(dateNull(), toDate));
}
if(fromDate && toDate)
{
qbr = qrds.findRange(fieldnum(AssetTrans, TransDate));
if (!qbr)
{
qbr = qrds.addRange(fieldnum(AssetTrans, TransDate));
}
if(!qbr.value()) qbr.value(queryRange(fromDate, toDate));
}
qrds1 = query.addDataSource(tableNum(AssetBook));
if(assetId)
{
qbr = qrds1.findRange(fieldnum(AssetBook, AssetId));
if (!qbr)
{
qbr = qrds1.addRange(fieldnum(AssetBook, AssetId));
}
if(!qbr.value()) qbr.value(assetId);
}
if(assetGroupId)
{
qbr = qrds1.findRange(fieldnum(AssetBook,AssetGroup));
if (!qbr)
{
qbr = qrds1.addRange(fieldnum(AssetBook,AssetGroup));
}
if(!qbr.value()) qbr.value(assetGroupId);
}
// Run the query with modified ranges.
queryRun = new QueryRun(query);
ttsbegin;
while(queryRun.next())
{
assetBook = queryRun.get(tableNum(AssetBook));
this.insertintoSfa();
}
ttscommit;
}