Create crystal report to specific order using foxpro
Create crystal report to specific order using foxpro
(OP)
I used my foxpro9 code as below to get records from sql server.
Now, I want to get my crystal report according to this order. I used group by option for cHTSCode in crystal reports also.
Can you please help me to make my report as above. And I want to know how to get the thing that I highlighted in red color.
Thank you
CODE
stra="SELECT cSggNo, cInvNo, cProdFty , cGMTName, cHTSCode ,SUM(nInvQty) as nInvQty,dXFactory,cGrnNumber from MIS.dbo.vInvFinal where dXFactory >= ?thisform.txtFromDate.Value AND dXFactory <= ?thisform.txtToDate.Value " stra=stra+" AND cSggNo IS NOT NULL and cGrnNumber IS NOT NULL group by cSggNo,cInvNo,cProdFty,cGMTName,cHTSCode,dXFactory,cGrnNumber " SQLEXEC(hndOps,stra,'SGG_GRN') SELECT SGG_GRN If Reccount('SGG_GRN')>0 Copy To C:\TEMPFILES\SGGGRNs Type Fox2x xreppath= 'C:\TEMPFILES' creppath = xreppath+"\SGG_GRNs.RPT" With Thisform.oleprint .windowShowSearchBtn= .T. .windowShowPrintSetupBtn = .T. .progressDialog = .T. .reportfilename=creppath .printReport() Endwith Endif
CODE
2021 APRIL FMF SGG inv no Fty Item HS.code Quantity (KG) Quantity (PCS) Value WH. code SGG0945 S1490 FMF LADIES 6104.62 661.10 1026 6480.05 7800120E05GA0500 SGG0941 S1486 FMF LADIES 6104.62 518.60 810 6495.53 7800120E05GA0500 SGG1050 S1694 FMF LADIES 6104.62 561.10 897 7193.19 7800120E05GA0500 SGG0955 S1503 FMF LADIES 6104.62 651.50 1011 6298.53 7800120E05GA0500 SGG1017 S1646 FMF LADIES 6104.62 661.40 1026 6480.05 7800120E05GA0500 3053.70 4770 32947.35 SGG inv no Fty Item HS.code Quantity (KG) Quantity (PCS) Value WH. code SGG0969 S1564 FMF SKIRT 6204.59 164.01 409 6781.56 7800120E05GA0500 164.01 409.00 6781.56 TOTAL 3217.71 5179.00 39728.91 SGL / VTM / SFC SGG inv no Fty Item HS.code Quantity (KG) Quantity (PCS) Value WH. code SGG0967 S1561 VTM MENS 6103.43 653.47 1421 16853.06 7800120E05BK0100 653.47 1421.00 16853.06 SGG inv no Fty Item HS.code Quantity (KG) Quantity (PCS) Value WH. code SGG0952 S1500 SGL LADIES 6104.43 775.00 1173 8679.22 7800120E05BK0100 SGG0954 S1502 SGL LADIES 6104.43 446.00 682 8709.14 7800120E05BK0100 SGG1019 S1649 SFC LADIES 6104.43 364.23 1483 11134.86 7800120E05BK0100 SGG1020 S1651 SFC LADIES 6104.43 84.13 326 2447.72 7800120E05BK0100 SGG1018 S1647 SFC LADIES 6104.43 996.33 4003 30220.29 7800120E05BK0100 2665.69 7667 61191.23 TOTAL 3319.16 9088.00 78044.29
Can you please help me to make my report as above. And I want to know how to get the thing that I highlighted in red color.
Thank you