Module SigCJReportControlDemo - SQL.vw
1Use cSigCjReportControl.pkg
2Use cSigCJContextMenu.pkg
3Use cSigCJMenuItem.pkg
4Use CalEvent.DD
5Use DFEntry.pkg
6Use Windows.pkg
7
8Deferred_View Activate_SigCjReportControlDemo_SQL_View for ;
9Object SigCjReportControlDemo_SQL_View is a dbView
10 Set Border_Style to Border_Thick
11 Set Size to 250 400
12 Set Location to 2 2
13 Set Maximize_Icon to True
14 Set Label to "Codejock Demo - Report Control - SQL"
15 Set Icon to "SIG.ico"
16
17 Object oCalevent_DD is a CalEvent_DataDictionary
18 End_Object
19
20 Set Main_DD to oCalevent_DD
21 Set Server to oCalevent_DD
22
23// Object oSigCJFieldChooser is a cSigCJReportControlFieldChooser
24// End_Object
25
26 Object oSigCJReportControl1 is a cSigCJReportControl
27 Set Size to 174 382
28 Set Location to 33 7
29 Set peAnchors to anAll
30 Set piTable_Index to 1
31
32 Set phoDD to oCalevent_DD
33 Set pbAuto_Columns to True
34 Set peDb_Type to eRC_db_SQL
35
36// Set phoFieldChooser to (oSigCJFieldChooser(Self))
37 Set pbPX_Save_Layout to True
38 Set psPX_Tag to (Label(Parent(Self)))
39
40 Object oSigCJContextMenu is a cSigCJContextMenu
41 Send Add_MenuItem "Rebuild" "Rebuild_Report" False ""
42 Send Add_MenuItem "Refresh" "Refresh_Report" False ""
43 If (phoFieldChooser(Self)) Begin
44 Send Add_MenuItem "Field Chooser" "FieldChooser" True ""
45 Send Add_MenuItem "Default Layout" "DefaultLayout" False ""
46 End
47 Send Add_MenuItem "Select All" "SelectAll" True ""
48 Send Add_MenuItem "Deselect All" "DeselectAll" False ""
49 Send Add_MenuItem "Invert Selection" "Invert_Selection" False ""
50 Send Add_MenuItem "Preview Report" "PreviewReport" True ""
51 Send Add_MenuItem "Print Report" "PrintReport" False ""
52 Send Add_MenuItem "Export To CSV" "CSV_Export" False ""
53 Send Add_MenuItem "Process Selected Rows" "Process_Rows" True ""
54 End_Object
55
56 Procedure OnDefine_Columns
57 Send Add_Report_Column "" 0 eRC_Integer eRC_Standard "CalEvent.Recnum" ""
58 Send Add_Report_Column "Subject" 100 eRC_String eRC_Standard "CalEvent.Subject" ""
59 Send Add_Report_Column "Location" 100 eRC_String eRC_Standard "CalEvent.Location" ""
60 Send Add_Report_Column "Body" 100 eRC_Text eRC_Standard "CalEvent.Body" ""
61 Send Add_Report_Column "CreationDate" 80 eRC_Date eRC_Standard "CalEvent.CreationDate" ""
62 Send Add_Report_Column "CreationTime" 60 eRC_String eRC_Standard "CalEvent.CreationTime" ""
63 Send Add_Report_Column "StartDate" 80 eRC_Date eRC_Standard "CalEvent.StartDate" ""
64 Send Add_Report_Column "StartTime" 60 eRC_String eRC_Standard "CalEvent.StartTime" ""
65 Send Add_Report_Column "EndDate" 80 eRC_Date eRC_Standard "CalEvent.EndDate" ""
66 Send Add_Report_Column "EndTime" 60 eRC_String eRC_Standard "CalEvent.EndTime" ""
67 Send Add_Report_Column "Recurr State" 60 eRC_Integer eRC_Standard "CalEvent.Recurr_State" "If(CalEvent.Recurr_State > 0,If(CalEvent.Recurr_State = 1,'Recurring','Exception'),'')"
68 Send Add_Report_Column "Meeting" 60 eRC_Integer eRC_CheckBox "CalEvent.MeetingFlag" "If(CalEvent.MeetingFlag > 0,'True','False')"
69 Send Add_Report_Column "Private" 60 eRC_Integer eRC_CheckBox "CalEvent.PrivateFlag" "If(CalEvent.PrivateFlag > 0,'True','False')"
70 End_Procedure
71
72 Procedure OnComRowRClick Variant llRow Variant llItem
73 Send Popup of oSigCJContextMenu
74 End_Procedure
75
76 Procedure OnProcess_Rows String sID
77 Integer iRecnum
78
79 Move (Integer(sID)) to iRecnum
80 If (iRecnum >0 ) Begin
81 Send Find_By_Recnum of oCalevent_DD CalEvent.File_Number iRecnum
82 End
83 End_Procedure
84
85 Procedure OnDouble_Click String sID
86 Integer iRecnum
87
88 Move (Integer(sID)) to iRecnum
89 If (iRecnum >0 ) Begin
90 Send Find_By_Recnum of oCalevent_DD CalEvent.File_Number iRecnum
91 End
92 End_Procedure
93
94 End_Object
95
96 Object oCalEvent_URN is a dbForm
97 Entry_Item CalEvent.URN
98 Set Location to 214 31
99 Set Size to 13 52
100 Set Label to "URN:"
101 Set Label_Justification_Mode to JMode_Right
102 Set Label_Col_Offset to 2
103 Set peAnchors to anBottomLeft
104 End_Object
105
106 Object oCalEvent_Subject is a dbForm
107 Entry_Item CalEvent.Subject
108 Set Location to 214 134
109 Set Size to 13 255
110 Set Label to "Subject:"
111 Set Label_Justification_Mode to JMode_Right
112 Set Label_Col_Offset to 2
113 Set peAnchors to anBottomLeftRight
114 End_Object
115
116 Object oGroup1 is a Group
117 Set Size to 29 387
118 Set Location to 1 4
119 Set peAnchors to anTopLeftRight
120
121 Object oActive_Track_cb is a CheckBox
122 Set Location to 12 10
123 Set Size to 10 50
124 Set Label to "Active Track"
125
126 Procedure OnChange
127 Boolean bChecked
128
129 Get Checked_State to bChecked
130 Set pbActive_Track of oSigCJReportControl1 to bChecked
131 End_Procedure
132
133 End_Object
134 Object oSort_On_Group_cb is a CheckBox
135 Set Size to 10 50
136 Set Location to 12 72
137 Set Label to "Sort On Group"
138
139 Procedure OnChange
140 Boolean bChecked
141
142 Get Checked_State to bChecked
143 Set pbGroup_Sorted_Columns of oSigCJReportControl1 to bChecked
144 End_Procedure
145
146 End_Object
147
148 Object oFilter_Search_Form is a Form
149 Set Size to 13 102
150 Set Location to 10 278
151 Set peAnchors to anBottomRight
152 Set Label_Col_Offset to 2
153 Set Label_Justification_Mode to JMode_Right
154 Set Label to "Filter Search"
155
156 Set Form_Button 0 to Form_Button_Prompt
157 Set Form_Button_Bitmap 0 to "ieref.bmp"
158 Set Prompt_Button_Mode to PB_PromptOn
159 On_Key kClear Send Prompt
160 On_Key kEnter Send Prompt
161
162 Procedure OnChange
163 String sValue
164
165 Get Value to sValue
166 If (Trim(sValue) = "") Begin
167 Send Filter_Rows of oSigCJReportControl1 sValue
168 End
169 End_Procedure
170
171 Procedure Prompt
172 String sValue
173
174 Get Value to sValue
175 Send Filter_Rows of oSigCJReportControl1 sValue
176 End_Procedure
177
178 End_Object
179
180 End_Object
181
182Cd_End_Object
183