×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Create crystal report to specific order using foxpro

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.

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

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close