Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building a conditional SUM
Message
From
24/12/1998 12:24:01
Marcelo Codino
Mystic & Faith - Sistemas -
Buenos Aires, Argentina
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00170147
Message ID:
00170313
Views:
24
Thanks for your help Nick, it works.Sorry because I don´t tell you that the report must have dDateFrom and dDateTo.I have this SQL in the Report Datasession.Init().It works fine in my ListBox, now I want to obtain the same results by printer.What´s your suggest about this ?
 SELECT a.fecha, a.concepto,a.importe,a.val_cuota,;
  IIF(!EMPTY(a.cuotas),RTRIM(a.cuotas)+ "/" + LTRIM(a.can_cuotas),ALLT(a.cuotas)),;
  SUM(IIF(a.plan,a.val_cuota,a.importe)) AS n_impo;
  FROM Master a ; 
  WHERE BETWEEN(a.fecha,dDateFrom,dDateTo) ;
  OR a.plan = .T. ;  
  AND a.fecha <= dDateTo ;  
  AND a.cuotas <> a.can_cuotas ;
  GROUP BY a.nro_oper ;
  ORDER BY a.fecha ;
  INTO CURSOR c_names
Thanks in advance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform