Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create crystal report to specific order using foxpro 1

Status
Not open for further replies.

Niki_S

Programmer
Jun 4, 2021
232
LK
I used my foxpro9 code as below to get records from sql server.
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
Now, I want to get my crystal report according to this order. I used group by option for cHTSCode in crystal reports also.
Code:
				[highlight #EF2929][b]2021 APRIL	[/b]	[/highlight]		
													
[highlight #EF2929][b]FMF	[/b][/highlight]
							
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
					  [b] 3053.70	  4770	                32947.35	[/b]

								
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
					[b]  164.01	  409.00	   6781.56	[/b]

[b]
[highlight #EF2929]TOTAL					   3217.71	  5179.00	   39728.91[/b][/highlight]

[highlight #EF2929][b]SGL / VTM / SFC		[/b]	[/highlight]	

								
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
					  [b]653.47	  1421.00	   16853.06	[/b]

								
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
					[b]  2665.69	  7667	           61191.23	[/b]

[highlight #CC0000][b]TOTAL					   3319.16        9088.00	   78044.29[/b][/highlight]

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top