Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Base alias is "Customer". Child alias is "Orders". 

Orders which are not paid is bold and font color is "red".

Download full example.

Info

This example is for XFRX 19.1.0 because use data:template element  and stylefor attribute.

Data preparation

Code Block
m.lcTASTRADE=HOME(2)+"Tastrade\Data\"
OPEN DATA (m.lcTASTRADE+"TASTRADE")

USE Customer ORDER "CUSTOMER_I" IN 0
USE Orders ORDER "CUST_ORD" IN 0
USE Order_Line_Items ORDER "ORDER_ID" IN 0

SELECT order_Id, SUM(UNIT_PRICE*QUANTITY) AS Amount ;
  FROM Order_Line_Items;
  GROUP BY order_ID;
  INTO CURSOR order_amount 
  
SELECT ("order_amount")  
INDEX ON order_ID TAG "order_I"

SELECT ("Orders")
SET RELATION TO order_ID INTO ("order_amount")

SELECT ("Customer")
SET RELATION TO Customer_id INTO ("Orders")
SET FILTER TO RECNO()<=8

...

Code Block
m.loSession=EVALUATE([xfrx("XFRX#INIT")])
*m.loSession.setLogFile(m.lcPath+"XFRX.log")

m.lnRetVal = loSession.SetParams(,,,,.T.,,"XFF")
IF m.lnRetVal=0
   m.loSession.ProcessReport(m.lcPath+"Customer_orders")
   m.loXFF=m.loSession.finalize()
   
   SET CLASSLIB TO xfrxlib\xfrxlib ADDITIVE 

   m.loPreview = CREATEOBJECT("frmMPPreviewer")
   m.loPreview.iEmail = 1 && show the email icon
   m.loPreview.lVFP8 =.T. && use XFRX#INIT
   *m.loPreview.setLogFile(m.lcPath+"XFRXPreview.log")
   
   m.loPreview.windowtype = 1
   m.loPreview.windowState = 0
   
   m.loPreview.PreviewXFF(m.loXFF)
   m.loPreview.show()
   
ENDIF   

Result

Image Added