ysovva
29th May 2011, 12:54
I'm trying to make some checkes before calling to session defined as Print Bind Type in form command.
After pressing the print icon i can find myself at
choice.print.data:
before.choice:
but never at
choice.whinh9999m999:
before.choice:
More then this: for sessions defined in form commands as Session Bind Type i cannot get the pointer at
choice.whinh9999m999:
before.choice:
What i'm doing wrong?
bdittmar
29th May 2011, 15:00
I'm trying to make some checkes before calling to session defined as Print Bind Type in form command.
After pressing the print icon i can find myself at
choice.print.data:
before.choice:
but never at
choice.whinh9999m999:
before.choice:
More then this: for sessions defined in form commands as Session Bind Type i cannot get the pointer at
choice.whinh9999m999:
before.choice:
What i'm doing wrong?
Hello,
BaanERP Programmers Guide
4GL choice sections
--------------------------------------------------------------------------
You use choice sections to program actions that you want to be executed when standard commands are activated or ended. Choice sections consist of a main section and a subsection. The main section specifies the standard command for which the actions must be executed. The subsections specify when the actions must be executed.
Main section
choice.<standard command>:
The subsections associated with this main section are executed for the specified standard command. You use the Standard Commands (ttadv3110s000) session to select the standard commands for a session. A list of standard commands appears at the end of this help topic.
Subsections
before.choice:
The actions programmed in this subsection are executed immediately before the specified command is executed. You can use this subsection, for example, to test data before the command process continues. You can use the choice.again() function to stop the command.
on.choice:
The actions programmed in this subsection are executed when the specified command is activated. These actions are executed instead of the standard action associated with the command. This subsection is available for the following commands only:
print.data
run.job
global.delete
global.copy
bms
all commands in type 4 programs (except modify.set, restart.input, end.program, abort.program)
after.choice:
The actions programmed in this subsection are executed immediately after the specified command has been executed. This subsection is not available for the end.program and abort.program commands.
Example
choice.first.view:
after.choice:
execute(first.set)
Standard commands
The following table lists the available standard commands and the types of program in which the various choice subsections can be programmed for each command.
No Choice_option Description Before On After
01 start.set Add/start a new group in main table 1234 ---4 1234
02 first.view View first group of main table 1234 ---4 1234
03 next.view View next group of main table 1234 ---4 1234
04 prev.view View previous group of main table 1234 ---4 1234
05 last.view View last group of main table 1234 ---4 1234
06 def.find Find a specific record on key 1234 ---4 1234
07 find.data Start the set from the current data in the program script. Use: after import of data in a zoom process. (refresh) 1234 ---4 1234
08 first.set View first set of main table 1234 ---4 1234
09 next.set First execute an update.db and then view next set of main table 1234 ---4 1234
10 display.set Open read-only details 1234 ---4 1234
11 prev.set First execute an update.db and then view previous set of main table 1234 ---4 1234
12 rotate.curr Show amounts in other currency (on.choice subsections are available for this command only if no currencies are set) 1234 1234 1234
13 last.set View last set of main table 1234 ---4 1234
14 add.set Insert a new record 1234 ---4 1234
15 update.db First test consistency of data and then (re)write record or set (save) 1234 ---4 1234
16 dupl.occur Copy the record to a new one 1234 ---4 1234
17 recover.set Undo modifications which are not yet written to the database 1234 ---4 1234
18 mark.delete Delete selected records 1234 ---4 1234
19 mark.occur Select a record on the screen 1234 ---4 1234
20 change.order Change the search key 1234 ---4 1234
21 modify.set Change a record stored in the database 1234 ---- 1234
23 print.data Make a report with the current data on the form 1234 1234 1234
24 create.job Add session in job 1234 ---- 1234
25 form.tab.change Go to another form in session 1234 ---- 1234
26 first.frm Go to first form 1234 ---- 1234
27 next.frm Go to next form 1234 ---- 1234
28 prev.frm Go to previous form 1234 ---- 1234
29 last.frm Go to last form 1234 ---- 1234
31 resize.frm Resize the current form 1234 1234 1234
33 cmd.options Show available form options ---- ---- ----
34 zoom Zoom to another session/menu 1234 ---- 1234
35 interrupt Do an action each time interval 1234 1234 1234
36 end.program End execution of the session; the main table will be updated 1234 ---- ----
37 abort.program Cancel execution of the session. The main table is not updated 1234 ---- ----
39 text.manager Start the text manager 1234 ---- 1234
40 run.job Run job of session 1234 1234 1234
41 global.delete Delete range of records 1234 1234 1234
42 global.copy Copy range of records 1234 1234 1234
43 save.defaults Save values as defaults 1234 ---- 1234
44 get.defaults Get previous stored defaults 1234 ---- 1234
45 start.chart Chart Manager is started 1234 ---4 1234
46 start.query Start query by form 1234 ---4 1234
60 ask.helpinfo Asks for session help ---- ---- ----
62 calculator Calculator will be started ---- ---- ----
63 calendar Calendar will be started ---- ---- ----
64 bms A broadcast message is received 1234 1234 1234
71 cmd.whats.this Asks for field help ---- ---- ----
72 help.index Asks for the help index ---- ---- ----
The following commands are supported for backward compatibility only. Support is not guaranteed in future versions of the software.
No Choice_option Description Before On After
22 restart.input Restart the input after giving <Esc> during input mode 1234 ---- 1234
38 cont.process Start user defined process 1234 1234 1234
48 user.0 User option 0 1234 1234 1234
49 user.1 User option 1 1234 1234 1234
50 user.2 User option 2 1234 1234 1234
51 user.3 User option 3 1234 1234 1234
52 user.4 User option 4 1234 1234 1234
53 user.5 User option 5 1234 1234 1234
54 user.6 User option 6 1234 1234 1234
55 user.7 User option 7 1234 1234 1234
56 user.8 User option 8 1234 1234 1234
57 user.9 User option 9 1234 1234 1234
For a print session:
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
open the spooler
<your code>
close the spooler
Regards
ysovva
29th May 2011, 18:53
Thank you.
But standart BaaN user tutorial did not help me in this case.
Regards