Good morning to all,
This is a script I used on a button to select records from a Table "SOUMISSIONS" and print using the report "Rapport_C".
The variables are entered using the "MDDialog" script shown below.
Both scripts are an adaptation from Xbasic for Everyone Chapter 38.
I need your comments on line 25. Can I do that?
I do not get any result but no error message.
Thanks in advance for your usual help.
JP
1 ''XBasic
2 dim fdate as d
3 dim edate as d
4 dim montanta as n
5 dim montantb as n
6 dim lastbutton as c
7 dim SOUMISSIONS as p
8 form.view("MDDialog","dialog")
9 lastbutton=:MDDialog.last_pressed()
10 if lastbutton="OK_button" then
11 fdate=:MDDialog:Starting_date.value
12 edate=:MDDialog:Ending_Date.value
13 montanta=:MDDialog:valuea.value
14 montantb=:MDDialog:valueb.value
15 end if
16 MDDialog.close()
17 if lastbutton="Cancel_button" then
18 end
19 end if
20 'else continue
21 SOUMISSIONS=table.current()
22 query.option="I"
23 query.description="date query"
24 query.order="DATE"
25 query.filter="between(DATE,fdate,edate).and.between(montant,montanta,montantb)"
26 ip=SOUMISSIONS.query_create()
27 SOUMISSIONS.index_primary_put(ip)
28 SOUMISSIONS.fetch_first()
29 preview:
30 :report.preview("Rapport_C")
31 end
This is the MDDIALOG script:
''XBasic
dim shared starting_date as d
dim shared ending_date as d
dim shared valuea as n
dim shared valueb as n
if isblank("var->starting_date").or.isblank("var->ending_date").or.isblank("var->valuea").or.isblank("var->valueb") then
ui_msg_box("Erreur d'entr�e","Les deux dates et les deux montants sont n�cesaires")
end
end if
if ending_date
This is a script I used on a button to select records from a Table "SOUMISSIONS" and print using the report "Rapport_C".
The variables are entered using the "MDDialog" script shown below.
Both scripts are an adaptation from Xbasic for Everyone Chapter 38.
I need your comments on line 25. Can I do that?
I do not get any result but no error message.
Thanks in advance for your usual help.
JP
1 ''XBasic
2 dim fdate as d
3 dim edate as d
4 dim montanta as n
5 dim montantb as n
6 dim lastbutton as c
7 dim SOUMISSIONS as p
8 form.view("MDDialog","dialog")
9 lastbutton=:MDDialog.last_pressed()
10 if lastbutton="OK_button" then
11 fdate=:MDDialog:Starting_date.value
12 edate=:MDDialog:Ending_Date.value
13 montanta=:MDDialog:valuea.value
14 montantb=:MDDialog:valueb.value
15 end if
16 MDDialog.close()
17 if lastbutton="Cancel_button" then
18 end
19 end if
20 'else continue
21 SOUMISSIONS=table.current()
22 query.option="I"
23 query.description="date query"
24 query.order="DATE"
25 query.filter="between(DATE,fdate,edate).and.between(montant,montanta,montantb)"
26 ip=SOUMISSIONS.query_create()
27 SOUMISSIONS.index_primary_put(ip)
28 SOUMISSIONS.fetch_first()
29 preview:
30 :report.preview("Rapport_C")
31 end
This is the MDDIALOG script:
''XBasic
dim shared starting_date as d
dim shared ending_date as d
dim shared valuea as n
dim shared valueb as n
if isblank("var->starting_date").or.isblank("var->ending_date").or.isblank("var->valuea").or.isblank("var->valueb") then
ui_msg_box("Erreur d'entr�e","Les deux dates et les deux montants sont n�cesaires")
end
end if
if ending_date
Comment