I have a report with the following fetch method:

  qry=new QueryRun(element.query());
  if (qry.prompt() && element.prompt()) {
       SalesDistrict = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,SalesDistrict)).value();
       fromDate = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,InvoiceDate)).value();
       ItemGroup = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,ItemGroup)).value();
       SubGroup = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,Subgroup)).value();
       BusRelAcct = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,BusRelAccount)).value();
       CostGroup = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,CostGroupId)).value();
       SaleID = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,SalesId)).value();
       Item = 
qry.query().dataSourceNo(1).findRange(fieldnum(etsLotionDist,ItemID)).value();

       while (qry.next()) {
           tmp1=qry.getNo(1);
           if (lSalesDistrict!=tmp1.SalesDistrict) {
               element.CalcSum();
               element.send(tmp1);
           }
           lSalesDistrict=tmp1.SalesDistrict;
           lItemGroup=tmp1.ItemGroup;
           lSubGroup=tmp1.Subgroup;
           lCostGroup=tmp1.CostGroupId;
           lBusRelAcct=tmp1.BusRelAccount;
           lSaleID=tmp1.SalesId;
           lItem=tmp1.ItemID;
       }
   }
   return true;

When I use the <F5> key to run the report the line

if (qry.prompt() && element.prompt()) {

correctly calls the report. However, when I call the report using a menuitem the same line does not prompt the user and runs the report without a filter. Does anyone have any ideas why this does not work correctly?

Thanks,

Rich

Yahoo! Groups Sponsor ADVERTISEMENT
click here


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to