Mini Kabibi Habibi

Current Path : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/samples/solution/ffc/
Upload File :
Current File : C:/Users/ITO/Desktop/VF9/program files/microsoft visual foxpro 9/samples/solution/ffc/automate.sct

&�VERSION =   3.00dataenvironmentdataenvironmentDataenvironmentLLeft = 251
Top = 242
Width = 520
Height = 200
Name = "Dataenvironment"
cursorcursorCursor1Dataenvironment�Left = 10
Top = 20
Width = 95
Height = 90
Alias = "customer"
Database = ..\..\data\testdata.dbc
CursorSource = "customer"
Name = "Cursor1"
22frmsolution..\solution.vcxformFrmsolution1�Height = 215
Width = 337
DoCreate = .T.
Caption = "Run Word, Excel and Graph Automation"
Visible = .T.
HelpContextID = 206
lsetffcpath = .T.
Name = "Frmsolution1"
C_solutions1.Top = 180
C_solutions1.Left = 48
C_solutions1.Name = "C_solutions1"
Behindscenes1.Top = 180
Behindscenes1.Left = 12
Behindscenes1.TabIndex = 5
Behindscenes1.ZOrderSet = 3
Behindscenes1.Name = "Behindscenes1"
Shape2.Top = 12
Shape2.Left = 12
Shape2.Height = 60
Shape2.Width = 312
Shape2.ZOrderSet = 4
Shape2.Name = "Shape2"
Label1.Caption = "You can add automation routines to your application to create Excel pivot tables, Word mail merge documents, FoxPro cross-tabs, and Graph charts."
Label1.Height = 42
Label1.Left = 24
Label1.Top = 24
Label1.Width = 288
Label1.TabIndex = 6
Label1.ZOrderSet = 5
Label1.Name = "Label1"
Label4.TabIndex = 8
Label4.ZOrderSet = 6
Label4.Name = "Label4"
Cmdclose1.Top = 180
Cmdclose1.Left = 252
Cmdclose1.TabIndex = 7
Cmdclose1.ZOrderSet = 7
Cmdclose1.Name = "Cmdclose1"
shapeshapeShape3Frmsolution1bTop = 72
Left = 12
Height = 84
Width = 312
SpecialEffect = 0
ZOrderSet = 0
Name = "Shape3"
_xtab..\..\..\ffc\_utility.vcxcustom_xtabFrmsolution1&Top = 180
Left = 72
Name = "_xtab"

commandbutton
commandbuttoncmdXtabFrmsolution1�Top = 84
Left = 36
Height = 23
Width = 108
FontName = "MS Sans Serif"
FontSize = 8
Caption = "\<Cross Tab..."
TabIndex = 1
ZOrderSet = 11
Name = "cmdXtab"
PROCEDURE Click
SELECT city,country,maxordamt FROM customer INTO CURSOR temp
WITH THISFORM._xtab
	.lTotalRows = .T.
	.nTotalOption = 0 &&totaling options (0-sum, 1-count, 2-% of total)
	.lDisplayNulls = .T.
	.lBrowseAfter = .T.
	.RunXtab()
ENDWITH

