static void FindReports(Args _args)
{
   #AOT
   Report                  report;
   TreeNode                treeNode = TreeNode::findNode(#ReportsPath);
   TreeNodeIterator        iterator = treeNode.AOTiterator();
   QueryBuildDataSource    qbds;

   boolean  find1nInnerJoin(QueryBuildDataSource _qbdsParent)
   {
       int i;
QueryBuildDataSource qbdsChild;
       boolean    ret;
       ;
       for (i = 1; i <= _qbdsParent.childDataSourceCount(); i++)
       {
           qbdsChild = _qbdsParent.childDataSourceNo(i);
           if (qbdsChild)
           {
               if (qbdsChild.joinMode() == JoinMode::InnerJoin && qbdsChild.fetchMode() == QueryFetchMode::One2Many)
                   return true;

               if (qbdsChild.childDataSourceCount() > 0 && find1nInnerJoin(qbdsChild))
                   return true;
           }
       }
       return ret;
   }
   ;

   treeNode = iterator.next();
   while (treeNode)
   {
       if (treeNode.sysNodeType() == 202) //Report
       {
           report = treeNode;
           if (report && report.query().dataSourceCount() > 1)
           {
               qbds = report.query().dataSourceNo(1);
               if (find1nInnerJoin(qbds))
                   info(report.name());
           }
       }
       treeNode = iterator.next();
   }
}

EkleBunu Sosyal Paylaşım Butonu

Önceki Sayfa | : | Sonraki Sayfa