Hi,

We are trying to retrieve data from different companies and print 
them in a report. We have used a temporary table to store the data.
The code that we followed can be found below.
class CustMultiCompClass
{
CustMultiCompClass CustMultiCompClass;
}

public static CustMultiCompTable populate()
{
custtable ct;
CustMultiCompTable  CustMultiCompTable;
;
CustMultiCompTable.setTmp();
changecompany('DEE')
{
while select name from ct
where ct.AccountNum >= '2000' && ct.AccountNum <= '2002'
{
CustMultiCompTable.CustName = ct.Name;
CustMultiCompTable.CustAccount = ct.AccountNum;
CustMultiCompTable.CustGroupId = ct.CustGroup;
CustMultiCompTable.insert();
}
}
return CustMultiCompTable;
}

public class ReportRun extends ObjectRun
{
CustMultiCompClass CustMultiCompClass;
CustMultiCompTable CustMultiCompTable;
}

public boolean fetch()
 {
     boolean ret;
       ;
      CustMultiCompTable = CustMultiCompClass::populate();

      QueryRun = new QueryRun(this);
       if(queryrun.prompt() && element.prompt())
      {
      while(queryrun.next())
      {
      CustMultiCompTable =  Queryrun.get(tablenum
(CustMultiCompTable));
      this.send(CustMultiCompTable);
      }
      return true;
      }
      else
      return false;
      ret = super();

     return ret;
 }

public void init()
{
super();
CustMultiCompClass = new CustMultiCompClass();
}
When I run this code the print window displays the data I want,but 
the report says it is empty.
Any pointers on this would be a great help.
Thanks in anticipation,
Kirubarani






Reply via email to