ENDPROC
��� ��@`%)L
8�U~*o�customer������������temp�������w�T��a��T�����T�	�a��T�
�a����C�����UCITYCOUNTRY	MAXORDAMTCUSTOMERTEMPTHISFORM_XTAB
LTOTALROWSNTOTALOPTION
LDISPLAYNULLSLBROWSEAFTERRUNXTABClick,��1������A2)�
commandbutton
commandbuttoncmdMailFrmsolution1�Top = 84
Left = 192
Height = 23
Width = 108
FontName = "MS Sans Serif"
FontSize = 8
Caption = "\<Mail Merge..."
TabIndex = 3
ZOrderSet = 11
Name = "cmdMail"
�PROCEDURE Click
LOCAL aFlds
DIMENSION aflds[4,1]
aflds[1,1] = "city"
aflds[2,1] = "maxordamt"
aflds[3,1] = "country"
aflds[4,1] = "cust_id"

SELECT Customer
SET DATABASE TO testdata

WITH THISFORM._mailmerge
	.cAppTitle = "My Application"	&& application name, used in Alerts	
	.nWordProc = 1					&& word processor (1 = Word 6+; 2 = CommaDelim; or user-defined (see below); default = 1)
	.nNewDoc = 1					&& is it a new doc (1 = new, 2 = existing; default = 1)
	.nTemplate = 1					&& type of main document (Word only, 1 = form letter; 2 = label; 3 = envelope; 4 = catalog; default = 1)
	.cAlias = ALIAS()				&& alias of source table or view
	.cDBCTable = DBF()				&& table name if table is part of a DBC
	.cDBCName = DBC()				&& DBC name if source table is part of a DBC
	ACOPY(aflds, .aAutoFields)		&& fill in array of field names to be used
	.MakeOutput()					&& do the merge
ENDWITH

ENDPROC
��� ����%L"�UR�����������T���������city��"T���������	maxordamt�� T���������country�� T���������cust_id��F��G(�testdata�������K�T���My Application��T�����T�����T�����
T�	�C��
T�
�C&��T��C����C����
����C�
����UAFLDSCUSTOMERTESTDATATHISFORM
_MAILMERGE	CAPPTITLE	NWORDPROCNNEWDOC	NTEMPLATECALIAS	CDBCTABLECDBCNAMEAAUTOFIELDS
MAKEOUTPUTClick,��1q1�!r��������A2�)�
commandbutton
commandbuttoncmdPivotFrmsolution1�Top = 120
Left = 36
Height = 23
Width = 108
FontName = "MS Sans Serif"
FontSize = 8
Caption = "\<Pivot Table..."
TabIndex = 2
ZOrderSet = 11
Name = "cmdPivot"
'PROCEDURE Click
LOCAL aflds,aFList
DIMENSION aflds[4,1]
aflds[1,1] = "city"
aflds[2,1] = "maxordamt"
aflds[3,1] = "country"
aflds[4,1] = "cust_id"
DIMENSION aFList[1,1]
AFIELDS(aFList)

SELECT Customer
SET DATABASE TO testdata

WITH THISFORM._pivottable
	.cAlias = ALIAS()
	.cDBCTable = DBF()
	.cDBCName = DBC()
	.cpivfldrow = "city"
	.cpivflddata = "maxordamt"
	.cpivfldpage = "country"
	.lHasColumnTotals = .T.
	.lHasRowTotals = .T.
	=ACOPY(aflds,.aAutoFields)
	=ACOPY(aFList,.aFldList)
	.MakeOutput()
ENDWITH


ENDPROC
,�� A�%����U�������������T���������city��"T���������	maxordamt�� T���������country�� T���������cust_id������������C�����F��G(�testdata���������
T��C��
T��C&��T��C��T�	��city��T�
��	maxordamt��T���country��T��a��T�
�a����C����
����C����
����C�����UAFLDSAFLISTCUSTOMERTESTDATATHISFORM_PIVOTTABLECALIAS	CDBCTABLECDBCNAME
CPIVFLDROWCPIVFLDDATACPIVFLDPAGELHASCOLUMNTOTALS
LHASROWTOTALSAAUTOFIELDSAFLDLIST
MAKEOUTPUTClick,��1�1�!1�r���!qQ���A3)
commandbutton
commandbuttoncmdGraphFrmsolution1�Top = 120
Left = 192
Height = 23
Width = 108
FontName = "MS Sans Serif"
FontSize = 8
Caption = "\<Graph..."
TabIndex = 4
ZOrderSet = 11
Name = "cmdGraph"
MPROCEDURE Click
SELECT Customer
SET DATABASE TO testdata

WITH THISFORM._autograph
	DIMENSION .aDataFields[1]
	.aDataFields[1] = "maxordamt"
	.cCategoryField = "country"
	.nChartType = 5					&& Chart Type
	.nChartSubType = 1				&& Chart SubType
	.lSeriesByRow = .F.				&& Series by Row (.T.), by Column (.F.)
	.nAction = 1
	.cGraphPrevClass = "graphpreview"	&& Class containing preview form
	.cDefNewField = "olegraph"		&&default field name in new table
	.MakeOutput()
	IF !EMPTY(.cOutFile) AND FILE(.cOutFile)
		MODIFY FORM (.cOutFile) NOWAIT
	ENDIF
ENDWITH

ENDPROC
��� hh��%���UF��G(�testdata�������������T������	maxordamt��T���country��T�����T�����T��-��T�	����T�
��graphpreview��T���olegraph����C���%�C�
�
�C�
0	���
/&��
�:����UCUSTOMERTESTDATATHISFORM
_AUTOGRAPHADATAFIELDSCCATEGORYFIELD
NCHARTTYPE
NCHARTSUBTYPELSERIESBYROWNACTIONCGRAPHPREVCLASSCDEFNEWFIELD
MAKEOUTPUTCOUTFILEClick,��1q��Q�����a���AA2B)h
pivottable..\..\..\ffc\pivtable.vcxcustom_PivottableFrmsolution1ETop = 180
Left = 96
Height = 17
Width = 24
Name = "_Pivottable"
	mailmerge..\..\..\ffc\mailmrge.vcxcustom
_MailmergeFrmsolution1ETop = 180
Left = 120
Height = 17
Width = 24
Name = "_Mailmerge"
	autograph..\..\..\ffc\autgraph.vcxcustom
_AutographFrmsolution1ETop = 180
Left = 144
Height = 17
Width = 24
Name = "_Autograph"
JArial, 0, 9, 5, 15, 12, 21, 3, 0
MS Sans Serif, 0, 8, 5, 13, 11, 11, 2, 0
�Height = 215
Width = 337
DoCreate = .T.
Caption = "Run Word, Excel and Graph Automation"
Visible = .T.
HelpContextID = 1231592
lsetffcpath = .T.
Name = "Frmsolution1"
C_solutions1.Top = 180
C_solutions1.Left = 48
C_solutions1.Name = "C_solutions1"
Behindscenes1.Top = 180
Behindscenes1.Left = 12
Behindscenes1.TabIndex = 5
Behindscenes1.ZOrderSet = 3
Behindscenes1.Name = "Behindscenes1"
Shape2.Top = 12
Shape2.Left = 12
Shape2.Height = 60
Shape2.Width = 312
Shape2.ZOrderSet = 4
Shape2.Name = "Shape2"
Label1.Caption = "You can add automation routines to your application to create Excel pivot tables, Word mail merge documents, FoxPro cross-tabs, and Graph charts."
Label1.Height = 42
Label1.Left = 24
Label1.Top = 24
Label1.Width = 288
Label1.TabIndex = 6
Label1.ZOrderSet = 5
Label1.Name = "Label1"
Label4.TabIndex = 8
Label4.ZOrderSet = 6
Label4.Name = "Label4"
Cmdclose1.Top = 180
Cmdclose1.Left = 252
Cmdclose1.TabIndex = 7
Cmdclose1.ZOrderSet = 7
Cmdclose1.Name = "Cmdclose1"